Skip to content

Commit

Permalink
add diskInfo with bucket sizes
Browse files Browse the repository at this point in the history
  • Loading branch information
rzrbld committed Mar 7, 2020
1 parent abd072f commit 6f1227f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ func bodyResHandler(ctx iris.Context, err error, body interface{}) interface{} {
func main() {
fmt.Println("\033[31m\r\n ________ ________ _____ ______ ___ ________ ___ ________ \r\n|\\ __ \\ |\\ ___ \\ |\\ _ \\ _ \\ |\\ \\ |\\ ___ \\ |\\ \\ |\\ __ \\ \r\n\\ \\ \\|\\ \\\\ \\ \\_|\\ \\\\ \\ \\\\\\__\\ \\ \\\\ \\ \\\\ \\ \\\\ \\ \\\\ \\ \\\\ \\ \\|\\ \\ \r\n \\ \\ __ \\\\ \\ \\ \\\\ \\\\ \\ \\\\|__| \\ \\\\ \\ \\\\ \\ \\\\ \\ \\\\ \\ \\\\ \\ \\\\\\ \\ \r\n \\ \\ \\ \\ \\\\ \\ \\_\\\\ \\\\ \\ \\ \\ \\ \\\\ \\ \\\\ \\ \\\\ \\ \\\\ \\ \\\\ \\ \\\\\\ \\ \r\n \\ \\__\\ \\__\\\\ \\_______\\\\ \\__\\ \\ \\__\\\\ \\__\\\\ \\__\\\\ \\__\\\\ \\__\\\\ \\_______\\\r\n \\|__|\\|__| \\|_______| \\|__| \\|__| \\|__| \\|__| \\|__| \\|__| \\|_______|\r\n \r\n \r\n \033[m")
fmt.Println("\033[33mAdmin REST API for http://min.io (minio) s3 server")
fmt.Println("version : 0.6 ")
fmt.Println("version : 0.7 ")
fmt.Println("Author : rzrbld")
fmt.Println("License : MIT")
fmt.Println("Git-repo : https://github.com/rzrbld/adminio \033[m \r\n")
Expand Down Expand Up @@ -389,6 +389,12 @@ func main() {
ctx.JSON(res)
})

v1.Get("/disk-info", func(ctx iris.Context) {
du, err := madmClnt.DataUsageInfo()
var res = bodyResHandler(ctx, err, du)
ctx.JSON(res)
})

v1.Get("/list-groups", func(ctx iris.Context) {
lg, err := madmClnt.ListGroups()
var res = bodyResHandler(ctx, err, lg)
Expand Down

0 comments on commit 6f1227f

Please sign in to comment.