Documentation ¶
Index ¶
- func Delete(c *golangsdk.ServiceClient, appId string) *golangsdk.ErrResult
- func DeleteConfig(c *golangsdk.ServiceClient, appId, envId string) *golangsdk.ErrResult
- type Application
- func Create(c *golangsdk.ServiceClient, opts CreateOpts) (*Application, error)
- func ExtractApplications(r pagination.Page) ([]Application, error)
- func Get(c *golangsdk.ServiceClient, appId string) (*Application, error)
- func List(c *golangsdk.ServiceClient, opts ListOpts) ([]Application, error)
- func Update(c *golangsdk.ServiceClient, appId string, opts UpdateOpts) (*Application, error)
- func UpdateConfig(c *golangsdk.ServiceClient, appId, envId string, config Configuration) (*Application, error)
- type ApplicationPage
- type ConfigOpts
- type ConfigResp
- type Configuration
- type CreateOpts
- type ListConfigOpts
- type ListOpts
- type UpdateOpts
- type Variable
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Delete ¶
func Delete(c *golangsdk.ServiceClient, appId string) *golangsdk.ErrResult
Delete is a method to remove an existing application.
func DeleteConfig ¶
func DeleteConfig(c *golangsdk.ServiceClient, appId, envId string) *golangsdk.ErrResult
DeleteConfig is a method to remove an existing configuration or some variables from a specified environment.
Types ¶
type Application ¶
type Application struct { // The application ID. ID string `json:"id"` // The application name. Name string `json:"name"` // The application description. Description string `json:"description"` // The creator. Creator string `json:"creator"` // Thec project ID. ProjectId string `json:"project_id"` // The enterprise project ID. EnterpriseProjectId string `json:"enterprise_project_id"` // The creation time. CreatedAt int `json:"create_time"` // The update time. UpdatedAt int `json:"update_time"` // Whether to enable the unified model. UnifiedModel string `json:"unified_model"` }
Application is the structure that represents the detail of the ServiceStage application.
func Create ¶
func Create(c *golangsdk.ServiceClient, opts CreateOpts) (*Application, error)
Create is a method to create a new ServiceStage application using create option.
func ExtractApplications ¶
func ExtractApplications(r pagination.Page) ([]Application, error)
ExtractApplications is a method to extract the list of application details for ServiceStage service.
func Get ¶
func Get(c *golangsdk.ServiceClient, appId string) (*Application, error)
Get is a method to obtain the details of a specified ServiceStage application using its ID.
func List ¶
func List(c *golangsdk.ServiceClient, opts ListOpts) ([]Application, error)
List is a method to query the list of the environments using given opts.
func Update ¶
func Update(c *golangsdk.ServiceClient, appId string, opts UpdateOpts) (*Application, error)
Update is a method to update the current dependency configuration.
func UpdateConfig ¶
func UpdateConfig(c *golangsdk.ServiceClient, appId, envId string, config Configuration) (*Application, error)
UpdateConfig is a method to add or remove the basic resources and the optional resources.
type ApplicationPage ¶
type ApplicationPage struct {
pagination.OffsetPageBase
}
ApplicationPage is a single page maximum result representing a query by offset page.
type ConfigOpts ¶
type ConfigOpts struct { // The environment ID. EnvId string `json:"environment_id" required:"true"` // The application configurations, such as public environment variables. Configuration Configuration `json:"configuration" required:"true"` }
ConfigOpts is a structure required bu the UpdateConfig method to bind or unbind the resources.
type ConfigResp ¶
type ConfigResp struct { // The application ID. ApplicationId string `json:"application_id"` // The environment ID. EnvironmentId string `json:"environment_id"` // The configurations of the application. Configuration Configuration `json:"configuration"` }
ConfigResp is the structure that represents all configurations in the specified environment.
func ListConfig ¶
func ListConfig(c *golangsdk.ServiceClient, appId string, opts ListConfigOpts) ([]ConfigResp, error)
ListConfig is a method to query the list of configurations from the specified application.
type Configuration ¶
type Configuration struct { // The environment variables of the application. // If the names of multiple environment variables are the same, only the last environment variable takes effact. EnvVariables []Variable `json:"env,omitempty"` }
Configuration is an object specifying the configuration of the application for a specified environment.
type CreateOpts ¶
type CreateOpts struct { // Specified the application name with 2 to 64 characters long. // It consists of English letters, numbers, underscores (-), and underscores (_). // It must start with an English letter and end with an English letter or number. Name string `json:"name" required:"true"` // Specified the application description. // The description can contain a maximum of 96 characters. Description *string `json:"description,omitempty"` // Specified the enterprise project ID. EnterpriseProjectId string `json:"enterprise_project_id,omitempty"` }
CreateOpts is the structure required by the Create method to create a new application.
type ListConfigOpts ¶
type ListConfigOpts struct { // The environment ID. If this parameter is not specified, all environment are queried. EnvId string `q:"environment_id"` }
ListConfigOpts allows to filter list configurations using given parameters.
type ListOpts ¶
type ListOpts struct { // Number of records to be queried. // Value range: 0–100. // Default value: 1000, indicating that a maximum of 1000 records can be queried and all records are displayed on // the same page. Limit int `q:"limit"` // The offset number. Offset int `q:"offset"` // Sorting field. By default, query results are sorted by creation time. // The following enumerated values are supported: create_time, name, and update_time. OrderBy string `q:"order_by"` // Descending or ascending order. Default value: desc. Order string `q:"order"` }
ListOpts allows to filter list data using given parameters.
type UpdateOpts ¶
type UpdateOpts struct { // Specified the application description. // The description can contain a maximum of 96 characters. Description *string `json:"description,omitempty"` // Specified the environment name with 2 to 64 characters long. // It consists of English letters, numbers, underscores (-), and underscores (_). // It must start with an English letter and end with an English letter or number. Name string `json:"name,omitempty"` }
UpdateOpts is the structure required by the Update method to update the configuration of the specified environment.
type Variable ¶
type Variable struct { // The name of the environment variable. // The name contains 1 to 64 characters, including letters, digits, underscores (_), hyphens (-) and dots (.), and // cannot start with a digit or dot. Name string `json:"name" required:"true"` // The value of the environment variables. Value string `json:"value" required:"true"` }
Variable is an object specifying the key/value pair of the environment variable.