forked from TrueCloudLab/lego
6004e599ed
* feat: add dep configuration files. * chore: add vendor folder. * refactor: update Dockerfile. * review: remove git from Dockerfile. * review: remove RUN apk. * review: dep status. * feat: added .dockerignore
53 lines
1.2 KiB
Go
53 lines
1.2 KiB
Go
package egoscale
|
|
|
|
// ResourceType returns the type of the resource
|
|
func (*Snapshot) ResourceType() string {
|
|
return "Snapshot"
|
|
}
|
|
|
|
// name returns the CloudStack API command name
|
|
func (*CreateSnapshot) name() string {
|
|
return "createSnapshot"
|
|
}
|
|
|
|
func (*CreateSnapshot) asyncResponse() interface{} {
|
|
return new(CreateSnapshotResponse)
|
|
}
|
|
|
|
// CreateSnapshotResponse represents a freshly created snapshot
|
|
type CreateSnapshotResponse struct {
|
|
Snapshot Snapshot `json:"snapshot"`
|
|
}
|
|
|
|
// name returns the CloudStack API command name
|
|
func (*ListSnapshots) name() string {
|
|
return "listSnapshots"
|
|
}
|
|
|
|
func (*ListSnapshots) response() interface{} {
|
|
return new(ListSnapshotsResponse)
|
|
}
|
|
|
|
// ListSnapshotsResponse represents a list of volume snapshots
|
|
type ListSnapshotsResponse struct {
|
|
Count int `json:"count"`
|
|
Snapshot []Snapshot `json:"snapshot"`
|
|
}
|
|
|
|
// name returns the CloudStack API command name
|
|
func (*DeleteSnapshot) name() string {
|
|
return "deleteSnapshot"
|
|
}
|
|
|
|
func (*DeleteSnapshot) asyncResponse() interface{} {
|
|
return new(booleanResponse)
|
|
}
|
|
|
|
// name returns the CloudStack API command name
|
|
func (*RevertSnapshot) name() string {
|
|
return "revertSnapshot"
|
|
}
|
|
|
|
func (*RevertSnapshot) asyncResponse() interface{} {
|
|
return new(booleanResponse)
|
|
}
|