Skip to content

Commit

Permalink
update deps and api specs
Browse files Browse the repository at this point in the history
  • Loading branch information
rzrbld committed May 18, 2020
1 parent cf27dda commit 618183d
Show file tree
Hide file tree
Showing 6 changed files with 397 additions and 47 deletions.
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,9 @@ Here is a Web UI for this API - [adminio-ui](https://github.com/rzrbld/adminio-u

![Docker hub stats](https://img.shields.io/docker/pulls/rzrbld/adminio-api?style=flat-square) ![GitHub License](https://img.shields.io/github/license/rzrbld/adminio-api?style=flat-square)

## OpenAPI v3

### Breaking changes in 0.9 version

- env renamed: API_HOST_PORT > ADMINIO_HOST_PORT
- API version v1 is depicated and soon will be removed.
see OpenAPI v3 specs at `openAPI/openapi_v3.yaml` or [html version](https://rzrbld.github.io/openapi/)

### Run full stack demo
obtain [docker-compose.yml](https://raw.githubusercontent.com/rzrbld/adminio-ui/master/docker-compose.yml) from [adminio-ui](https://github.com/rzrbld/adminio-ui) repository. And run it:
Expand All @@ -34,6 +32,9 @@ docker run -d \
```

### Monitoring
Adminio-API expose metrics for [Prometheus](https://prometheus.io/) at `/metrics` if `ADMINIO_METRICS_ENABLE` is set to `true`.

### Run manually
- [start](https://docs.min.io/) minio server
- set env variables
Expand Down Expand Up @@ -78,6 +79,7 @@ docker run -d \
- slack
- wso2

### example config

### Example config
- prometheus config for adminio metrics: `examples/prometheus.yml`
- bucket lifecycle: `examples/lifecycle.xml`
380 changes: 380 additions & 0 deletions openAPI/openapi.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion openAPI/openapi_v3.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
openapi: "3.0.0"
info:
description: "Adminio API"
version: "1.0.0"
version: "2.0.0"
title: "Adminio API"
contact:
name: "rzrbld at github.com"
Expand Down
6 changes: 3 additions & 3 deletions src/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ require (
github.com/iris-contrib/middleware/cors v0.0.0-20191219204441-78279b78a367
github.com/iris-contrib/middleware/prometheus v0.0.0-20191219204441-78279b78a367
github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88 // indirect
github.com/kataras/golog v0.0.13 // indirect
github.com/kataras/golog v0.0.15 // indirect
github.com/kataras/iris/v12 v12.1.8
github.com/klauspost/compress v1.10.5 // indirect
github.com/kr/text v0.2.0 // indirect
github.com/markbates/goth v1.64.0
github.com/mattn/go-colorable v0.1.6 // indirect
github.com/minio/minio v0.0.0-20200514221824-fe8d33452bb9
github.com/minio/minio v0.0.0-20200518183557-a3f41c70498c
github.com/minio/minio-go/v6 v6.0.55
github.com/montanaflynn/stats v0.6.3 // indirect
github.com/moul/http2curl v1.0.0 // indirect
Expand All @@ -48,7 +48,7 @@ require (
github.com/yudai/pp v2.0.1+incompatible // indirect
golang.org/x/crypto v0.0.0-20200510223506-06a226fb4e37 // indirect
golang.org/x/net v0.0.0-20200513185701-a91f0712d120 // indirect
golang.org/x/sys v0.0.0-20200513112337-417ce2331b5c // indirect
golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9 // indirect
google.golang.org/appengine v1.6.6 // indirect
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f // indirect
gopkg.in/ini.v1 v1.56.0 // indirect
Expand Down
6 changes: 6 additions & 0 deletions src/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,8 @@ github.com/kataras/golog v0.0.10 h1:vRDRUmwacco/pmBAm8geLn8rHEdc+9Z4NAr5Sh7TG/4=
github.com/kataras/golog v0.0.10/go.mod h1:yJ8YKCmyL+nWjERB90Qwn+bdyBZsaQwU3bTVFgkFIp8=
github.com/kataras/golog v0.0.13 h1:zWzk56eWBkdV4kPq3Koh8PS4pUfNQUfHuLc3YACpM7c=
github.com/kataras/golog v0.0.13/go.mod h1:lMz0gaBYitlMKvVn2Ykw0WpRoqHrq1kjWId/iLrH67I=
github.com/kataras/golog v0.0.15 h1:NPpVJt7Usc741IahumyieIj6j4q0WbwCq+YaLcBWTqc=
github.com/kataras/golog v0.0.15/go.mod h1:lMz0gaBYitlMKvVn2Ykw0WpRoqHrq1kjWId/iLrH67I=
github.com/kataras/iris/v12 v12.1.2/go.mod h1:x8XU9FcsqdBvFyDA9brryw7Px8UZ8lquXwVaYKRzBBc=
github.com/kataras/iris/v12 v12.1.8 h1:O3gJasjm7ZxpxwTH8tApZsvf274scSGQAUpNe47c37U=
github.com/kataras/iris/v12 v12.1.8/go.mod h1:LMYy4VlP67TQ3Zgriz8RE2h2kMZV2SgMYbq3UhfoFmE=
Expand Down Expand Up @@ -329,6 +331,8 @@ github.com/minio/highwayhash v1.0.0/go.mod h1:xQboMTeM9nY9v/LlAOxFctujiv5+Aq2hR5
github.com/minio/lsync v1.0.1/go.mod h1:tCFzfo0dlvdGl70IT4IAK/5Wtgb0/BrTmo/jE8pArKA=
github.com/minio/minio v0.0.0-20200514221824-fe8d33452bb9 h1:dFEqJyuuwQ+VeUm9pJ0w1UoxyrcQMxrLgyKRaZwk3FI=
github.com/minio/minio v0.0.0-20200514221824-fe8d33452bb9/go.mod h1:wymaytM/HELuwdz7BGZHmQ3XKq2SxPsLeGxyOCaCLiA=
github.com/minio/minio v0.0.0-20200518183557-a3f41c70498c h1:D1oiteaehouuJUb6xEw7+dBiHFF+iKZp+nzGN7BEFXw=
github.com/minio/minio v0.0.0-20200518183557-a3f41c70498c/go.mod h1:wymaytM/HELuwdz7BGZHmQ3XKq2SxPsLeGxyOCaCLiA=
github.com/minio/minio-go/v6 v6.0.53 h1:8jzpwiOzZ5Iz7/goFWqNZRICbyWYShbb5rARjrnSCNI=
github.com/minio/minio-go/v6 v6.0.53/go.mod h1:DIvC/IApeHX8q1BAMVCXSXwpmrmM+I+iBvhvztQorfI=
github.com/minio/minio-go/v6 v6.0.55-0.20200425081427-89eebdef2af0/go.mod h1:KQMM+/44DSlSGSQWSfRrAZ12FVMmpWNuX37i2AX0jfI=
Expand Down Expand Up @@ -632,6 +636,8 @@ golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20200420163511-1957bb5e6d1f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200513112337-417ce2331b5c h1:kISX68E8gSkNYAFRFiDU8rl5RIn1sJYKYb/r2vMLDrU=
golang.org/x/sys v0.0.0-20200513112337-417ce2331b5c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9 h1:YTzHMGlqJu67/uEo1lBv0n3wBXhXNeUbB1XfN2vmTm0=
golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.1-0.20181227161524-e6919f6577db/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
Expand Down
38 changes: 0 additions & 38 deletions src/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,44 +79,6 @@ func main() {
v1auth.Get("/callback", hdl.AuthCallback)
}

//deprecated, will be removed
v1 := app.Party("/api/v1", crs).AllowMethods(iris.MethodOptions)
{
v1.Get("/list-buckets", hdl.BuckList)
v1.Post("/make-bucket", hdl.BuckMake)
v1.Get("/list-buckets-extended", hdl.BuckListExtended)
v1.Post("/delete-bucket", hdl.BuckDelete)
v1.Post("/get-bucket-lifecycle", hdl.BuckGetLifecycle)
v1.Post("/set-bucket-lifecycle", hdl.BuckSetLifecycle)
v1.Post("/get-bucket-events", hdl.BuckGetEvents)
v1.Post("/set-bucket-events", hdl.BuckSetEvents)
v1.Post("/remove-bucket-events", hdl.BuckRemoveEvents)

v1.Get("/list-users", hdl.UsrList)
v1.Post("/set-status-user", hdl.UsrSetStats)
v1.Post("/delete-user", hdl.UsrDelete)
v1.Post("/add-user", hdl.UsrAdd)
v1.Post("/create-user-extended", hdl.UsrCreateExtended)
v1.Post("/set-user", hdl.UsrSet)

v1.Get("/list-policies", hdl.PolList)
v1.Post("/add-policy", hdl.PolAdd)
v1.Post("/delete-policy", hdl.PolDelete)
v1.Post("/set-policy", hdl.PolSet)

v1.Post("/set-status-group", hdl.GrSetStatus)
v1.Post("/get-description-group", hdl.GrSetDescription)
v1.Post("/update-members-group", hdl.GrUpdateMembers)
v1.Get("/list-groups", hdl.GrList)

v1.Get("/server-info", hdl.ServerInfo)
v1.Get("/disk-info", hdl.DiskInfo)

v1.Post("/get-kv", hdl.KvGet)

}
// -------------------------------------------

v2 := app.Party("/api/v2", crs).AllowMethods(iris.MethodOptions)
{
v2.Get("/buckets/list", hdl.BuckList)
Expand Down

0 comments on commit 618183d

Please sign in to comment.