From 6f1227f2dc8fdd8fb14e72a0f818ed9b508c6983 Mon Sep 17 00:00:00 2001 From: rzrbld Date: Sun, 8 Mar 2020 01:41:23 +0300 Subject: [PATCH] add diskInfo with bucket sizes --- src/main.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/main.go b/src/main.go index 2d2d0a2..8461430 100644 --- a/src/main.go +++ b/src/main.go @@ -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") @@ -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)