Documentation ¶
Overview ¶
Package billing is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterBillingHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterBillingHandlerClient(ctx context.Context, mux *runtime.ServeMux, client BillingClient) error
- func RegisterBillingHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterBillingHandlerServer(ctx context.Context, mux *runtime.ServeMux, server BillingServer) error
- func RegisterBillingServer(s grpc.ServiceRegistrar, srv BillingServer)
- type BillingClient
- type BillingGroup
- func (*BillingGroup) Descriptor() ([]byte, []int)deprecated
- func (x *BillingGroup) GetBillingGroupId() string
- func (x *BillingGroup) GetBillingGroupName() string
- func (x *BillingGroup) GetBillingInternalId() string
- func (*BillingGroup) ProtoMessage()
- func (x *BillingGroup) ProtoReflect() protoreflect.Message
- func (x *BillingGroup) Reset()
- func (x *BillingGroup) String() string
- type BillingServer
- type Billing_ListBillingGroupsClient
- type Billing_ListBillingGroupsServer
- type ClientOptions
- type GrpcClient
- type ListBillingGroupsRequest
- type UnimplementedBillingServer
- type UnsafeBillingServer
Constants ¶
This section is empty.
Variables ¶
var Billing_ServiceDesc = grpc.ServiceDesc{ ServiceName: "blueapi.billing.v1.Billing", HandlerType: (*BillingServer)(nil), Methods: []grpc.MethodDesc{}, Streams: []grpc.StreamDesc{ { StreamName: "ListBillingGroups", Handler: _Billing_ListBillingGroups_Handler, ServerStreams: true, }, }, Metadata: "billing/v1/billing.proto", }
Billing_ServiceDesc is the grpc.ServiceDesc for Billing service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_billing_v1_billing_proto protoreflect.FileDescriptor
Functions ¶
func RegisterBillingHandler ¶
func RegisterBillingHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterBillingHandler registers the http handlers for service Billing to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterBillingHandlerClient ¶
func RegisterBillingHandlerClient(ctx context.Context, mux *runtime.ServeMux, client BillingClient) error
RegisterBillingHandlerClient registers the http handlers for service Billing to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "BillingClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "BillingClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "BillingClient" to call the correct interceptors.
func RegisterBillingHandlerFromEndpoint ¶
func RegisterBillingHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterBillingHandlerFromEndpoint is same as RegisterBillingHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterBillingHandlerServer ¶
func RegisterBillingHandlerServer(ctx context.Context, mux *runtime.ServeMux, server BillingServer) error
RegisterBillingHandlerServer registers the http handlers for service Billing to "mux". UnaryRPC :call BillingServer 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 RegisterBillingHandlerFromEndpoint instead.
func RegisterBillingServer ¶
func RegisterBillingServer(s grpc.ServiceRegistrar, srv BillingServer)
Types ¶
type BillingClient ¶
type BillingClient interface { // Lists all billing groups. ListBillingGroups(ctx context.Context, in *ListBillingGroupsRequest, opts ...grpc.CallOption) (Billing_ListBillingGroupsClient, error) }
BillingClient is the client API for Billing 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 NewBillingClient ¶
func NewBillingClient(cc grpc.ClientConnInterface) BillingClient
type BillingGroup ¶
type BillingGroup struct { // The billing group's internal id. BillingInternalId string `protobuf:"bytes,1,opt,name=billingInternalId,proto3" json:"billingInternalId,omitempty"` // The billing group id. BillingGroupId string `protobuf:"bytes,2,opt,name=billingGroupId,proto3" json:"billingGroupId,omitempty"` // The billing group name. BillingGroupName string `protobuf:"bytes,3,opt,name=billingGroupName,proto3" json:"billingGroupName,omitempty"` // contains filtered or unexported fields }
func (*BillingGroup) Descriptor
deprecated
func (*BillingGroup) Descriptor() ([]byte, []int)
Deprecated: Use BillingGroup.ProtoReflect.Descriptor instead.
func (*BillingGroup) GetBillingGroupId ¶
func (x *BillingGroup) GetBillingGroupId() string
func (*BillingGroup) GetBillingGroupName ¶
func (x *BillingGroup) GetBillingGroupName() string
func (*BillingGroup) GetBillingInternalId ¶ added in v0.32.0
func (x *BillingGroup) GetBillingInternalId() string
func (*BillingGroup) ProtoMessage ¶
func (*BillingGroup) ProtoMessage()
func (*BillingGroup) ProtoReflect ¶
func (x *BillingGroup) ProtoReflect() protoreflect.Message
func (*BillingGroup) Reset ¶
func (x *BillingGroup) Reset()
func (*BillingGroup) String ¶
func (x *BillingGroup) String() string
type BillingServer ¶
type BillingServer interface { // Lists all billing groups. ListBillingGroups(*ListBillingGroupsRequest, Billing_ListBillingGroupsServer) error // contains filtered or unexported methods }
BillingServer is the server API for Billing service. All implementations must embed UnimplementedBillingServer for forward compatibility
type Billing_ListBillingGroupsClient ¶
type Billing_ListBillingGroupsClient interface { Recv() (*BillingGroup, error) grpc.ClientStream }
type Billing_ListBillingGroupsServer ¶
type Billing_ListBillingGroupsServer interface { Send(*BillingGroup) error grpc.ServerStream }
type ClientOptions ¶
type ClientOptions struct {
Conn *conn.GrpcClientConn
}
ClientOptions represents the optional options to NewClient.
type GrpcClient ¶
type GrpcClient struct { BillingClient // contains filtered or unexported fields }
func NewClient ¶
func NewClient(ctx context.Context, opts ...*ClientOptions) (*GrpcClient, error)
NewClient returns a client connection to the 'billing' service.
func (*GrpcClient) Close ¶
func (c *GrpcClient) Close()
type ListBillingGroupsRequest ¶
type ListBillingGroupsRequest struct {
// contains filtered or unexported fields
}
Request message for the Billing.ListBillingGroups rpc.
func (*ListBillingGroupsRequest) Descriptor
deprecated
func (*ListBillingGroupsRequest) Descriptor() ([]byte, []int)
Deprecated: Use ListBillingGroupsRequest.ProtoReflect.Descriptor instead.
func (*ListBillingGroupsRequest) ProtoMessage ¶
func (*ListBillingGroupsRequest) ProtoMessage()
func (*ListBillingGroupsRequest) ProtoReflect ¶
func (x *ListBillingGroupsRequest) ProtoReflect() protoreflect.Message
func (*ListBillingGroupsRequest) Reset ¶
func (x *ListBillingGroupsRequest) Reset()
func (*ListBillingGroupsRequest) String ¶
func (x *ListBillingGroupsRequest) String() string
type UnimplementedBillingServer ¶
type UnimplementedBillingServer struct { }
UnimplementedBillingServer must be embedded to have forward compatible implementations.
func (UnimplementedBillingServer) ListBillingGroups ¶
func (UnimplementedBillingServer) ListBillingGroups(*ListBillingGroupsRequest, Billing_ListBillingGroupsServer) error
type UnsafeBillingServer ¶
type UnsafeBillingServer interface {
// contains filtered or unexported methods
}
UnsafeBillingServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to BillingServer will result in compilation errors.