Documentation
¶
Index ¶
- Constants
- func NewNatServiceHandler(svc NatServiceHandler, opts ...connect.HandlerOption) (string, http.Handler)
- type NatServiceClient
- type NatServiceHandler
- type UnimplementedNatServiceHandler
- func (UnimplementedNatServiceHandler) CreateIpForwardingRule(context.Context, *connect.Request[v1.CreateIpForwardingRuleRequest]) (*connect.Response[v1.CreateIpForwardingRuleResponse], error)
- func (UnimplementedNatServiceHandler) DeleteIpForwardingRule(context.Context, *connect.Request[v1.DeleteIpForwardingRuleRequest]) (*connect.Response[v1.DeleteIpForwardingRuleResponse], error)
- func (UnimplementedNatServiceHandler) DisableStaticNat(context.Context, *connect.Request[v1.DisableStaticNatRequest]) (*connect.Response[v1.DisableStaticNatResponse], error)
- func (UnimplementedNatServiceHandler) EnableStaticNat(context.Context, *connect.Request[v1.EnableStaticNatRequest]) (*connect.Response[v1.EnableStaticNatResponse], error)
- func (UnimplementedNatServiceHandler) ListIpForwardingRules(context.Context, *connect.Request[v1.ListIpForwardingRulesRequest]) (*connect.Response[v1.ListIpForwardingRulesResponse], error)
Constants ¶
const ( // NatServiceCreateIpForwardingRuleProcedure is the fully-qualified name of the NatService's // CreateIpForwardingRule RPC. NatServiceCreateIpForwardingRuleProcedure = "/cloudstack.management.nat.v1.NatService/CreateIpForwardingRule" // NatServiceDeleteIpForwardingRuleProcedure is the fully-qualified name of the NatService's // DeleteIpForwardingRule RPC. NatServiceDeleteIpForwardingRuleProcedure = "/cloudstack.management.nat.v1.NatService/DeleteIpForwardingRule" // NatServiceDisableStaticNatProcedure is the fully-qualified name of the NatService's // DisableStaticNat RPC. NatServiceDisableStaticNatProcedure = "/cloudstack.management.nat.v1.NatService/DisableStaticNat" // NatServiceEnableStaticNatProcedure is the fully-qualified name of the NatService's // EnableStaticNat RPC. NatServiceEnableStaticNatProcedure = "/cloudstack.management.nat.v1.NatService/EnableStaticNat" // NatServiceListIpForwardingRulesProcedure is the fully-qualified name of the NatService's // ListIpForwardingRules RPC. NatServiceListIpForwardingRulesProcedure = "/cloudstack.management.nat.v1.NatService/ListIpForwardingRules" )
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 (
// NatServiceName is the fully-qualified name of the NatService service.
NatServiceName = "cloudstack.management.nat.v1.NatService"
)
Variables ¶
This section is empty.
Functions ¶
func NewNatServiceHandler ¶
func NewNatServiceHandler(svc NatServiceHandler, opts ...connect.HandlerOption) (string, http.Handler)
NewNatServiceHandler 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 NatServiceClient ¶
type NatServiceClient interface {
// CreateIpForwardingRule Creates an IP forwarding rule
CreateIpForwardingRule(context.Context, *connect.Request[v1.CreateIpForwardingRuleRequest]) (*connect.Response[v1.CreateIpForwardingRuleResponse], error)
// DeleteIpForwardingRule Deletes an IP forwarding rule
DeleteIpForwardingRule(context.Context, *connect.Request[v1.DeleteIpForwardingRuleRequest]) (*connect.Response[v1.DeleteIpForwardingRuleResponse], error)
// DisableStaticNat Disables static rule for given IP address
DisableStaticNat(context.Context, *connect.Request[v1.DisableStaticNatRequest]) (*connect.Response[v1.DisableStaticNatResponse], error)
// EnableStaticNat Enables static NAT for given IP address
EnableStaticNat(context.Context, *connect.Request[v1.EnableStaticNatRequest]) (*connect.Response[v1.EnableStaticNatResponse], error)
// ListIpForwardingRules List the IP forwarding rules
ListIpForwardingRules(context.Context, *connect.Request[v1.ListIpForwardingRulesRequest]) (*connect.Response[v1.ListIpForwardingRulesResponse], error)
}
NatServiceClient is a client for the cloudstack.management.nat.v1.NatService service.
func NewNatServiceClient ¶
func NewNatServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) NatServiceClient
NewNatServiceClient constructs a client for the cloudstack.management.nat.v1.NatService 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 NatServiceHandler ¶
type NatServiceHandler interface {
// CreateIpForwardingRule Creates an IP forwarding rule
CreateIpForwardingRule(context.Context, *connect.Request[v1.CreateIpForwardingRuleRequest]) (*connect.Response[v1.CreateIpForwardingRuleResponse], error)
// DeleteIpForwardingRule Deletes an IP forwarding rule
DeleteIpForwardingRule(context.Context, *connect.Request[v1.DeleteIpForwardingRuleRequest]) (*connect.Response[v1.DeleteIpForwardingRuleResponse], error)
// DisableStaticNat Disables static rule for given IP address
DisableStaticNat(context.Context, *connect.Request[v1.DisableStaticNatRequest]) (*connect.Response[v1.DisableStaticNatResponse], error)
// EnableStaticNat Enables static NAT for given IP address
EnableStaticNat(context.Context, *connect.Request[v1.EnableStaticNatRequest]) (*connect.Response[v1.EnableStaticNatResponse], error)
// ListIpForwardingRules List the IP forwarding rules
ListIpForwardingRules(context.Context, *connect.Request[v1.ListIpForwardingRulesRequest]) (*connect.Response[v1.ListIpForwardingRulesResponse], error)
}
NatServiceHandler is an implementation of the cloudstack.management.nat.v1.NatService service.
type UnimplementedNatServiceHandler ¶
type UnimplementedNatServiceHandler struct{}
UnimplementedNatServiceHandler returns CodeUnimplemented from all methods.
func (UnimplementedNatServiceHandler) CreateIpForwardingRule ¶
func (UnimplementedNatServiceHandler) CreateIpForwardingRule(context.Context, *connect.Request[v1.CreateIpForwardingRuleRequest]) (*connect.Response[v1.CreateIpForwardingRuleResponse], error)
func (UnimplementedNatServiceHandler) DeleteIpForwardingRule ¶
func (UnimplementedNatServiceHandler) DeleteIpForwardingRule(context.Context, *connect.Request[v1.DeleteIpForwardingRuleRequest]) (*connect.Response[v1.DeleteIpForwardingRuleResponse], error)
func (UnimplementedNatServiceHandler) DisableStaticNat ¶
func (UnimplementedNatServiceHandler) DisableStaticNat(context.Context, *connect.Request[v1.DisableStaticNatRequest]) (*connect.Response[v1.DisableStaticNatResponse], error)
func (UnimplementedNatServiceHandler) EnableStaticNat ¶
func (UnimplementedNatServiceHandler) EnableStaticNat(context.Context, *connect.Request[v1.EnableStaticNatRequest]) (*connect.Response[v1.EnableStaticNatResponse], error)
func (UnimplementedNatServiceHandler) ListIpForwardingRules ¶
func (UnimplementedNatServiceHandler) ListIpForwardingRules(context.Context, *connect.Request[v1.ListIpForwardingRulesRequest]) (*connect.Response[v1.ListIpForwardingRulesResponse], error)