Documentation ¶
Overview ¶
Package billing is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Constants
- Variables
- func RegisterBillingManagerHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterBillingManagerHandlerClient(ctx context.Context, mux *runtime.ServeMux, client BillingManagerClient) error
- func RegisterBillingManagerHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterBillingManagerHandlerServer(ctx context.Context, mux *runtime.ServeMux, server BillingManagerServer) error
- func RegisterBillingManagerServer(s grpc.ServiceRegistrar, srv BillingManagerServer)
- type BillingManagerClient
- type BillingManagerServer
- type GetUsageMetricsReq
- func (*GetUsageMetricsReq) Descriptor() ([]byte, []int)deprecated
- func (*GetUsageMetricsReq) ProtoMessage()
- func (x *GetUsageMetricsReq) ProtoReflect() protoreflect.Message
- func (x *GetUsageMetricsReq) Reset()
- func (x *GetUsageMetricsReq) String() string
- func (m *GetUsageMetricsReq) Validate() error
- func (m *GetUsageMetricsReq) ValidateAll() error
- type GetUsageMetricsReqMultiError
- type GetUsageMetricsReqValidationError
- func (e GetUsageMetricsReqValidationError) Cause() error
- func (e GetUsageMetricsReqValidationError) Error() string
- func (e GetUsageMetricsReqValidationError) ErrorName() string
- func (e GetUsageMetricsReqValidationError) Field() string
- func (e GetUsageMetricsReqValidationError) Key() bool
- func (e GetUsageMetricsReqValidationError) Reason() string
- type GetUsageMetricsResp
- func (*GetUsageMetricsResp) Descriptor() ([]byte, []int)deprecated
- func (x *GetUsageMetricsResp) GetUsageMetrics() *UsageMetrics
- func (*GetUsageMetricsResp) ProtoMessage()
- func (x *GetUsageMetricsResp) ProtoReflect() protoreflect.Message
- func (x *GetUsageMetricsResp) Reset()
- func (x *GetUsageMetricsResp) String() string
- func (m *GetUsageMetricsResp) Validate() error
- func (m *GetUsageMetricsResp) ValidateAll() error
- type GetUsageMetricsRespMultiError
- type GetUsageMetricsRespValidationError
- func (e GetUsageMetricsRespValidationError) Cause() error
- func (e GetUsageMetricsRespValidationError) Error() string
- func (e GetUsageMetricsRespValidationError) ErrorName() string
- func (e GetUsageMetricsRespValidationError) Field() string
- func (e GetUsageMetricsRespValidationError) Key() bool
- func (e GetUsageMetricsRespValidationError) Reason() string
- type UnimplementedBillingManagerServer
- type UnsafeBillingManagerServer
- type UsageMetrics
- func (*UsageMetrics) Descriptor() ([]byte, []int)deprecated
- func (x *UsageMetrics) GetNumApplications() int64
- func (x *UsageMetrics) GetNumRuntimes() int64
- func (x *UsageMetrics) GetNumUsers() int64
- func (*UsageMetrics) ProtoMessage()
- func (x *UsageMetrics) ProtoReflect() protoreflect.Message
- func (x *UsageMetrics) Reset()
- func (x *UsageMetrics) String() string
- func (m *UsageMetrics) Validate() error
- func (m *UsageMetrics) ValidateAll() error
- type UsageMetricsMultiError
- type UsageMetricsValidationError
- func (e UsageMetricsValidationError) Cause() error
- func (e UsageMetricsValidationError) Error() string
- func (e UsageMetricsValidationError) ErrorName() string
- func (e UsageMetricsValidationError) Field() string
- func (e UsageMetricsValidationError) Key() bool
- func (e UsageMetricsValidationError) Reason() string
Constants ¶
const (
BillingManager_GetUsageMetrics_FullMethodName = "/prodvana.billing.BillingManager/GetUsageMetrics"
)
Variables ¶
var BillingManager_ServiceDesc = grpc.ServiceDesc{ ServiceName: "prodvana.billing.BillingManager", HandlerType: (*BillingManagerServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetUsageMetrics", Handler: _BillingManager_GetUsageMetrics_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "prodvana/billing/manager.proto", }
BillingManager_ServiceDesc is the grpc.ServiceDesc for BillingManager service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_prodvana_billing_manager_proto protoreflect.FileDescriptor
Functions ¶
func RegisterBillingManagerHandler ¶
func RegisterBillingManagerHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterBillingManagerHandler registers the http handlers for service BillingManager to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterBillingManagerHandlerClient ¶
func RegisterBillingManagerHandlerClient(ctx context.Context, mux *runtime.ServeMux, client BillingManagerClient) error
RegisterBillingManagerHandlerClient registers the http handlers for service BillingManager to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "BillingManagerClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "BillingManagerClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "BillingManagerClient" to call the correct interceptors.
func RegisterBillingManagerHandlerFromEndpoint ¶
func RegisterBillingManagerHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterBillingManagerHandlerFromEndpoint is same as RegisterBillingManagerHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterBillingManagerHandlerServer ¶
func RegisterBillingManagerHandlerServer(ctx context.Context, mux *runtime.ServeMux, server BillingManagerServer) error
RegisterBillingManagerHandlerServer registers the http handlers for service BillingManager to "mux". UnaryRPC :call BillingManagerServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterBillingManagerHandlerFromEndpoint instead.
func RegisterBillingManagerServer ¶
func RegisterBillingManagerServer(s grpc.ServiceRegistrar, srv BillingManagerServer)
Types ¶
type BillingManagerClient ¶
type BillingManagerClient interface {
GetUsageMetrics(ctx context.Context, in *GetUsageMetricsReq, opts ...grpc.CallOption) (*GetUsageMetricsResp, error)
}
BillingManagerClient is the client API for BillingManager service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewBillingManagerClient ¶
func NewBillingManagerClient(cc grpc.ClientConnInterface) BillingManagerClient
type BillingManagerServer ¶
type BillingManagerServer interface { GetUsageMetrics(context.Context, *GetUsageMetricsReq) (*GetUsageMetricsResp, error) // contains filtered or unexported methods }
BillingManagerServer is the server API for BillingManager service. All implementations must embed UnimplementedBillingManagerServer for forward compatibility
type GetUsageMetricsReq ¶
type GetUsageMetricsReq struct {
// contains filtered or unexported fields
}
func (*GetUsageMetricsReq) Descriptor
deprecated
func (*GetUsageMetricsReq) Descriptor() ([]byte, []int)
Deprecated: Use GetUsageMetricsReq.ProtoReflect.Descriptor instead.
func (*GetUsageMetricsReq) ProtoMessage ¶
func (*GetUsageMetricsReq) ProtoMessage()
func (*GetUsageMetricsReq) ProtoReflect ¶
func (x *GetUsageMetricsReq) ProtoReflect() protoreflect.Message
func (*GetUsageMetricsReq) Reset ¶
func (x *GetUsageMetricsReq) Reset()
func (*GetUsageMetricsReq) String ¶
func (x *GetUsageMetricsReq) String() string
func (*GetUsageMetricsReq) Validate ¶
func (m *GetUsageMetricsReq) Validate() error
Validate checks the field values on GetUsageMetricsReq with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*GetUsageMetricsReq) ValidateAll ¶
func (m *GetUsageMetricsReq) ValidateAll() error
ValidateAll checks the field values on GetUsageMetricsReq with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in GetUsageMetricsReqMultiError, or nil if none found.
type GetUsageMetricsReqMultiError ¶
type GetUsageMetricsReqMultiError []error
GetUsageMetricsReqMultiError is an error wrapping multiple validation errors returned by GetUsageMetricsReq.ValidateAll() if the designated constraints aren't met.
func (GetUsageMetricsReqMultiError) AllErrors ¶
func (m GetUsageMetricsReqMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (GetUsageMetricsReqMultiError) Error ¶
func (m GetUsageMetricsReqMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type GetUsageMetricsReqValidationError ¶
type GetUsageMetricsReqValidationError struct {
// contains filtered or unexported fields
}
GetUsageMetricsReqValidationError is the validation error returned by GetUsageMetricsReq.Validate if the designated constraints aren't met.
func (GetUsageMetricsReqValidationError) Cause ¶
func (e GetUsageMetricsReqValidationError) Cause() error
Cause function returns cause value.
func (GetUsageMetricsReqValidationError) Error ¶
func (e GetUsageMetricsReqValidationError) Error() string
Error satisfies the builtin error interface
func (GetUsageMetricsReqValidationError) ErrorName ¶
func (e GetUsageMetricsReqValidationError) ErrorName() string
ErrorName returns error name.
func (GetUsageMetricsReqValidationError) Field ¶
func (e GetUsageMetricsReqValidationError) Field() string
Field function returns field value.
func (GetUsageMetricsReqValidationError) Key ¶
func (e GetUsageMetricsReqValidationError) Key() bool
Key function returns key value.
func (GetUsageMetricsReqValidationError) Reason ¶
func (e GetUsageMetricsReqValidationError) Reason() string
Reason function returns reason value.
type GetUsageMetricsResp ¶
type GetUsageMetricsResp struct { UsageMetrics *UsageMetrics `protobuf:"bytes,1,opt,name=usage_metrics,json=usageMetrics,proto3" json:"usage_metrics,omitempty"` // contains filtered or unexported fields }
func (*GetUsageMetricsResp) Descriptor
deprecated
func (*GetUsageMetricsResp) Descriptor() ([]byte, []int)
Deprecated: Use GetUsageMetricsResp.ProtoReflect.Descriptor instead.
func (*GetUsageMetricsResp) GetUsageMetrics ¶
func (x *GetUsageMetricsResp) GetUsageMetrics() *UsageMetrics
func (*GetUsageMetricsResp) ProtoMessage ¶
func (*GetUsageMetricsResp) ProtoMessage()
func (*GetUsageMetricsResp) ProtoReflect ¶
func (x *GetUsageMetricsResp) ProtoReflect() protoreflect.Message
func (*GetUsageMetricsResp) Reset ¶
func (x *GetUsageMetricsResp) Reset()
func (*GetUsageMetricsResp) String ¶
func (x *GetUsageMetricsResp) String() string
func (*GetUsageMetricsResp) Validate ¶
func (m *GetUsageMetricsResp) Validate() error
Validate checks the field values on GetUsageMetricsResp with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*GetUsageMetricsResp) ValidateAll ¶
func (m *GetUsageMetricsResp) ValidateAll() error
ValidateAll checks the field values on GetUsageMetricsResp with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in GetUsageMetricsRespMultiError, or nil if none found.
type GetUsageMetricsRespMultiError ¶
type GetUsageMetricsRespMultiError []error
GetUsageMetricsRespMultiError is an error wrapping multiple validation errors returned by GetUsageMetricsResp.ValidateAll() if the designated constraints aren't met.
func (GetUsageMetricsRespMultiError) AllErrors ¶
func (m GetUsageMetricsRespMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (GetUsageMetricsRespMultiError) Error ¶
func (m GetUsageMetricsRespMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type GetUsageMetricsRespValidationError ¶
type GetUsageMetricsRespValidationError struct {
// contains filtered or unexported fields
}
GetUsageMetricsRespValidationError is the validation error returned by GetUsageMetricsResp.Validate if the designated constraints aren't met.
func (GetUsageMetricsRespValidationError) Cause ¶
func (e GetUsageMetricsRespValidationError) Cause() error
Cause function returns cause value.
func (GetUsageMetricsRespValidationError) Error ¶
func (e GetUsageMetricsRespValidationError) Error() string
Error satisfies the builtin error interface
func (GetUsageMetricsRespValidationError) ErrorName ¶
func (e GetUsageMetricsRespValidationError) ErrorName() string
ErrorName returns error name.
func (GetUsageMetricsRespValidationError) Field ¶
func (e GetUsageMetricsRespValidationError) Field() string
Field function returns field value.
func (GetUsageMetricsRespValidationError) Key ¶
func (e GetUsageMetricsRespValidationError) Key() bool
Key function returns key value.
func (GetUsageMetricsRespValidationError) Reason ¶
func (e GetUsageMetricsRespValidationError) Reason() string
Reason function returns reason value.
type UnimplementedBillingManagerServer ¶
type UnimplementedBillingManagerServer struct { }
UnimplementedBillingManagerServer must be embedded to have forward compatible implementations.
func (UnimplementedBillingManagerServer) GetUsageMetrics ¶
func (UnimplementedBillingManagerServer) GetUsageMetrics(context.Context, *GetUsageMetricsReq) (*GetUsageMetricsResp, error)
type UnsafeBillingManagerServer ¶
type UnsafeBillingManagerServer interface {
// contains filtered or unexported methods
}
UnsafeBillingManagerServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to BillingManagerServer will result in compilation errors.
type UsageMetrics ¶
type UsageMetrics struct { NumUsers int64 `protobuf:"varint,1,opt,name=num_users,json=numUsers,proto3" json:"num_users,omitempty"` NumRuntimes int64 `protobuf:"varint,2,opt,name=num_runtimes,json=numRuntimes,proto3" json:"num_runtimes,omitempty"` NumApplications int64 `protobuf:"varint,3,opt,name=num_applications,json=numApplications,proto3" json:"num_applications,omitempty"` // contains filtered or unexported fields }
func (*UsageMetrics) Descriptor
deprecated
func (*UsageMetrics) Descriptor() ([]byte, []int)
Deprecated: Use UsageMetrics.ProtoReflect.Descriptor instead.
func (*UsageMetrics) GetNumApplications ¶
func (x *UsageMetrics) GetNumApplications() int64
func (*UsageMetrics) GetNumRuntimes ¶
func (x *UsageMetrics) GetNumRuntimes() int64
func (*UsageMetrics) GetNumUsers ¶
func (x *UsageMetrics) GetNumUsers() int64
func (*UsageMetrics) ProtoMessage ¶
func (*UsageMetrics) ProtoMessage()
func (*UsageMetrics) ProtoReflect ¶
func (x *UsageMetrics) ProtoReflect() protoreflect.Message
func (*UsageMetrics) Reset ¶
func (x *UsageMetrics) Reset()
func (*UsageMetrics) String ¶
func (x *UsageMetrics) String() string
func (*UsageMetrics) Validate ¶
func (m *UsageMetrics) Validate() error
Validate checks the field values on UsageMetrics with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*UsageMetrics) ValidateAll ¶
func (m *UsageMetrics) ValidateAll() error
ValidateAll checks the field values on UsageMetrics with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in UsageMetricsMultiError, or nil if none found.
type UsageMetricsMultiError ¶
type UsageMetricsMultiError []error
UsageMetricsMultiError is an error wrapping multiple validation errors returned by UsageMetrics.ValidateAll() if the designated constraints aren't met.
func (UsageMetricsMultiError) AllErrors ¶
func (m UsageMetricsMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (UsageMetricsMultiError) Error ¶
func (m UsageMetricsMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type UsageMetricsValidationError ¶
type UsageMetricsValidationError struct {
// contains filtered or unexported fields
}
UsageMetricsValidationError is the validation error returned by UsageMetrics.Validate if the designated constraints aren't met.
func (UsageMetricsValidationError) Cause ¶
func (e UsageMetricsValidationError) Cause() error
Cause function returns cause value.
func (UsageMetricsValidationError) Error ¶
func (e UsageMetricsValidationError) Error() string
Error satisfies the builtin error interface
func (UsageMetricsValidationError) ErrorName ¶
func (e UsageMetricsValidationError) ErrorName() string
ErrorName returns error name.
func (UsageMetricsValidationError) Field ¶
func (e UsageMetricsValidationError) Field() string
Field function returns field value.
func (UsageMetricsValidationError) Key ¶
func (e UsageMetricsValidationError) Key() bool
Key function returns key value.
func (UsageMetricsValidationError) Reason ¶
func (e UsageMetricsValidationError) Reason() string
Reason function returns reason value.