Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func List ¶
func List(client *gophercloud.ServiceClient) pagination.Pager
List will list all backup plans
Types ¶
type BackupPlanGFS ¶
type BackupPlanGFS struct { Grandfather int `json:"grandfather,omitempty"` Father int `json:"father,omitempty"` Son int `json:"son" required:"true"` }
BackupPlanGFS represents a backup plan gfs policy info
type BackupPlanResource ¶
type BackupPlanResource struct { ID string `json:"id" required:"true"` Type string `json:"type" required:"true"` Name string `json:"name" required:"true"` }
BackupPlanResource represents a backup plan resource info
type CreateOpts ¶
type CreateOpts struct { Name string `json:"name" required:"true"` Resources []*BackupPlanResource `json:"resources" required:"true"` ProviderID string `json:"provider_id" required:"true"` FullDay *int `json:"full_day,omitempty"` RetentionType string `json:"retention_type,omitempty"` GFS *BackupPlanGFS `json:"gfs,omitempty"` }
CreateOpts represents parameters of creation of backup plan
type CreateResult ¶
type CreateResult struct {
// contains filtered or unexported fields
}
func Create ¶
func Create(client *gophercloud.ServiceClient, opts OptsBuilder) (r CreateResult)
Create performs request to create backup plan
func (CreateResult) Extract ¶
func (r CreateResult) Extract() (*PlanResponse, error)
type DeleteResult ¶
type DeleteResult struct {
gophercloud.ErrResult
}
func Delete ¶
func Delete(client *gophercloud.ServiceClient, id string) (r DeleteResult)
Delete performs request to delete backup plan
type GetResult ¶
type GetResult struct {
// contains filtered or unexported fields
}
func Get ¶
func Get(client *gophercloud.ServiceClient, id string) (r GetResult)
Get returns information about backup plan, given its ID
func (GetResult) Extract ¶
func (r GetResult) Extract() (*PlanResponse, error)
type OptsBuilder ¶
type PlanCreate ¶
type PlanCreate struct {
Plan *CreateOpts `json:"plan" required:"true"`
}
Plan is used to send request to create backup plan
func (*PlanCreate) Map ¶
func (opts *PlanCreate) Map() (map[string]interface{}, error)
Map converts opts to a map (for a request body)
type PlanResp ¶
type PlanResp struct {
Plan PlanResponse `json:"plan"`
}
type PlanResponse ¶
type PlanResponse struct { ID string `json:"id" required:"true"` Name string `json:"name" required:"true"` Resources []*BackupPlanResource `json:"resources" required:"true"` ProviderID string `json:"provider_id" required:"true"` Status string `json:"status" required:"true"` FullDay *int `json:"full_day,omitempty"` RetentionType string `json:"retention_type,omitempty"` GFS *BackupPlanGFS `json:"gfs,omitempty"` }
func ExtractPlans ¶
func ExtractPlans(r pagination.Page) ([]PlanResponse, error)
ExtractPlans retrieves a slice of backup PlanResponse structs from a paginated collection.
type PlanUpdate ¶
type PlanUpdate struct {
Plan *UpdateOpts `json:"plan" required:"true"`
}
func (*PlanUpdate) Map ¶
func (opts *PlanUpdate) Map() (map[string]interface{}, error)
Map converts opts to a map (for a request body)
type UpdateOpts ¶
type UpdateOpts struct { Name string `json:"name" required:"true"` Status string `json:"status" required:"true"` Resources []*BackupPlanResource `json:"resources" required:"true"` FullDay int `json:"full_day,omitempty"` RetentionType string `json:"retention_type,omitempty"` GFS *BackupPlanGFS `json:"gfs,omitempty"` }
type UpdateResult ¶
type UpdateResult struct {
// contains filtered or unexported fields
}
func Update ¶
func Update(client *gophercloud.ServiceClient, id string, opts OptsBuilder) (r UpdateResult)
Update performs request to update backup plan
func (UpdateResult) Extract ¶
func (r UpdateResult) Extract() (*PlanResponse, error)
Click to show internal directories.
Click to hide internal directories.