Documentation
¶
Index ¶
- Constants
- func NewSnapshotServiceHandler(svc SnapshotServiceHandler, opts ...connect.HandlerOption) (string, http.Handler)
- type SnapshotServiceClient
- type SnapshotServiceHandler
- type UnimplementedSnapshotServiceHandler
- func (UnimplementedSnapshotServiceHandler) ArchiveSnapshot(context.Context, *connect.Request[v1.ArchiveSnapshotRequest]) (*connect.Response[v1.ArchiveSnapshotResponse], error)
- func (UnimplementedSnapshotServiceHandler) CopySnapshot(context.Context, *connect.Request[v1.CopySnapshotRequest]) (*connect.Response[v1.CopySnapshotResponse], error)
- func (UnimplementedSnapshotServiceHandler) CreateSnapshot(context.Context, *connect.Request[v1.CreateSnapshotRequest]) (*connect.Response[v1.CreateSnapshotResponse], error)
- func (UnimplementedSnapshotServiceHandler) CreateSnapshotFromVMSnapshot(context.Context, *connect.Request[v1.CreateSnapshotFromVMSnapshotRequest]) (*connect.Response[v1.CreateSnapshotFromVMSnapshotResponse], error)
- func (UnimplementedSnapshotServiceHandler) CreateSnapshotPolicy(context.Context, *connect.Request[v1.CreateSnapshotPolicyRequest]) (*connect.Response[v1.CreateSnapshotPolicyResponse], error)
- func (UnimplementedSnapshotServiceHandler) DeleteSnapshot(context.Context, *connect.Request[v1.DeleteSnapshotRequest]) (*connect.Response[v1.DeleteSnapshotResponse], error)
- func (UnimplementedSnapshotServiceHandler) DeleteSnapshotPolicies(context.Context, *connect.Request[v1.DeleteSnapshotPoliciesRequest]) (*connect.Response[v1.DeleteSnapshotPoliciesResponse], error)
- func (UnimplementedSnapshotServiceHandler) ExtractSnapshot(context.Context, *connect.Request[v1.ExtractSnapshotRequest]) (*connect.Response[v1.ExtractSnapshotResponse], error)
- func (UnimplementedSnapshotServiceHandler) ListSnapshotPolicies(context.Context, *connect.Request[v1.ListSnapshotPoliciesRequest]) (*connect.Response[v1.ListSnapshotPoliciesResponse], error)
- func (UnimplementedSnapshotServiceHandler) ListSnapshots(context.Context, *connect.Request[v1.ListSnapshotsRequest]) (*connect.Response[v1.ListSnapshotsResponse], error)
- func (UnimplementedSnapshotServiceHandler) ListSnapshotsCmdByAdmin(context.Context, *connect.Request[v1.ListSnapshotsCmdByAdminRequest]) (*connect.Response[v1.ListSnapshotsCmdByAdminResponse], error)
- func (UnimplementedSnapshotServiceHandler) RevertSnapshot(context.Context, *connect.Request[v1.RevertSnapshotRequest]) (*connect.Response[v1.RevertSnapshotResponse], error)
- func (UnimplementedSnapshotServiceHandler) UpdateSnapshotPolicy(context.Context, *connect.Request[v1.UpdateSnapshotPolicyRequest]) (*connect.Response[v1.UpdateSnapshotPolicyResponse], error)
Constants ¶
const ( // SnapshotServiceArchiveSnapshotProcedure is the fully-qualified name of the SnapshotService's // ArchiveSnapshot RPC. SnapshotServiceArchiveSnapshotProcedure = "/cloudstack.management.snapshot.v1.SnapshotService/ArchiveSnapshot" // SnapshotServiceCopySnapshotProcedure is the fully-qualified name of the SnapshotService's // CopySnapshot RPC. SnapshotServiceCopySnapshotProcedure = "/cloudstack.management.snapshot.v1.SnapshotService/CopySnapshot" // SnapshotServiceCreateSnapshotProcedure is the fully-qualified name of the SnapshotService's // CreateSnapshot RPC. SnapshotServiceCreateSnapshotProcedure = "/cloudstack.management.snapshot.v1.SnapshotService/CreateSnapshot" // SnapshotServiceCreateSnapshotFromVMSnapshotProcedure is the fully-qualified name of the // SnapshotService's CreateSnapshotFromVMSnapshot RPC. SnapshotServiceCreateSnapshotFromVMSnapshotProcedure = "/cloudstack.management.snapshot.v1.SnapshotService/CreateSnapshotFromVMSnapshot" // SnapshotServiceCreateSnapshotPolicyProcedure is the fully-qualified name of the SnapshotService's // CreateSnapshotPolicy RPC. SnapshotServiceCreateSnapshotPolicyProcedure = "/cloudstack.management.snapshot.v1.SnapshotService/CreateSnapshotPolicy" // SnapshotServiceDeleteSnapshotProcedure is the fully-qualified name of the SnapshotService's // DeleteSnapshot RPC. SnapshotServiceDeleteSnapshotProcedure = "/cloudstack.management.snapshot.v1.SnapshotService/DeleteSnapshot" // SnapshotServiceDeleteSnapshotPoliciesProcedure is the fully-qualified name of the // SnapshotService's DeleteSnapshotPolicies RPC. SnapshotServiceDeleteSnapshotPoliciesProcedure = "/cloudstack.management.snapshot.v1.SnapshotService/DeleteSnapshotPolicies" // SnapshotServiceExtractSnapshotProcedure is the fully-qualified name of the SnapshotService's // ExtractSnapshot RPC. SnapshotServiceExtractSnapshotProcedure = "/cloudstack.management.snapshot.v1.SnapshotService/ExtractSnapshot" // SnapshotServiceListSnapshotPoliciesProcedure is the fully-qualified name of the SnapshotService's // ListSnapshotPolicies RPC. SnapshotServiceListSnapshotPoliciesProcedure = "/cloudstack.management.snapshot.v1.SnapshotService/ListSnapshotPolicies" // SnapshotServiceListSnapshotsProcedure is the fully-qualified name of the SnapshotService's // ListSnapshots RPC. SnapshotServiceListSnapshotsProcedure = "/cloudstack.management.snapshot.v1.SnapshotService/ListSnapshots" // SnapshotServiceListSnapshotsCmdByAdminProcedure is the fully-qualified name of the // SnapshotService's ListSnapshotsCmdByAdmin RPC. SnapshotServiceListSnapshotsCmdByAdminProcedure = "/cloudstack.management.snapshot.v1.SnapshotService/ListSnapshotsCmdByAdmin" // SnapshotServiceRevertSnapshotProcedure is the fully-qualified name of the SnapshotService's // RevertSnapshot RPC. SnapshotServiceRevertSnapshotProcedure = "/cloudstack.management.snapshot.v1.SnapshotService/RevertSnapshot" // SnapshotServiceUpdateSnapshotPolicyProcedure is the fully-qualified name of the SnapshotService's // UpdateSnapshotPolicy RPC. SnapshotServiceUpdateSnapshotPolicyProcedure = "/cloudstack.management.snapshot.v1.SnapshotService/UpdateSnapshotPolicy" )
These constants are the fully-qualified names of the RPCs defined in this package. They're exposed at runtime as Spec.Procedure and as the final two segments of the HTTP route.
Note that these are different from the fully-qualified method names used by google.golang.org/protobuf/reflect/protoreflect. To convert from these constants to reflection-formatted method names, remove the leading slash and convert the remaining slash to a period.
const (
// SnapshotServiceName is the fully-qualified name of the SnapshotService service.
SnapshotServiceName = "cloudstack.management.snapshot.v1.SnapshotService"
)
Variables ¶
This section is empty.
Functions ¶
func NewSnapshotServiceHandler ¶
func NewSnapshotServiceHandler(svc SnapshotServiceHandler, opts ...connect.HandlerOption) (string, http.Handler)
NewSnapshotServiceHandler builds an HTTP handler from the service implementation. It returns the path on which to mount the handler and the handler itself.
By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf and JSON codecs. They also support gzip compression.
Types ¶
type SnapshotServiceClient ¶
type SnapshotServiceClient interface {
// ArchiveSnapshot Archives (moves) a snapshot on primary storage to secondary storage
ArchiveSnapshot(context.Context, *connect.Request[v1.ArchiveSnapshotRequest]) (*connect.Response[v1.ArchiveSnapshotResponse], error)
// CopySnapshot Copies a snapshot from one zone to another.
CopySnapshot(context.Context, *connect.Request[v1.CopySnapshotRequest]) (*connect.Response[v1.CopySnapshotResponse], error)
// CreateSnapshot Creates an instant snapshot of a volume.
CreateSnapshot(context.Context, *connect.Request[v1.CreateSnapshotRequest]) (*connect.Response[v1.CreateSnapshotResponse], error)
// CreateSnapshotFromVMSnapshot Creates an instant snapshot of a volume from existing vm snapshot.
CreateSnapshotFromVMSnapshot(context.Context, *connect.Request[v1.CreateSnapshotFromVMSnapshotRequest]) (*connect.Response[v1.CreateSnapshotFromVMSnapshotResponse], error)
// CreateSnapshotPolicy Creates a snapshot policy for the account.
CreateSnapshotPolicy(context.Context, *connect.Request[v1.CreateSnapshotPolicyRequest]) (*connect.Response[v1.CreateSnapshotPolicyResponse], error)
// DeleteSnapshot Deletes a snapshot of a disk volume.
DeleteSnapshot(context.Context, *connect.Request[v1.DeleteSnapshotRequest]) (*connect.Response[v1.DeleteSnapshotResponse], error)
// DeleteSnapshotPolicies Deletes snapshot policies for the account.
DeleteSnapshotPolicies(context.Context, *connect.Request[v1.DeleteSnapshotPoliciesRequest]) (*connect.Response[v1.DeleteSnapshotPoliciesResponse], error)
// ExtractSnapshot Returns a download URL for extracting a snapshot. It must be in the Backed Up state.
ExtractSnapshot(context.Context, *connect.Request[v1.ExtractSnapshotRequest]) (*connect.Response[v1.ExtractSnapshotResponse], error)
// ListSnapshotPolicies Lists snapshot policies.
ListSnapshotPolicies(context.Context, *connect.Request[v1.ListSnapshotPoliciesRequest]) (*connect.Response[v1.ListSnapshotPoliciesResponse], error)
// ListSnapshots Lists all available snapshots for the account.
ListSnapshots(context.Context, *connect.Request[v1.ListSnapshotsRequest]) (*connect.Response[v1.ListSnapshotsResponse], error)
// ListSnapshotsCmdByAdmin Lists all available snapshots for the account.
ListSnapshotsCmdByAdmin(context.Context, *connect.Request[v1.ListSnapshotsCmdByAdminRequest]) (*connect.Response[v1.ListSnapshotsCmdByAdminResponse], error)
// RevertSnapshot This is supposed to revert a volume snapshot. This command is only supported with KVM so far
RevertSnapshot(context.Context, *connect.Request[v1.RevertSnapshotRequest]) (*connect.Response[v1.RevertSnapshotResponse], error)
// UpdateSnapshotPolicy Updates the snapshot policy.
UpdateSnapshotPolicy(context.Context, *connect.Request[v1.UpdateSnapshotPolicyRequest]) (*connect.Response[v1.UpdateSnapshotPolicyResponse], error)
}
SnapshotServiceClient is a client for the cloudstack.management.snapshot.v1.SnapshotService service.
func NewSnapshotServiceClient ¶
func NewSnapshotServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) SnapshotServiceClient
NewSnapshotServiceClient constructs a client for the cloudstack.management.snapshot.v1.SnapshotService service. By default, it uses the Connect protocol with the binary Protobuf Codec, asks for gzipped responses, and sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply the connect.WithGRPC() or connect.WithGRPCWeb() options.
The URL supplied here should be the base URL for the Connect or gRPC server (for example, http://api.acme.com or https://acme.com/grpc).
type SnapshotServiceHandler ¶
type SnapshotServiceHandler interface {
// ArchiveSnapshot Archives (moves) a snapshot on primary storage to secondary storage
ArchiveSnapshot(context.Context, *connect.Request[v1.ArchiveSnapshotRequest]) (*connect.Response[v1.ArchiveSnapshotResponse], error)
// CopySnapshot Copies a snapshot from one zone to another.
CopySnapshot(context.Context, *connect.Request[v1.CopySnapshotRequest]) (*connect.Response[v1.CopySnapshotResponse], error)
// CreateSnapshot Creates an instant snapshot of a volume.
CreateSnapshot(context.Context, *connect.Request[v1.CreateSnapshotRequest]) (*connect.Response[v1.CreateSnapshotResponse], error)
// CreateSnapshotFromVMSnapshot Creates an instant snapshot of a volume from existing vm snapshot.
CreateSnapshotFromVMSnapshot(context.Context, *connect.Request[v1.CreateSnapshotFromVMSnapshotRequest]) (*connect.Response[v1.CreateSnapshotFromVMSnapshotResponse], error)
// CreateSnapshotPolicy Creates a snapshot policy for the account.
CreateSnapshotPolicy(context.Context, *connect.Request[v1.CreateSnapshotPolicyRequest]) (*connect.Response[v1.CreateSnapshotPolicyResponse], error)
// DeleteSnapshot Deletes a snapshot of a disk volume.
DeleteSnapshot(context.Context, *connect.Request[v1.DeleteSnapshotRequest]) (*connect.Response[v1.DeleteSnapshotResponse], error)
// DeleteSnapshotPolicies Deletes snapshot policies for the account.
DeleteSnapshotPolicies(context.Context, *connect.Request[v1.DeleteSnapshotPoliciesRequest]) (*connect.Response[v1.DeleteSnapshotPoliciesResponse], error)
// ExtractSnapshot Returns a download URL for extracting a snapshot. It must be in the Backed Up state.
ExtractSnapshot(context.Context, *connect.Request[v1.ExtractSnapshotRequest]) (*connect.Response[v1.ExtractSnapshotResponse], error)
// ListSnapshotPolicies Lists snapshot policies.
ListSnapshotPolicies(context.Context, *connect.Request[v1.ListSnapshotPoliciesRequest]) (*connect.Response[v1.ListSnapshotPoliciesResponse], error)
// ListSnapshots Lists all available snapshots for the account.
ListSnapshots(context.Context, *connect.Request[v1.ListSnapshotsRequest]) (*connect.Response[v1.ListSnapshotsResponse], error)
// ListSnapshotsCmdByAdmin Lists all available snapshots for the account.
ListSnapshotsCmdByAdmin(context.Context, *connect.Request[v1.ListSnapshotsCmdByAdminRequest]) (*connect.Response[v1.ListSnapshotsCmdByAdminResponse], error)
// RevertSnapshot This is supposed to revert a volume snapshot. This command is only supported with KVM so far
RevertSnapshot(context.Context, *connect.Request[v1.RevertSnapshotRequest]) (*connect.Response[v1.RevertSnapshotResponse], error)
// UpdateSnapshotPolicy Updates the snapshot policy.
UpdateSnapshotPolicy(context.Context, *connect.Request[v1.UpdateSnapshotPolicyRequest]) (*connect.Response[v1.UpdateSnapshotPolicyResponse], error)
}
SnapshotServiceHandler is an implementation of the cloudstack.management.snapshot.v1.SnapshotService service.
type UnimplementedSnapshotServiceHandler ¶
type UnimplementedSnapshotServiceHandler struct{}
UnimplementedSnapshotServiceHandler returns CodeUnimplemented from all methods.
func (UnimplementedSnapshotServiceHandler) ArchiveSnapshot ¶
func (UnimplementedSnapshotServiceHandler) ArchiveSnapshot(context.Context, *connect.Request[v1.ArchiveSnapshotRequest]) (*connect.Response[v1.ArchiveSnapshotResponse], error)
func (UnimplementedSnapshotServiceHandler) CopySnapshot ¶
func (UnimplementedSnapshotServiceHandler) CopySnapshot(context.Context, *connect.Request[v1.CopySnapshotRequest]) (*connect.Response[v1.CopySnapshotResponse], error)
func (UnimplementedSnapshotServiceHandler) CreateSnapshot ¶
func (UnimplementedSnapshotServiceHandler) CreateSnapshot(context.Context, *connect.Request[v1.CreateSnapshotRequest]) (*connect.Response[v1.CreateSnapshotResponse], error)
func (UnimplementedSnapshotServiceHandler) CreateSnapshotFromVMSnapshot ¶
func (UnimplementedSnapshotServiceHandler) CreateSnapshotFromVMSnapshot(context.Context, *connect.Request[v1.CreateSnapshotFromVMSnapshotRequest]) (*connect.Response[v1.CreateSnapshotFromVMSnapshotResponse], error)
func (UnimplementedSnapshotServiceHandler) CreateSnapshotPolicy ¶
func (UnimplementedSnapshotServiceHandler) CreateSnapshotPolicy(context.Context, *connect.Request[v1.CreateSnapshotPolicyRequest]) (*connect.Response[v1.CreateSnapshotPolicyResponse], error)
func (UnimplementedSnapshotServiceHandler) DeleteSnapshot ¶
func (UnimplementedSnapshotServiceHandler) DeleteSnapshot(context.Context, *connect.Request[v1.DeleteSnapshotRequest]) (*connect.Response[v1.DeleteSnapshotResponse], error)
func (UnimplementedSnapshotServiceHandler) DeleteSnapshotPolicies ¶
func (UnimplementedSnapshotServiceHandler) DeleteSnapshotPolicies(context.Context, *connect.Request[v1.DeleteSnapshotPoliciesRequest]) (*connect.Response[v1.DeleteSnapshotPoliciesResponse], error)
func (UnimplementedSnapshotServiceHandler) ExtractSnapshot ¶
func (UnimplementedSnapshotServiceHandler) ExtractSnapshot(context.Context, *connect.Request[v1.ExtractSnapshotRequest]) (*connect.Response[v1.ExtractSnapshotResponse], error)
func (UnimplementedSnapshotServiceHandler) ListSnapshotPolicies ¶
func (UnimplementedSnapshotServiceHandler) ListSnapshotPolicies(context.Context, *connect.Request[v1.ListSnapshotPoliciesRequest]) (*connect.Response[v1.ListSnapshotPoliciesResponse], error)
func (UnimplementedSnapshotServiceHandler) ListSnapshots ¶
func (UnimplementedSnapshotServiceHandler) ListSnapshots(context.Context, *connect.Request[v1.ListSnapshotsRequest]) (*connect.Response[v1.ListSnapshotsResponse], error)
func (UnimplementedSnapshotServiceHandler) ListSnapshotsCmdByAdmin ¶
func (UnimplementedSnapshotServiceHandler) ListSnapshotsCmdByAdmin(context.Context, *connect.Request[v1.ListSnapshotsCmdByAdminRequest]) (*connect.Response[v1.ListSnapshotsCmdByAdminResponse], error)
func (UnimplementedSnapshotServiceHandler) RevertSnapshot ¶
func (UnimplementedSnapshotServiceHandler) RevertSnapshot(context.Context, *connect.Request[v1.RevertSnapshotRequest]) (*connect.Response[v1.RevertSnapshotResponse], error)
func (UnimplementedSnapshotServiceHandler) UpdateSnapshotPolicy ¶
func (UnimplementedSnapshotServiceHandler) UpdateSnapshotPolicy(context.Context, *connect.Request[v1.UpdateSnapshotPolicyRequest]) (*connect.Response[v1.UpdateSnapshotPolicyResponse], error)