Documentation ¶
Index ¶
- Variables
- func CreateAction(req *http.Request) (interface{}, error)
- func DeleteAction(req *http.Request) (interface{}, error)
- func ListAction(req *http.Request) (interface{}, error)
- func OneAction(req *http.Request) (interface{}, error)
- func UpdateAction(req *http.Request) (interface{}, error)
- type CreateParam
- type OneData
- type OneParam
- type UpdateParam
Constants ¶
This section is empty.
Variables ¶
var CreateEndpoint = &xreq.Endpoint{ Path: "/products/{product_name}/sub-clusters", Method: http.MethodPost, Handler: xreq.Convert(CreateAction), Authorizer: iauth.FAP(iauth.FeatureSubCluster, iauth.ActionCreate), }
CreateRoute route AUTO GEN BY ctrl, MODIFY AS U NEED
var DeleteEndpoint = &xreq.Endpoint{ Path: "/products/{product_name}/sub-clusters/{sub_cluster_name}", Method: http.MethodDelete, Handler: xreq.Convert(DeleteAction), Authorizer: iauth.FAP(iauth.FeatureSubCluster, iauth.ActionDelete), }
DeleteRoute route AUTO GEN BY ctrl, MODIFY AS U NEED
var Endpoints = []*xreq.Endpoint{ OneEndpoint, ListEndpoint, DeleteEndpoint, UpdateEndpoint, CreateEndpoint, }
var ListEndpoint = &xreq.Endpoint{ Path: "/products/{product_name}/sub-clusters", Method: http.MethodGet, Handler: xreq.Convert(ListAction), Authorizer: iauth.FAP(iauth.FeatureSubCluster, iauth.ActionRead), }
ListRoute route AUTO GEN BY ctrl, MODIFY AS U NEED
var OneEndpoint = &xreq.Endpoint{ Path: "/products/{product_name}/sub-clusters/{sub_cluster_name}", Method: http.MethodGet, Handler: xreq.Convert(OneAction), Authorizer: iauth.FAP(iauth.FeatureSubCluster, iauth.ActionRead), }
OneRoute route AUTO GEN BY ctrl, MODIFY AS U NEED
var UpdateEndpoint = &xreq.Endpoint{ Path: "/products/{product_name}/sub-clusters/{sub_cluster_name}", Method: http.MethodPatch, Handler: xreq.Convert(UpdateAction), Authorizer: iauth.FAP(iauth.FeatureSubCluster, iauth.ActionUpdate), }
UpdateRoute route AUTO GEN BY ctrl, MODIFY AS U NEED
Functions ¶
func CreateAction ¶
CreateAction action AUTO GEN BY ctrl, MODIFY AS U NEED
func DeleteAction ¶
DeleteAction action AUTO GEN BY ctrl, MODIFY AS U NEED
func ListAction ¶
ListAction action AUTO GEN BY ctrl, MODIFY AS U NEED
func UpdateAction ¶
UpdateAction action AUTO GEN BY ctrl, MODIFY AS U NEED
Types ¶
type CreateParam ¶
type CreateParam struct { Name *string `json:"name" uri:"name" validate:"required,min=2"` InstancePool *string `json:"instance_pool" uri:"instance_pool" validate:"required,min=2"` Description *string `json:"description" uri:"description" validate:"required,min=2"` }
CreateParam Request Param AUTO GEN BY ctrl, MODIFY AS U NEED
type OneData ¶
type OneData struct { Name string `json:"name" uri:"name"` InstancePool string `json:"instance_pool" uri:"instance_pool"` Description string `json:"description" uri:"description"` Ready bool `json:"ready" uri:"ready"` ProductName string `json:"product_name,omitempty"` }
OneData Request Param AUTO GEN BY ctrl, MODIFY AS U NEED
func CreateProcess ¶
func CreateProcess(req *http.Request, param *CreateParam) (*OneData, error)
type OneParam ¶
type OneParam struct {
SubClusterName string `json:"sub_cluster_name" uri:"sub_cluster_name" validate:"required,min=2"`
}
OneParam Request Param AUTO GEN BY ctrl, MODIFY AS U NEED
type UpdateParam ¶
type UpdateParam struct { Name *string `json:"name" uri:"name" validate:"min=2"` Description *string `json:"description" uri:"description" validate:"omitempty,min=2"` SubClusterName *string `uri:"sub_cluster_name" validate:"required,min=2"` }
UpdateParam Request Param AUTO GEN BY ctrl, MODIFY AS U NEED