Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var RequestOpts golangsdk.RequestOpts = golangsdk.RequestOpts{ MoreHeaders: map[string]string{"Content-Type": "application/json", "X-Language": "en-us"}, }
Functions ¶
This section is empty.
Types ¶
type Configuration ¶
type Configuration struct {
//Configuration ID
Id string `json:"id"`
//Configuration Name
Name string `json:"name"`
//Database version Name
DatastoreVersionName string `json:"datastore_version_name"`
//Database Name
DatastoreName string `json:"datastore_name"`
//Configuration Description
Description string `json:"description"`
//Configuration Parameters
Parameters []Parameter `json:"configuration_parameters"`
}
type ConfigurationCreate ¶
type ConfigurationCreate struct {
//Configuration ID
Id string `json:"id"`
//Configuration Name
Name string `json:"name"`
//Database version Name
DatastoreVersionName string `json:"datastore_version_name"`
//Database Name
DatastoreName string `json:"datastore_name"`
//Configuration Description
Description string `json:"description"`
}
type CreateOpts ¶
type CreateOpts struct {
//Configuration Name
Name string `json:"name" required:"true"`
//Configuration Description
Description string `json:"description,omitempty"`
//Configuration Values
Values map[string]string `json:"values,omitempty"`
//Database Object
DataStore DataStore `json:"datastore" required:"true"`
}
CreateOpts contains all the values needed to create a new configuration.
func (CreateOpts) ToConfigCreateMap ¶
func (opts CreateOpts) ToConfigCreateMap() (map[string]interface{}, error)
ToConfigCreateMap builds a create request body from CreateOpts.
type CreateOptsBuilder ¶
CreateOptsBuilder allows extensions to add additional parameters to the Create request.
type CreateResult ¶
type CreateResult struct {
golangsdk.Result
}
CreateResult represents the result of a create operation. Call its Extract method to interpret it as a Configuration.
func Create ¶
func Create(c *golangsdk.ServiceClient, opts CreateOptsBuilder) (r CreateResult)
Create will create a new Config based on the values in CreateOpts.
func (CreateResult) Extract ¶
func (r CreateResult) Extract() (*ConfigurationCreate, error)
Extract is a function that accepts a result and extracts a configuration.
func (CreateResult) ExtractInto ¶
func (r CreateResult) ExtractInto(v interface{}) error
type DeleteResult ¶
type DeleteResult struct {
golangsdk.ErrResult
}
DeleteResult represents the result of a delete operation. Call its ExtractErr method to determine if the request succeeded or failed.
func Delete ¶
func Delete(c *golangsdk.ServiceClient, id string) (r DeleteResult)
Delete will permanently delete a particular Configuration based on its unique ID.
type GetResult ¶
type GetResult struct {
golangsdk.Result
}
GetResult represents the result of a get operation. Call its Extract method to interpret it as a Configuration.
func (GetResult) Extract ¶
func (r GetResult) Extract() (*Configuration, error)
Extract is a function that accepts a result and extracts a configuration.
type Parameter ¶
type Parameter struct {
//Parameter Name
Name string `json:"name"`
//Parameter value
Value string `json:"value"`
//Whether a restart is required
RestartRequired bool `json:"restart_required"`
//Whether the parameter is read-only
ReadOnly bool `json:"readonly"`
//Parameter value range
ValueRange string `json:"value_range"`
//Parameter type
Type string `json:"type"`
//Parameter description
Description string `json:"description"`
}
type UpdateOpts ¶
type UpdateOpts struct {
//Configuration Name
Name string `json:"name,omitempty"`
//Configuration Description
Description string `json:"description,omitempty"`
//Configuration Values
Values map[string]string `json:"values,omitempty"`
}
UpdateOpts contains all the values needed to update a Configuration.
func (UpdateOpts) ToConfigUpdateMap ¶
func (opts UpdateOpts) ToConfigUpdateMap() (map[string]interface{}, error)
ToConfigUpdateMap builds a update request body from UpdateOpts.
type UpdateOptsBuilder ¶
UpdateOptsBuilder allows extensions to add additional parameters to the Update request.
type UpdateResult ¶
type UpdateResult struct {
golangsdk.ErrResult
}
UpdateResult represents the result of a update operation.
func Update ¶
func Update(c *golangsdk.ServiceClient, id string, opts UpdateOptsBuilder) (r UpdateResult)
Update accepts a UpdateOpts struct and uses the values to update a Configuration.The response code from api is 200