billing

package
v0.3.42 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: MIT Imports: 28 Imported by: 0

Documentation

Overview

Package billing is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	BillingManager_GetUsageMetrics_FullMethodName = "/prodvana.billing.BillingManager/GetUsageMetrics"
)

Variables

View Source
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)

View Source
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.

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

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

Cause function returns cause value.

func (GetUsageMetricsReqValidationError) Error

Error satisfies the builtin error interface

func (GetUsageMetricsReqValidationError) ErrorName

ErrorName returns error name.

func (GetUsageMetricsReqValidationError) Field

Field function returns field value.

func (GetUsageMetricsReqValidationError) Key

Key function returns key value.

func (GetUsageMetricsReqValidationError) Reason

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

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

Cause function returns cause value.

func (GetUsageMetricsRespValidationError) Error

Error satisfies the builtin error interface

func (GetUsageMetricsRespValidationError) ErrorName

ErrorName returns error name.

func (GetUsageMetricsRespValidationError) Field

Field function returns field value.

func (GetUsageMetricsRespValidationError) Key

Key function returns key value.

func (GetUsageMetricsRespValidationError) Reason

Reason function returns reason value.

type UnimplementedBillingManagerServer

type UnimplementedBillingManagerServer struct {
}

UnimplementedBillingManagerServer must be embedded to have forward compatible implementations.

func (UnimplementedBillingManagerServer) GetUsageMetrics

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

Cause function returns cause value.

func (UsageMetricsValidationError) Error

Error satisfies the builtin error interface

func (UsageMetricsValidationError) ErrorName

func (e UsageMetricsValidationError) ErrorName() string

ErrorName returns error name.

func (UsageMetricsValidationError) Field

Field function returns field value.

func (UsageMetricsValidationError) Key

Key function returns key value.

func (UsageMetricsValidationError) Reason

Reason function returns reason value.

Jump to

Keyboard shortcuts

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