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) 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 ¶
AddCapabilityCenter adds and synchronizes a capability center from remote
func (*APIServer) AddCapabilityIntoCluster ¶
AddCapabilityIntoCluster adds specific capability into cluster
func (*APIServer) AttachTrait ¶
AttachTrait attaches a trait to a component
func (*APIServer) CreateApplication ¶
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 ¶
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 ¶
CreateScope creates a scope
func (*APIServer) DeleteApps ¶
DeleteApps deletes an application by the namespaced name in the gin.Context
func (*APIServer) DeleteCapabilityCenter ¶
DeleteCapabilityCenter deltes a capability cernter already added
func (*APIServer) DeleteComponent ¶
DeleteComponent deletes a component from cluster
func (*APIServer) DeleteEnv ¶
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 ¶
DeleteScope deletes a scope
func (*APIServer) DetachTrait ¶
DetachTrait detaches a trait from a component
func (*APIServer) GetComponent ¶
GetComponent gets a comoponent from cluster
func (*APIServer) GetDefinition ¶
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 ¶
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 ¶
GetVersion will return version for dashboard
func (*APIServer) GetWorkload ¶
GetWorkload gets a workload by name
func (*APIServer) ListApps ¶
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 ¶
ListCapabilities lists capabilities of a capability center
func (*APIServer) ListCapabilityCenters ¶
ListCapabilityCenters list all added capability centers
func (*APIServer) ListEnv ¶
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 ¶
ListWorkload lists all workloads in the cluster
func (*APIServer) RemoveCapabilityFromCluster ¶
RemoveCapabilityFromCluster remove a specific capability from cluster
func (*APIServer) SetEnv ¶
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 ¶
SwaggerJSON use /swagger.json and /doc.json 404
func (*APIServer) SyncCapabilityCenter ¶
SyncCapabilityCenter synchronizes capability center from remote
func (*APIServer) UpdateApps ¶
UpdateApps is placeholder for updating applications
func (*APIServer) UpdateEnv ¶
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 ¶
UpdateScope updates a scope
func (*APIServer) UpdateWorkload ¶
UpdateWorkload updates a workload