templatev1connect

package
v0.0.0-...-94cd6a6 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// TemplateServiceCopyTemplateProcedure is the fully-qualified name of the TemplateService's
	// CopyTemplate RPC.
	TemplateServiceCopyTemplateProcedure = "/cloudstack.management.template.v1.TemplateService/CopyTemplate"
	// TemplateServiceCopyTemplateCmdByAdminProcedure is the fully-qualified name of the
	// TemplateService's CopyTemplateCmdByAdmin RPC.
	TemplateServiceCopyTemplateCmdByAdminProcedure = "/cloudstack.management.template.v1.TemplateService/CopyTemplateCmdByAdmin"
	// TemplateServiceCreateTemplateProcedure is the fully-qualified name of the TemplateService's
	// CreateTemplate RPC.
	TemplateServiceCreateTemplateProcedure = "/cloudstack.management.template.v1.TemplateService/CreateTemplate"
	// TemplateServiceCreateTemplateCmdByAdminProcedure is the fully-qualified name of the
	// TemplateService's CreateTemplateCmdByAdmin RPC.
	TemplateServiceCreateTemplateCmdByAdminProcedure = "/cloudstack.management.template.v1.TemplateService/CreateTemplateCmdByAdmin"
	// TemplateServiceDeleteTemplateProcedure is the fully-qualified name of the TemplateService's
	// DeleteTemplate RPC.
	TemplateServiceDeleteTemplateProcedure = "/cloudstack.management.template.v1.TemplateService/DeleteTemplate"
	// TemplateServiceDeleteVnfTemplateProcedure is the fully-qualified name of the TemplateService's
	// DeleteVnfTemplate RPC.
	TemplateServiceDeleteVnfTemplateProcedure = "/cloudstack.management.template.v1.TemplateService/DeleteVnfTemplate"
	// TemplateServiceExtractTemplateProcedure is the fully-qualified name of the TemplateService's
	// ExtractTemplate RPC.
	TemplateServiceExtractTemplateProcedure = "/cloudstack.management.template.v1.TemplateService/ExtractTemplate"
	// TemplateServiceGetUploadParamsForTemplateProcedure is the fully-qualified name of the
	// TemplateService's GetUploadParamsForTemplate RPC.
	TemplateServiceGetUploadParamsForTemplateProcedure = "/cloudstack.management.template.v1.TemplateService/GetUploadParamsForTemplate"
	// TemplateServiceListTemplatePermissionsProcedure is the fully-qualified name of the
	// TemplateService's ListTemplatePermissions RPC.
	TemplateServiceListTemplatePermissionsProcedure = "/cloudstack.management.template.v1.TemplateService/ListTemplatePermissions"
	// TemplateServiceListTemplatePermissionsCmdByAdminProcedure is the fully-qualified name of the
	// TemplateService's ListTemplatePermissionsCmdByAdmin RPC.
	TemplateServiceListTemplatePermissionsCmdByAdminProcedure = "/cloudstack.management.template.v1.TemplateService/ListTemplatePermissionsCmdByAdmin"
	// TemplateServiceListTemplatesProcedure is the fully-qualified name of the TemplateService's
	// ListTemplates RPC.
	TemplateServiceListTemplatesProcedure = "/cloudstack.management.template.v1.TemplateService/ListTemplates"
	// TemplateServiceListTemplatesCmdByAdminProcedure is the fully-qualified name of the
	// TemplateService's ListTemplatesCmdByAdmin RPC.
	TemplateServiceListTemplatesCmdByAdminProcedure = "/cloudstack.management.template.v1.TemplateService/ListTemplatesCmdByAdmin"
	// TemplateServiceListVnfTemplatesProcedure is the fully-qualified name of the TemplateService's
	// ListVnfTemplates RPC.
	TemplateServiceListVnfTemplatesProcedure = "/cloudstack.management.template.v1.TemplateService/ListVnfTemplates"
	// TemplateServiceListVnfTemplatesCmdByAdminProcedure is the fully-qualified name of the
	// TemplateService's ListVnfTemplatesCmdByAdmin RPC.
	TemplateServiceListVnfTemplatesCmdByAdminProcedure = "/cloudstack.management.template.v1.TemplateService/ListVnfTemplatesCmdByAdmin"
	// TemplateServicePrepareTemplateProcedure is the fully-qualified name of the TemplateService's
	// PrepareTemplate RPC.
	TemplateServicePrepareTemplateProcedure = "/cloudstack.management.template.v1.TemplateService/PrepareTemplate"
	// TemplateServiceRegisterTemplateProcedure is the fully-qualified name of the TemplateService's
	// RegisterTemplate RPC.
	TemplateServiceRegisterTemplateProcedure = "/cloudstack.management.template.v1.TemplateService/RegisterTemplate"
	// TemplateServiceRegisterTemplateCmdByAdminProcedure is the fully-qualified name of the
	// TemplateService's RegisterTemplateCmdByAdmin RPC.
	TemplateServiceRegisterTemplateCmdByAdminProcedure = "/cloudstack.management.template.v1.TemplateService/RegisterTemplateCmdByAdmin"
	// TemplateServiceRegisterVnfTemplateProcedure is the fully-qualified name of the TemplateService's
	// RegisterVnfTemplate RPC.
	TemplateServiceRegisterVnfTemplateProcedure = "/cloudstack.management.template.v1.TemplateService/RegisterVnfTemplate"
	// TemplateServiceRegisterVnfTemplateCmdByAdminProcedure is the fully-qualified name of the
	// TemplateService's RegisterVnfTemplateCmdByAdmin RPC.
	TemplateServiceRegisterVnfTemplateCmdByAdminProcedure = "/cloudstack.management.template.v1.TemplateService/RegisterVnfTemplateCmdByAdmin"
	// TemplateServiceUpdateTemplateProcedure is the fully-qualified name of the TemplateService's
	// UpdateTemplate RPC.
	TemplateServiceUpdateTemplateProcedure = "/cloudstack.management.template.v1.TemplateService/UpdateTemplate"
	// TemplateServiceUpdateTemplateCmdByAdminProcedure is the fully-qualified name of the
	// TemplateService's UpdateTemplateCmdByAdmin RPC.
	TemplateServiceUpdateTemplateCmdByAdminProcedure = "/cloudstack.management.template.v1.TemplateService/UpdateTemplateCmdByAdmin"
	// TemplateServiceUpdateTemplatePermissionsProcedure is the fully-qualified name of the
	// TemplateService's UpdateTemplatePermissions RPC.
	TemplateServiceUpdateTemplatePermissionsProcedure = "/cloudstack.management.template.v1.TemplateService/UpdateTemplatePermissions"
	// TemplateServiceUpdateVnfTemplateProcedure is the fully-qualified name of the TemplateService's
	// UpdateVnfTemplate RPC.
	TemplateServiceUpdateVnfTemplateProcedure = "/cloudstack.management.template.v1.TemplateService/UpdateVnfTemplate"
	// TemplateServiceUpdateVnfTemplateCmdByAdminProcedure is the fully-qualified name of the
	// TemplateService's UpdateVnfTemplateCmdByAdmin RPC.
	TemplateServiceUpdateVnfTemplateCmdByAdminProcedure = "/cloudstack.management.template.v1.TemplateService/UpdateVnfTemplateCmdByAdmin"
)

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.

View Source
const (
	// TemplateServiceName is the fully-qualified name of the TemplateService service.
	TemplateServiceName = "cloudstack.management.template.v1.TemplateService"
)

Variables

This section is empty.

Functions

func NewTemplateServiceHandler

func NewTemplateServiceHandler(svc TemplateServiceHandler, opts ...connect.HandlerOption) (string, http.Handler)

NewTemplateServiceHandler 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 TemplateServiceClient

type TemplateServiceClient interface {
	// CopyTemplate Copies a template from one zone to another.
	CopyTemplate(context.Context, *connect.Request[v1.CopyTemplateRequest]) (*connect.Response[v1.CopyTemplateResponse], error)
	// CopyTemplateCmdByAdmin Copies a template from one zone to another.
	CopyTemplateCmdByAdmin(context.Context, *connect.Request[v1.CopyTemplateCmdByAdminRequest]) (*connect.Response[v1.CopyTemplateCmdByAdminResponse], error)
	// CreateTemplate Creates a template of a virtual machine. The virtual machine must be in a STOPPED state. A template created from this command is automatically designated as a private template visible to the account that created it.
	CreateTemplate(context.Context, *connect.Request[v1.CreateTemplateRequest]) (*connect.Response[v1.CreateTemplateResponse], error)
	// CreateTemplateCmdByAdmin Creates a template of a virtual machine. The virtual machine must be in a STOPPED state. A template created from this command is automatically designated as a private template visible to the account that created it.
	CreateTemplateCmdByAdmin(context.Context, *connect.Request[v1.CreateTemplateCmdByAdminRequest]) (*connect.Response[v1.CreateTemplateCmdByAdminResponse], error)
	// DeleteTemplate Deletes a template from the system. All virtual machines using the deleted template will not be affected.
	DeleteTemplate(context.Context, *connect.Request[v1.DeleteTemplateRequest]) (*connect.Response[v1.DeleteTemplateResponse], error)
	// DeleteVnfTemplate Deletes a VNF template from the system. All virtual machines using the deleted template will not be affected.
	DeleteVnfTemplate(context.Context, *connect.Request[v1.DeleteVnfTemplateRequest]) (*connect.Response[v1.DeleteVnfTemplateResponse], error)
	// ExtractTemplate Extracts a template
	ExtractTemplate(context.Context, *connect.Request[v1.ExtractTemplateRequest]) (*connect.Response[v1.ExtractTemplateResponse], error)
	// GetUploadParamsForTemplate upload an existing template into the CloudStack cloud.
	GetUploadParamsForTemplate(context.Context, *connect.Request[v1.GetUploadParamsForTemplateRequest]) (*connect.Response[v1.GetUploadParamsForTemplateResponse], error)
	// ListTemplatePermissions List template visibility and all accounts that have permissions to view this template.
	ListTemplatePermissions(context.Context, *connect.Request[v1.ListTemplatePermissionsRequest]) (*connect.Response[v1.ListTemplatePermissionsResponse], error)
	// ListTemplatePermissionsCmdByAdmin List template visibility and all accounts that have permissions to view this template.
	ListTemplatePermissionsCmdByAdmin(context.Context, *connect.Request[v1.ListTemplatePermissionsCmdByAdminRequest]) (*connect.Response[v1.ListTemplatePermissionsCmdByAdminResponse], error)
	// ListTemplates List all public, private, and privileged templates.
	ListTemplates(context.Context, *connect.Request[v1.ListTemplatesRequest]) (*connect.Response[v1.ListTemplatesResponse], error)
	// ListTemplatesCmdByAdmin List all public, private, and privileged templates.
	ListTemplatesCmdByAdmin(context.Context, *connect.Request[v1.ListTemplatesCmdByAdminRequest]) (*connect.Response[v1.ListTemplatesCmdByAdminResponse], error)
	// ListVnfTemplates List all public, private, and privileged VNF templates.
	ListVnfTemplates(context.Context, *connect.Request[v1.ListVnfTemplatesRequest]) (*connect.Response[v1.ListVnfTemplatesResponse], error)
	// ListVnfTemplatesCmdByAdmin List all public, private, and privileged VNF templates.
	ListVnfTemplatesCmdByAdmin(context.Context, *connect.Request[v1.ListVnfTemplatesCmdByAdminRequest]) (*connect.Response[v1.ListVnfTemplatesCmdByAdminResponse], error)
	// PrepareTemplate load template into primary storage
	PrepareTemplate(context.Context, *connect.Request[v1.PrepareTemplateRequest]) (*connect.Response[v1.PrepareTemplateResponse], error)
	// RegisterTemplate Registers an existing template into the CloudStack cloud.
	RegisterTemplate(context.Context, *connect.Request[v1.RegisterTemplateRequest]) (*connect.Response[v1.RegisterTemplateResponse], error)
	// RegisterTemplateCmdByAdmin Registers an existing template into the CloudStack cloud.
	RegisterTemplateCmdByAdmin(context.Context, *connect.Request[v1.RegisterTemplateCmdByAdminRequest]) (*connect.Response[v1.RegisterTemplateCmdByAdminResponse], error)
	// RegisterVnfTemplate Registers an existing VNF template into the CloudStack cloud.
	RegisterVnfTemplate(context.Context, *connect.Request[v1.RegisterVnfTemplateRequest]) (*connect.Response[v1.RegisterVnfTemplateResponse], error)
	// RegisterVnfTemplateCmdByAdmin Registers an existing VNF template into the CloudStack cloud.
	RegisterVnfTemplateCmdByAdmin(context.Context, *connect.Request[v1.RegisterVnfTemplateCmdByAdminRequest]) (*connect.Response[v1.RegisterVnfTemplateCmdByAdminResponse], error)
	// UpdateTemplate Updates attributes of a template.
	UpdateTemplate(context.Context, *connect.Request[v1.UpdateTemplateRequest]) (*connect.Response[v1.UpdateTemplateResponse], error)
	// UpdateTemplateCmdByAdmin Updates attributes of a template.
	UpdateTemplateCmdByAdmin(context.Context, *connect.Request[v1.UpdateTemplateCmdByAdminRequest]) (*connect.Response[v1.UpdateTemplateCmdByAdminResponse], error)
	// UpdateTemplatePermissions Updates a template visibility permissions. A public template is visible to all accounts within the same domain. A private template is visible only to the owner of the template. A privileged template is a private template with account permissions added. Only accounts specified under the template permissions are visible to them.
	UpdateTemplatePermissions(context.Context, *connect.Request[v1.UpdateTemplatePermissionsRequest]) (*connect.Response[v1.UpdateTemplatePermissionsResponse], error)
	// UpdateVnfTemplate Updates a template to VNF template or attributes of a VNF template.
	UpdateVnfTemplate(context.Context, *connect.Request[v1.UpdateVnfTemplateRequest]) (*connect.Response[v1.UpdateVnfTemplateResponse], error)
	// UpdateVnfTemplateCmdByAdmin Updates a template to VNF template or attributes of a VNF template.
	UpdateVnfTemplateCmdByAdmin(context.Context, *connect.Request[v1.UpdateVnfTemplateCmdByAdminRequest]) (*connect.Response[v1.UpdateVnfTemplateCmdByAdminResponse], error)
}

TemplateServiceClient is a client for the cloudstack.management.template.v1.TemplateService service.

func NewTemplateServiceClient

func NewTemplateServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) TemplateServiceClient

NewTemplateServiceClient constructs a client for the cloudstack.management.template.v1.TemplateService 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 TemplateServiceHandler

type TemplateServiceHandler interface {
	// CopyTemplate Copies a template from one zone to another.
	CopyTemplate(context.Context, *connect.Request[v1.CopyTemplateRequest]) (*connect.Response[v1.CopyTemplateResponse], error)
	// CopyTemplateCmdByAdmin Copies a template from one zone to another.
	CopyTemplateCmdByAdmin(context.Context, *connect.Request[v1.CopyTemplateCmdByAdminRequest]) (*connect.Response[v1.CopyTemplateCmdByAdminResponse], error)
	// CreateTemplate Creates a template of a virtual machine. The virtual machine must be in a STOPPED state. A template created from this command is automatically designated as a private template visible to the account that created it.
	CreateTemplate(context.Context, *connect.Request[v1.CreateTemplateRequest]) (*connect.Response[v1.CreateTemplateResponse], error)
	// CreateTemplateCmdByAdmin Creates a template of a virtual machine. The virtual machine must be in a STOPPED state. A template created from this command is automatically designated as a private template visible to the account that created it.
	CreateTemplateCmdByAdmin(context.Context, *connect.Request[v1.CreateTemplateCmdByAdminRequest]) (*connect.Response[v1.CreateTemplateCmdByAdminResponse], error)
	// DeleteTemplate Deletes a template from the system. All virtual machines using the deleted template will not be affected.
	DeleteTemplate(context.Context, *connect.Request[v1.DeleteTemplateRequest]) (*connect.Response[v1.DeleteTemplateResponse], error)
	// DeleteVnfTemplate Deletes a VNF template from the system. All virtual machines using the deleted template will not be affected.
	DeleteVnfTemplate(context.Context, *connect.Request[v1.DeleteVnfTemplateRequest]) (*connect.Response[v1.DeleteVnfTemplateResponse], error)
	// ExtractTemplate Extracts a template
	ExtractTemplate(context.Context, *connect.Request[v1.ExtractTemplateRequest]) (*connect.Response[v1.ExtractTemplateResponse], error)
	// GetUploadParamsForTemplate upload an existing template into the CloudStack cloud.
	GetUploadParamsForTemplate(context.Context, *connect.Request[v1.GetUploadParamsForTemplateRequest]) (*connect.Response[v1.GetUploadParamsForTemplateResponse], error)
	// ListTemplatePermissions List template visibility and all accounts that have permissions to view this template.
	ListTemplatePermissions(context.Context, *connect.Request[v1.ListTemplatePermissionsRequest]) (*connect.Response[v1.ListTemplatePermissionsResponse], error)
	// ListTemplatePermissionsCmdByAdmin List template visibility and all accounts that have permissions to view this template.
	ListTemplatePermissionsCmdByAdmin(context.Context, *connect.Request[v1.ListTemplatePermissionsCmdByAdminRequest]) (*connect.Response[v1.ListTemplatePermissionsCmdByAdminResponse], error)
	// ListTemplates List all public, private, and privileged templates.
	ListTemplates(context.Context, *connect.Request[v1.ListTemplatesRequest]) (*connect.Response[v1.ListTemplatesResponse], error)
	// ListTemplatesCmdByAdmin List all public, private, and privileged templates.
	ListTemplatesCmdByAdmin(context.Context, *connect.Request[v1.ListTemplatesCmdByAdminRequest]) (*connect.Response[v1.ListTemplatesCmdByAdminResponse], error)
	// ListVnfTemplates List all public, private, and privileged VNF templates.
	ListVnfTemplates(context.Context, *connect.Request[v1.ListVnfTemplatesRequest]) (*connect.Response[v1.ListVnfTemplatesResponse], error)
	// ListVnfTemplatesCmdByAdmin List all public, private, and privileged VNF templates.
	ListVnfTemplatesCmdByAdmin(context.Context, *connect.Request[v1.ListVnfTemplatesCmdByAdminRequest]) (*connect.Response[v1.ListVnfTemplatesCmdByAdminResponse], error)
	// PrepareTemplate load template into primary storage
	PrepareTemplate(context.Context, *connect.Request[v1.PrepareTemplateRequest]) (*connect.Response[v1.PrepareTemplateResponse], error)
	// RegisterTemplate Registers an existing template into the CloudStack cloud.
	RegisterTemplate(context.Context, *connect.Request[v1.RegisterTemplateRequest]) (*connect.Response[v1.RegisterTemplateResponse], error)
	// RegisterTemplateCmdByAdmin Registers an existing template into the CloudStack cloud.
	RegisterTemplateCmdByAdmin(context.Context, *connect.Request[v1.RegisterTemplateCmdByAdminRequest]) (*connect.Response[v1.RegisterTemplateCmdByAdminResponse], error)
	// RegisterVnfTemplate Registers an existing VNF template into the CloudStack cloud.
	RegisterVnfTemplate(context.Context, *connect.Request[v1.RegisterVnfTemplateRequest]) (*connect.Response[v1.RegisterVnfTemplateResponse], error)
	// RegisterVnfTemplateCmdByAdmin Registers an existing VNF template into the CloudStack cloud.
	RegisterVnfTemplateCmdByAdmin(context.Context, *connect.Request[v1.RegisterVnfTemplateCmdByAdminRequest]) (*connect.Response[v1.RegisterVnfTemplateCmdByAdminResponse], error)
	// UpdateTemplate Updates attributes of a template.
	UpdateTemplate(context.Context, *connect.Request[v1.UpdateTemplateRequest]) (*connect.Response[v1.UpdateTemplateResponse], error)
	// UpdateTemplateCmdByAdmin Updates attributes of a template.
	UpdateTemplateCmdByAdmin(context.Context, *connect.Request[v1.UpdateTemplateCmdByAdminRequest]) (*connect.Response[v1.UpdateTemplateCmdByAdminResponse], error)
	// UpdateTemplatePermissions Updates a template visibility permissions. A public template is visible to all accounts within the same domain. A private template is visible only to the owner of the template. A privileged template is a private template with account permissions added. Only accounts specified under the template permissions are visible to them.
	UpdateTemplatePermissions(context.Context, *connect.Request[v1.UpdateTemplatePermissionsRequest]) (*connect.Response[v1.UpdateTemplatePermissionsResponse], error)
	// UpdateVnfTemplate Updates a template to VNF template or attributes of a VNF template.
	UpdateVnfTemplate(context.Context, *connect.Request[v1.UpdateVnfTemplateRequest]) (*connect.Response[v1.UpdateVnfTemplateResponse], error)
	// UpdateVnfTemplateCmdByAdmin Updates a template to VNF template or attributes of a VNF template.
	UpdateVnfTemplateCmdByAdmin(context.Context, *connect.Request[v1.UpdateVnfTemplateCmdByAdminRequest]) (*connect.Response[v1.UpdateVnfTemplateCmdByAdminResponse], error)
}

TemplateServiceHandler is an implementation of the cloudstack.management.template.v1.TemplateService service.

type UnimplementedTemplateServiceHandler

type UnimplementedTemplateServiceHandler struct{}

UnimplementedTemplateServiceHandler returns CodeUnimplemented from all methods.

Jump to

Keyboard shortcuts

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