Documentation ¶
Index ¶
- type CreateOpts
- type CreateOptsBuilder
- type CreateResult
- type DataStore
- type ErrorResult
- func Delete(client *golangsdk.ServiceClient, clusterId, id string) (r ErrorResult)
- func Disable(client *golangsdk.ServiceClient, clusterId string) (r ErrorResult)
- func Enable(client *golangsdk.ServiceClient, clusterId string) (r ErrorResult)
- func PolicyCreate(client *golangsdk.ServiceClient, opts CreateOptsBuilder, clusterId string) (r ErrorResult)
- type ListResult
- type Policy
- type PolicyCreateOpts
- type PolicyResult
- type Snapshot
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateOpts ¶
type CreateOpts struct { Name string `json:"name" required:"true"` Description string `json:"description,omitempty"` Indices string `json:"indices,omitempty"` }
CreateOpts contains options for creating a snapshot. This object is passed to the snapshots.Create function.
func (CreateOpts) ToSnapshotCreateMap ¶
func (opts CreateOpts) ToSnapshotCreateMap() (map[string]interface{}, error)
ToSnapshotCreateMap assembles a request body based on the contents of a CreateOpts.
type CreateOptsBuilder ¶
CreateOptsBuilder allows extensions to add additional parameters to the Create request.
type CreateResult ¶
type CreateResult struct {
// contains filtered or unexported fields
}
CreateResult contains the response body and error from a Create request.
func Create ¶
func Create(client *golangsdk.ServiceClient, opts CreateOptsBuilder, clusterId string) (r CreateResult)
Create will create a new snapshot based on the values in CreateOpts. To extract the result from the response, call the Extract method on the CreateResult.
func (CreateResult) Extract ¶
func (r CreateResult) Extract() (*Snapshot, error)
Extract will get the Snapshot object out of the CreateResult object.
type ErrorResult ¶
type ErrorResult struct {
golangsdk.ErrResult
}
ErrorResult contains the response body and error from a request.
func Delete ¶
func Delete(client *golangsdk.ServiceClient, clusterId, id string) (r ErrorResult)
Delete will delete the existing Snapshot ID with the provided ID.
func Disable ¶
func Disable(client *golangsdk.ServiceClient, clusterId string) (r ErrorResult)
Disable will disable the Snapshot function with the provided ID.
func Enable ¶
func Enable(client *golangsdk.ServiceClient, clusterId string) (r ErrorResult)
Enable will enable the Snapshot function with the provided ID.
func PolicyCreate ¶
func PolicyCreate(client *golangsdk.ServiceClient, opts CreateOptsBuilder, clusterId string) (r ErrorResult)
PolicyCreate will create a new snapshot policy based on the values in PolicyCreateOpts.
type ListResult ¶
type ListResult struct {
// contains filtered or unexported fields
}
ListResult contains the response body and error from a List request.
func List ¶
func List(client *golangsdk.ServiceClient, clusterId string) (r ListResult)
List retrieves the Snapshots with the provided ID. To extract the Snapshot objects from the response, call the Extract method on the GetResult.
func (ListResult) Extract ¶
func (r ListResult) Extract() ([]Snapshot, error)
Extract will get all Snapshot objects out of the ListResult object.
type Policy ¶
type Policy struct { KeepDay int `json:"keepday"` Period string `json:"period"` Prefix string `json:"prefix"` Bucket string `json:"bucket"` BasePath string `json:"basePath"` Agency string `json:"agency"` Enable string `json:"enable"` }
Policy contains all the information associated with a snapshot policy.
type PolicyCreateOpts ¶
type PolicyCreateOpts struct { Prefix string `json:"prefix" required:"true"` Period string `json:"period" required:"true"` KeepDay int `json:"keepday" required:"true"` Enable string `json:"enable" required:"true"` DeleteAuto string `json:"deleteAuto,omitempty"` }
PolicyCreateOpts contains options for creating a snapshot policy. This object is passed to the snapshots.PolicyCreate function.
func (PolicyCreateOpts) ToSnapshotCreateMap ¶
func (opts PolicyCreateOpts) ToSnapshotCreateMap() (map[string]interface{}, error)
ToSnapshotCreateMap assembles a request body based on the contents of a PolicyCreateOpts.
type PolicyResult ¶
type PolicyResult struct {
// contains filtered or unexported fields
}
PolicyResult contains the response body and error from a policy request.
func PolicyGet ¶
func PolicyGet(client *golangsdk.ServiceClient, clusterId string) (r PolicyResult)
PolicyGet retrieves the snapshot policy with the provided cluster ID. To extract the snapshot policy object from the response, call the Extract method on the GetResult.
func (PolicyResult) Extract ¶
func (r PolicyResult) Extract() (*Policy, error)
Extract will get the Policy object out of the PolicyResult object.
type Snapshot ¶
type Snapshot struct { ID string `json:"id"` Name string `json:"name"` Type string `json:"backupType"` Method string `json:"backupMethod"` Description string `json:"description"` ClusterID string `json:"clusterId"` ClusterName string `json:"clusterName"` Indices string `json:"indices"` TotalShards int `json:"totalShards"` FailedShards int `json:"failedShards"` KeepDays int `json:"backupKeepDay"` Period string `json:"backupPeriod"` Bucket string `json:"bucketName"` Version string `json:"version"` Status string `json:"status"` RestoreStatus string `json:"restoreStatus"` // type of the data search engine DataStore DataStore `json:"datastore"` // the information about times ExpectedStartTime time.Time `json:"-"` StartTime time.Time `json:"-"` EndTime time.Time `json:"-"` Created string `json:"created"` Updated string `json:"updated"` }
Snapshot contains all the information associated with a Cluster Snapshot.