configurations

package
v0.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 17, 2020 License: Apache-2.0 Imports: 1 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
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

type CreateOptsBuilder interface {
	ToConfigCreateMap() (map[string]interface{}, error)
}

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 DataStore

type DataStore struct {
	//DB Engine
	Type string `json:"type" required:"true"`
	//DB version
	Version string `json:"version" required:"true"`
}

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 Get

func Get(c *golangsdk.ServiceClient, id string) (r GetResult)

Get retrieves a particular Configuration based on its unique ID.

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

type UpdateOptsBuilder interface {
	ToConfigUpdateMap() (map[string]interface{}, error)
}

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL