aclv1connect

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 (
	// AclServiceCreateRoleProcedure is the fully-qualified name of the AclService's CreateRole RPC.
	AclServiceCreateRoleProcedure = "/cloudstack.management.acl.v1.AclService/CreateRole"
	// AclServiceCreateRolePermissionProcedure is the fully-qualified name of the AclService's
	// CreateRolePermission RPC.
	AclServiceCreateRolePermissionProcedure = "/cloudstack.management.acl.v1.AclService/CreateRolePermission"
	// AclServiceDeleteRoleProcedure is the fully-qualified name of the AclService's DeleteRole RPC.
	AclServiceDeleteRoleProcedure = "/cloudstack.management.acl.v1.AclService/DeleteRole"
	// AclServiceDeleteRolePermissionProcedure is the fully-qualified name of the AclService's
	// DeleteRolePermission RPC.
	AclServiceDeleteRolePermissionProcedure = "/cloudstack.management.acl.v1.AclService/DeleteRolePermission"
	// AclServiceDisableRoleProcedure is the fully-qualified name of the AclService's DisableRole RPC.
	AclServiceDisableRoleProcedure = "/cloudstack.management.acl.v1.AclService/DisableRole"
	// AclServiceEnableRoleProcedure is the fully-qualified name of the AclService's EnableRole RPC.
	AclServiceEnableRoleProcedure = "/cloudstack.management.acl.v1.AclService/EnableRole"
	// AclServiceImportRoleProcedure is the fully-qualified name of the AclService's ImportRole RPC.
	AclServiceImportRoleProcedure = "/cloudstack.management.acl.v1.AclService/ImportRole"
	// AclServiceListRolePermissionsProcedure is the fully-qualified name of the AclService's
	// ListRolePermissions RPC.
	AclServiceListRolePermissionsProcedure = "/cloudstack.management.acl.v1.AclService/ListRolePermissions"
	// AclServiceListRolesProcedure is the fully-qualified name of the AclService's ListRoles RPC.
	AclServiceListRolesProcedure = "/cloudstack.management.acl.v1.AclService/ListRoles"
	// AclServiceUpdateRoleProcedure is the fully-qualified name of the AclService's UpdateRole RPC.
	AclServiceUpdateRoleProcedure = "/cloudstack.management.acl.v1.AclService/UpdateRole"
	// AclServiceUpdateRolePermissionProcedure is the fully-qualified name of the AclService's
	// UpdateRolePermission RPC.
	AclServiceUpdateRolePermissionProcedure = "/cloudstack.management.acl.v1.AclService/UpdateRolePermission"
)

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 (
	// AclServiceName is the fully-qualified name of the AclService service.
	AclServiceName = "cloudstack.management.acl.v1.AclService"
)

Variables

This section is empty.

Functions

func NewAclServiceHandler

func NewAclServiceHandler(svc AclServiceHandler, opts ...connect.HandlerOption) (string, http.Handler)

NewAclServiceHandler 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 AclServiceClient

type AclServiceClient interface {
	// CreateRole Creates a role
	CreateRole(context.Context, *connect.Request[v1.CreateRoleRequest]) (*connect.Response[v1.CreateRoleResponse], error)
	// CreateRolePermission Adds an API permission to a role
	CreateRolePermission(context.Context, *connect.Request[v1.CreateRolePermissionRequest]) (*connect.Response[v1.CreateRolePermissionResponse], error)
	// DeleteRole Deletes a role
	DeleteRole(context.Context, *connect.Request[v1.DeleteRoleRequest]) (*connect.Response[v1.DeleteRoleResponse], error)
	// DeleteRolePermission Deletes a role permission
	DeleteRolePermission(context.Context, *connect.Request[v1.DeleteRolePermissionRequest]) (*connect.Response[v1.DeleteRolePermissionResponse], error)
	// DisableRole Disables a role
	DisableRole(context.Context, *connect.Request[v1.DisableRoleRequest]) (*connect.Response[v1.DisableRoleResponse], error)
	// EnableRole Enables a role
	EnableRole(context.Context, *connect.Request[v1.EnableRoleRequest]) (*connect.Response[v1.EnableRoleResponse], error)
	// ImportRole Imports a role based on provided map of rule permissions
	ImportRole(context.Context, *connect.Request[v1.ImportRoleRequest]) (*connect.Response[v1.ImportRoleResponse], error)
	// ListRolePermissions Lists role permissions
	ListRolePermissions(context.Context, *connect.Request[v1.ListRolePermissionsRequest]) (*connect.Response[v1.ListRolePermissionsResponse], error)
	// ListRoles Lists dynamic roles in CloudStack
	ListRoles(context.Context, *connect.Request[v1.ListRolesRequest]) (*connect.Response[v1.ListRolesResponse], error)
	// UpdateRole Updates a role
	UpdateRole(context.Context, *connect.Request[v1.UpdateRoleRequest]) (*connect.Response[v1.UpdateRoleResponse], error)
	// UpdateRolePermission Updates a role permission order
	UpdateRolePermission(context.Context, *connect.Request[v1.UpdateRolePermissionRequest]) (*connect.Response[v1.UpdateRolePermissionResponse], error)
}

AclServiceClient is a client for the cloudstack.management.acl.v1.AclService service.

func NewAclServiceClient

func NewAclServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) AclServiceClient

NewAclServiceClient constructs a client for the cloudstack.management.acl.v1.AclService 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 AclServiceHandler

type AclServiceHandler interface {
	// CreateRole Creates a role
	CreateRole(context.Context, *connect.Request[v1.CreateRoleRequest]) (*connect.Response[v1.CreateRoleResponse], error)
	// CreateRolePermission Adds an API permission to a role
	CreateRolePermission(context.Context, *connect.Request[v1.CreateRolePermissionRequest]) (*connect.Response[v1.CreateRolePermissionResponse], error)
	// DeleteRole Deletes a role
	DeleteRole(context.Context, *connect.Request[v1.DeleteRoleRequest]) (*connect.Response[v1.DeleteRoleResponse], error)
	// DeleteRolePermission Deletes a role permission
	DeleteRolePermission(context.Context, *connect.Request[v1.DeleteRolePermissionRequest]) (*connect.Response[v1.DeleteRolePermissionResponse], error)
	// DisableRole Disables a role
	DisableRole(context.Context, *connect.Request[v1.DisableRoleRequest]) (*connect.Response[v1.DisableRoleResponse], error)
	// EnableRole Enables a role
	EnableRole(context.Context, *connect.Request[v1.EnableRoleRequest]) (*connect.Response[v1.EnableRoleResponse], error)
	// ImportRole Imports a role based on provided map of rule permissions
	ImportRole(context.Context, *connect.Request[v1.ImportRoleRequest]) (*connect.Response[v1.ImportRoleResponse], error)
	// ListRolePermissions Lists role permissions
	ListRolePermissions(context.Context, *connect.Request[v1.ListRolePermissionsRequest]) (*connect.Response[v1.ListRolePermissionsResponse], error)
	// ListRoles Lists dynamic roles in CloudStack
	ListRoles(context.Context, *connect.Request[v1.ListRolesRequest]) (*connect.Response[v1.ListRolesResponse], error)
	// UpdateRole Updates a role
	UpdateRole(context.Context, *connect.Request[v1.UpdateRoleRequest]) (*connect.Response[v1.UpdateRoleResponse], error)
	// UpdateRolePermission Updates a role permission order
	UpdateRolePermission(context.Context, *connect.Request[v1.UpdateRolePermissionRequest]) (*connect.Response[v1.UpdateRolePermissionResponse], error)
}

AclServiceHandler is an implementation of the cloudstack.management.acl.v1.AclService service.

type UnimplementedAclServiceHandler

type UnimplementedAclServiceHandler struct{}

UnimplementedAclServiceHandler returns CodeUnimplemented from all methods.

Jump to

Keyboard shortcuts

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