Documentation ¶
Index ¶
- type APIServer
- func (s *APIServer) AddCapabilityCenter(c *gin.Context)
- func (s *APIServer) AddCapabilityIntoCluster(c *gin.Context)
- func (s *APIServer) AttachTrait(c *gin.Context)
- func (s *APIServer) CreateApplication(c *gin.Context)
- func (s *APIServer) CreateEnv(c *gin.Context)
- func (s *APIServer) CreateScope(c *gin.Context)
- func (s *APIServer) DeleteApps(c *gin.Context)
- func (s *APIServer) DeleteCapabilityCenter(c *gin.Context)
- func (s *APIServer) DeleteComponent(c *gin.Context)
- func (s *APIServer) DeleteEnv(c *gin.Context)
- func (s *APIServer) DeleteScope(c *gin.Context)
- func (s *APIServer) DetachTrait(c *gin.Context)
- func (s *APIServer) DoAttachTrait(c context.Context, body apis.TraitBody) (string, error)
- func (s *APIServer) DoDetachTrait(c context.Context, envName string, traitType string, componentName string, ...) (string, error)
- func (s *APIServer) GetApp(c *gin.Context)
- func (s *APIServer) GetComponent(c *gin.Context)
- func (s *APIServer) GetDefinition(c *gin.Context)
- func (s *APIServer) GetEnv(c *gin.Context)
- func (s *APIServer) GetScope(c *gin.Context)
- func (s *APIServer) GetTrait(c *gin.Context)
- func (s *APIServer) GetVersion(c *gin.Context)
- func (s *APIServer) GetWorkload(c *gin.Context)
- func (s *APIServer) Launch(errChan chan<- error)
- func (s *APIServer) ListApps(c *gin.Context)
- func (s *APIServer) ListCapabilities(c *gin.Context)
- func (s *APIServer) ListCapabilityCenters(c *gin.Context)
- func (s *APIServer) ListEnv(c *gin.Context)
- func (s *APIServer) ListScope(c *gin.Context)
- func (s *APIServer) ListTrait(c *gin.Context)
- func (s *APIServer) ListWorkload(c *gin.Context)
- func (s *APIServer) RemoveCapabilityFromCluster(c *gin.Context)
- func (s *APIServer) SetEnv(c *gin.Context)
- func (s *APIServer) Shutdown(ctx context.Context) error
- func (s *APIServer) SwaggerJSON(c *gin.Context)
- func (s *APIServer) SyncCapabilityCenter(c *gin.Context)
- func (s *APIServer) UpdateApps(c *gin.Context)
- func (s *APIServer) UpdateEnv(c *gin.Context)
- func (s *APIServer) UpdateScope(c *gin.Context)
- func (s *APIServer) UpdateWorkload(c *gin.Context)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIServer ¶
APIServer run a restful API server for dashboard
func (*APIServer) AddCapabilityCenter ¶ added in v0.1.1
AddCapabilityCenter adds and synchronizes a capability center from remote
func (*APIServer) AddCapabilityIntoCluster ¶ added in v0.1.1
AddCapabilityIntoCluster adds specific capability into cluster
func (*APIServer) AttachTrait ¶ added in v0.1.1
AttachTrait attaches a trait to a component
func (*APIServer) CreateApplication ¶ added in v0.3.1
CreateApplication creates an application @tags applications @ID CreateApplication @Summary creates an application @Param envName path string true "environment name" @Param body body appfile.AppFile true "application parameters" @Success 200 {object} apis.Response{code=int,data=string} @Failure 500 {object} apis.Response{code=int,data=string} @Router /envs/{envName}/apps [post]
func (*APIServer) CreateEnv ¶ added in v0.1.1
CreateEnv creates an environment @Tags environments @ID createEnvironment @Success 200 {object} apis.Response{code=int,data=string} @Failure 500 {object} apis.Response{code=int,data=string} @Router /envs/ [post]
func (*APIServer) CreateScope ¶ added in v0.1.1
CreateScope creates a scope
func (*APIServer) DeleteApps ¶ added in v0.1.1
DeleteApps deletes an application by the namespaced name in the gin.Context
func (*APIServer) DeleteCapabilityCenter ¶ added in v0.1.1
DeleteCapabilityCenter deltes a capability cernter already added
func (*APIServer) DeleteComponent ¶ added in v0.1.1
DeleteComponent deletes a component from cluster
func (*APIServer) DeleteEnv ¶ added in v0.1.1
DeleteEnv delete an environment @Tags environments @ID deleteEnvironment @Param envName path string true "envName" @Success 200 {object} apis.Response{code=int,data=string} @Failure 500 {object} apis.Response{code=int,data=string} @Router /envs/{envName} [delete]
func (*APIServer) DeleteScope ¶ added in v0.1.1
DeleteScope deletes a scope
func (*APIServer) DetachTrait ¶ added in v0.1.1
DetachTrait detaches a trait from a component
func (*APIServer) DoAttachTrait ¶ added in v0.1.1
DoAttachTrait executes attaching trait operation
func (*APIServer) DoDetachTrait ¶ added in v0.1.1
func (s *APIServer) DoDetachTrait(c context.Context, envName string, traitType string, componentName string, appName string, staging bool) (string, error)
DoDetachTrait executes detaching trait operation
func (*APIServer) GetApp ¶ added in v0.1.1
GetApp requests an application by the namespaced name in the gin.Context
func (*APIServer) GetComponent ¶ added in v0.1.1
GetComponent gets a comoponent from cluster
func (*APIServer) GetDefinition ¶ added in v0.3.0
GetDefinition gets OpenAPI schema from Cue section of a WorkloadDefinition/TraitDefinition @tags definitions @ID GetDefinition @Summary gets OpenAPI schema from Cue section of a WorkloadDefinition/TraitDefinition @Param definitionName path string true "name of workload type or trait" @Success 200 {object} apis.Response{code=int,data=string} @Failure 500 {object} apis.Response{code=int,data=string} @Router /definitions/{definitionName} [get]
func (*APIServer) GetEnv ¶ added in v0.1.1
GetEnv gets an environment @Tags environments @ID getEnvironment @Param envName path string true "envName" @Success 200 {object} apis.Response{code=int,data=[]apis.Environment} @Failure 500 {object} apis.Response{code=int,data=string} @Router /envs/{envName} [get]
func (*APIServer) GetVersion ¶ added in v0.1.1
GetVersion will return version for dashboard
func (*APIServer) GetWorkload ¶ added in v0.1.1
GetWorkload gets a workload by name
func (*APIServer) ListApps ¶ added in v0.1.1
ListApps requests a list of application by the namespace in the gin.Context @tags applications @ID ListApplications @Summary list all applications @Param envName path string true "environment name" @Success 200 {object} apis.Response{code=int,data=[]apis.ApplicationMeta} @Failure 500 {object} apis.Response{code=int,data=string} @Router /envs/{envName}/apps [get]
func (*APIServer) ListCapabilities ¶ added in v0.1.1
ListCapabilities lists capabilities of a capability center
func (*APIServer) ListCapabilityCenters ¶ added in v0.1.1
ListCapabilityCenters list all added capability centers
func (*APIServer) ListEnv ¶ added in v0.1.1
ListEnv lists all environments @Tags environments @ID listEnvironments @Accept json @Produce json @success 200 {object} apis.Response{code=int,data=[]apis.Environment} @Failure 500 {object} apis.Response{code=int,data=string} @Router /envs/ [get]
func (*APIServer) ListWorkload ¶ added in v0.1.1
ListWorkload lists all workloads in the cluster
func (*APIServer) RemoveCapabilityFromCluster ¶ added in v0.1.1
RemoveCapabilityFromCluster remove a specific capability from cluster
func (*APIServer) SetEnv ¶ added in v0.1.1
SetEnv sets an environment @Tags environments @ID setEnvironment @Param envName path string true "envName" @Success 200 {object} apis.Response{code=int,data=string} @Failure 500 {object} apis.Response{code=int,data=string} @Router /envs/{envName} [patch]
func (*APIServer) SwaggerJSON ¶ added in v0.2.2
SwaggerJSON use /swagger.json and /doc.json 404
func (*APIServer) SyncCapabilityCenter ¶ added in v0.1.1
SyncCapabilityCenter synchronizes capability center from remote
func (*APIServer) UpdateApps ¶ added in v0.1.1
UpdateApps is placeholder for updating applications
func (*APIServer) UpdateEnv ¶ added in v0.1.1
UpdateEnv updates an environment @Tags environments @ID updateEnvironment @Param envName path string true "envName" @Param body body apis.EnvironmentBody true "envName" @Success 200 {object} apis.Response{code=int,data=string} @Failure 500 {object} apis.Response{code=int,data=string} @Router /envs/{envName} [put]
func (*APIServer) UpdateScope ¶ added in v0.1.1
UpdateScope updates a scope
func (*APIServer) UpdateWorkload ¶ added in v0.1.1
UpdateWorkload updates a workload