oc-datacenter/controllers/minio.go

22 lines
699 B
Go

package controllers
import beego "github.com/beego/beego/v2/server/web"
type MinioController struct {
beego.Controller
}
// @Title CreateServiceAccounnt
// @Description Add a new ServiceAccount to a Minio server using its ID and an execution ID
// @Success 200
// @Param executions path string true "The executionsID of the execution"
// @Param minioId path string true "The ID of the Minio you want to reach"
// @router /minio/:minioId/:executions
func (m *MinioController) CreateServiceAccount() {
executionsId := m.Ctx.Input.Param(":executions")
minioId := m.Ctx.Input.Param(":minioId")
m.Data["json"] = map[string]interface{}{"exec": executionsId, "minioId": minioId}
m.ServeJSON()
}