billing

package
v0.47.0 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2021 License: Apache-2.0 Imports: 19 Imported by: 2

Documentation

Overview

Package billing is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
var Billing_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "blueapi.billing.v1.Billing",
	HandlerType: (*BillingServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "CreateBillingGroup",
			Handler:    _Billing_CreateBillingGroup_Handler,
		},
		{
			MethodName: "GetBillingGroup",
			Handler:    _Billing_GetBillingGroup_Handler,
		},
	},
	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)

View Source
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)
	// Registers a billing group.
	CreateBillingGroup(ctx context.Context, in *CreateBillingGroupRequest, opts ...grpc.CallOption) (*BillingGroup, error)
	// Gets a billing group.
	GetBillingGroup(ctx context.Context, in *GetBillingGroupRequest, opts ...grpc.CallOption) (*GetBillingGroupResponse, 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"`
	// List of all accounts
	Accounts []*api.Account `protobuf:"bytes,4,rep,name=accounts,proto3" json:"accounts,omitempty"`
	// contains filtered or unexported fields
}

func (*BillingGroup) Descriptor deprecated

func (*BillingGroup) Descriptor() ([]byte, []int)

Deprecated: Use BillingGroup.ProtoReflect.Descriptor instead.

func (*BillingGroup) GetAccounts added in v0.36.3

func (x *BillingGroup) GetAccounts() []*api.Account

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
	// Registers a billing group.
	CreateBillingGroup(context.Context, *CreateBillingGroupRequest) (*BillingGroup, error)
	// Gets a billing group.
	GetBillingGroup(context.Context, *GetBillingGroupRequest) (*GetBillingGroupResponse, 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 CreateBillingGroupRequest added in v0.35.11

type CreateBillingGroupRequest struct {

	// Required. The billing group's id.
	BillingGroupId string `protobuf:"bytes,1,opt,name=billingGroupId,proto3" json:"billingGroupId,omitempty"`
	// Required. The billing group's name.
	BillingGroupName string `protobuf:"bytes,2,opt,name=billingGroupName,proto3" json:"billingGroupName,omitempty"`
	// Required. Company’s name
	CompanyName string `protobuf:"bytes,3,opt,name=companyName,proto3" json:"companyName,omitempty"`
	// Optional. The title of the billing
	BillingTitle string `protobuf:"bytes,4,opt,name=billingTitle,proto3" json:"billingTitle,omitempty"`
	// Optional. Company’s phone number
	PhoneNumber string `protobuf:"bytes,5,opt,name=phoneNumber,proto3" json:"phoneNumber,omitempty"`
	// Optional. Company’s postal code
	PostalCode string `protobuf:"bytes,6,opt,name=postalCode,proto3" json:"postalCode,omitempty"`
	// Optional. Company’s address
	Address string `protobuf:"bytes,7,opt,name=address,proto3" json:"address,omitempty"`
	// Optional. Addressee
	Personal string `protobuf:"bytes,8,opt,name=personal,proto3" json:"personal,omitempty"`
	// Optional. Any remarks about the billing group
	Remarks string `protobuf:"bytes,9,opt,name=remarks,proto3" json:"remarks,omitempty"`
	// Optional. Project code
	ProjectId string `protobuf:"bytes,10,opt,name=projectId,proto3" json:"projectId,omitempty"`
	// Optional. Invoice language
	Language string `protobuf:"bytes,11,opt,name=language,proto3" json:"language,omitempty"`
	// Optional. Calculation type, true unblended or unblended
	DisplayCost string `protobuf:"bytes,12,opt,name=displayCost,proto3" json:"displayCost,omitempty"`
	// Optional. Exchange rate type, payer or billing group
	ExchangeRateType string `protobuf:"bytes,13,opt,name=exchangeRateType,proto3" json:"exchangeRateType,omitempty"`
	// Invoice settings
	Invoices *CreateBillingGroupRequestInvoice `protobuf:"bytes,14,opt,name=invoices,proto3" json:"invoices,omitempty"`
	// contains filtered or unexported fields
}

Request message for the Billing.CreateBillingGroup rpc.

func (*CreateBillingGroupRequest) Descriptor deprecated added in v0.35.11

func (*CreateBillingGroupRequest) Descriptor() ([]byte, []int)

Deprecated: Use CreateBillingGroupRequest.ProtoReflect.Descriptor instead.

func (*CreateBillingGroupRequest) GetAddress added in v0.35.11

func (x *CreateBillingGroupRequest) GetAddress() string

func (*CreateBillingGroupRequest) GetBillingGroupId added in v0.35.11

func (x *CreateBillingGroupRequest) GetBillingGroupId() string

func (*CreateBillingGroupRequest) GetBillingGroupName added in v0.35.11

func (x *CreateBillingGroupRequest) GetBillingGroupName() string

func (*CreateBillingGroupRequest) GetBillingTitle added in v0.35.11

func (x *CreateBillingGroupRequest) GetBillingTitle() string

func (*CreateBillingGroupRequest) GetCompanyName added in v0.35.11

func (x *CreateBillingGroupRequest) GetCompanyName() string

func (*CreateBillingGroupRequest) GetDisplayCost added in v0.35.11

func (x *CreateBillingGroupRequest) GetDisplayCost() string

func (*CreateBillingGroupRequest) GetExchangeRateType added in v0.35.11

func (x *CreateBillingGroupRequest) GetExchangeRateType() string

func (*CreateBillingGroupRequest) GetInvoices added in v0.35.13

func (*CreateBillingGroupRequest) GetLanguage added in v0.35.11

func (x *CreateBillingGroupRequest) GetLanguage() string

func (*CreateBillingGroupRequest) GetPersonal added in v0.35.11

func (x *CreateBillingGroupRequest) GetPersonal() string

func (*CreateBillingGroupRequest) GetPhoneNumber added in v0.35.11

func (x *CreateBillingGroupRequest) GetPhoneNumber() string

func (*CreateBillingGroupRequest) GetPostalCode added in v0.35.11

func (x *CreateBillingGroupRequest) GetPostalCode() string

func (*CreateBillingGroupRequest) GetProjectId added in v0.35.11

func (x *CreateBillingGroupRequest) GetProjectId() string

func (*CreateBillingGroupRequest) GetRemarks added in v0.35.11

func (x *CreateBillingGroupRequest) GetRemarks() string

func (*CreateBillingGroupRequest) ProtoMessage added in v0.35.11

func (*CreateBillingGroupRequest) ProtoMessage()

func (*CreateBillingGroupRequest) ProtoReflect added in v0.35.11

func (*CreateBillingGroupRequest) Reset added in v0.35.11

func (x *CreateBillingGroupRequest) Reset()

func (*CreateBillingGroupRequest) String added in v0.35.11

func (x *CreateBillingGroupRequest) String() string

type CreateBillingGroupRequestInvoice added in v0.35.13

type CreateBillingGroupRequestInvoice struct {

	// AWS invoice settings
	Aws *CreateBillingGroupRequestInvoiceVendor `protobuf:"bytes,1,opt,name=aws,proto3" json:"aws,omitempty"`
	// Azure invoice settings
	Azure *CreateBillingGroupRequestInvoiceVendor `protobuf:"bytes,2,opt,name=azure,proto3" json:"azure,omitempty"`
	// GCP invoice settings
	Gcp *CreateBillingGroupRequestInvoiceVendor `protobuf:"bytes,3,opt,name=gcp,proto3" json:"gcp,omitempty"`
	// contains filtered or unexported fields
}

Vendor invoice setttings

func (*CreateBillingGroupRequestInvoice) Descriptor deprecated added in v0.35.13

func (*CreateBillingGroupRequestInvoice) Descriptor() ([]byte, []int)

Deprecated: Use CreateBillingGroupRequestInvoice.ProtoReflect.Descriptor instead.

func (*CreateBillingGroupRequestInvoice) GetAws added in v0.35.13

func (*CreateBillingGroupRequestInvoice) GetAzure added in v0.35.13

func (*CreateBillingGroupRequestInvoice) GetGcp added in v0.35.13

func (*CreateBillingGroupRequestInvoice) ProtoMessage added in v0.35.13

func (*CreateBillingGroupRequestInvoice) ProtoMessage()

func (*CreateBillingGroupRequestInvoice) ProtoReflect added in v0.35.13

func (*CreateBillingGroupRequestInvoice) Reset added in v0.35.13

func (*CreateBillingGroupRequestInvoice) String added in v0.35.13

type CreateBillingGroupRequestInvoiceVendor added in v0.35.13

type CreateBillingGroupRequestInvoiceVendor struct {
	CalcType                   string  `protobuf:"bytes,1,opt,name=calcType,proto3" json:"calcType,omitempty"`
	DiscountRate               float64 `protobuf:"fixed64,2,opt,name=discountRate,proto3" json:"discountRate,omitempty"`
	SubstitutionFee            string  `protobuf:"bytes,3,opt,name=substitutionFee,proto3" json:"substitutionFee,omitempty"`
	SubstitutionFix            float64 `protobuf:"fixed64,4,opt,name=substitutionFix,proto3" json:"substitutionFix,omitempty"`
	SubstitutionRate           float64 `protobuf:"fixed64,5,opt,name=substitutionRate,proto3" json:"substitutionRate,omitempty"`
	SupportFee                 string  `protobuf:"bytes,6,opt,name=supportFee,proto3" json:"supportFee,omitempty"`
	SupportRate                float64 `protobuf:"fixed64,7,opt,name=supportRate,proto3" json:"supportRate,omitempty"`
	SupportFix                 float64 `protobuf:"fixed64,8,opt,name=supportFix,proto3" json:"supportFix,omitempty"`
	TaxRate                    float64 `protobuf:"fixed64,9,opt,name=taxRate,proto3" json:"taxRate,omitempty"`
	Currency                   string  `protobuf:"bytes,10,opt,name=currency,proto3" json:"currency,omitempty"`
	DiscountTargetUsage        string  `protobuf:"bytes,11,opt,name=discountTargetUsage,proto3" json:"discountTargetUsage,omitempty"`
	SubstitutionFeeTargetUsage string  `protobuf:"bytes,12,opt,name=substitutionFeeTargetUsage,proto3" json:"substitutionFeeTargetUsage,omitempty"`
	DiscountCalcLogic          string  `protobuf:"bytes,13,opt,name=discountCalcLogic,proto3" json:"discountCalcLogic,omitempty"`
	SubstitutionFeeCalcTarget  string  `protobuf:"bytes,14,opt,name=substitutionFeeCalcTarget,proto3" json:"substitutionFeeCalcTarget,omitempty"`
	SubstitutionFeeCalcType    string  `protobuf:"bytes,15,opt,name=substitutionFeeCalcType,proto3" json:"substitutionFeeCalcType,omitempty"`
	SupportAmountTarget        string  `protobuf:"bytes,16,opt,name=supportAmountTarget,proto3" json:"supportAmountTarget,omitempty"`
	SupportFeeCalcTarget       string  `protobuf:"bytes,17,opt,name=supportFeeCalcTarget,proto3" json:"supportFeeCalcTarget,omitempty"`
	// contains filtered or unexported fields
}

Specific settings per vendor

func (*CreateBillingGroupRequestInvoiceVendor) Descriptor deprecated added in v0.35.13

func (*CreateBillingGroupRequestInvoiceVendor) Descriptor() ([]byte, []int)

Deprecated: Use CreateBillingGroupRequestInvoiceVendor.ProtoReflect.Descriptor instead.

func (*CreateBillingGroupRequestInvoiceVendor) GetCalcType added in v0.35.13

func (*CreateBillingGroupRequestInvoiceVendor) GetCurrency added in v0.35.13

func (*CreateBillingGroupRequestInvoiceVendor) GetDiscountCalcLogic added in v0.35.13

func (x *CreateBillingGroupRequestInvoiceVendor) GetDiscountCalcLogic() string

func (*CreateBillingGroupRequestInvoiceVendor) GetDiscountRate added in v0.35.13

func (x *CreateBillingGroupRequestInvoiceVendor) GetDiscountRate() float64

func (*CreateBillingGroupRequestInvoiceVendor) GetDiscountTargetUsage added in v0.35.13

func (x *CreateBillingGroupRequestInvoiceVendor) GetDiscountTargetUsage() string

func (*CreateBillingGroupRequestInvoiceVendor) GetSubstitutionFee added in v0.35.13

func (x *CreateBillingGroupRequestInvoiceVendor) GetSubstitutionFee() string

func (*CreateBillingGroupRequestInvoiceVendor) GetSubstitutionFeeCalcTarget added in v0.35.13

func (x *CreateBillingGroupRequestInvoiceVendor) GetSubstitutionFeeCalcTarget() string

func (*CreateBillingGroupRequestInvoiceVendor) GetSubstitutionFeeCalcType added in v0.35.13

func (x *CreateBillingGroupRequestInvoiceVendor) GetSubstitutionFeeCalcType() string

func (*CreateBillingGroupRequestInvoiceVendor) GetSubstitutionFeeTargetUsage added in v0.35.13

func (x *CreateBillingGroupRequestInvoiceVendor) GetSubstitutionFeeTargetUsage() string

func (*CreateBillingGroupRequestInvoiceVendor) GetSubstitutionFix added in v0.35.13

func (x *CreateBillingGroupRequestInvoiceVendor) GetSubstitutionFix() float64

func (*CreateBillingGroupRequestInvoiceVendor) GetSubstitutionRate added in v0.35.13

func (x *CreateBillingGroupRequestInvoiceVendor) GetSubstitutionRate() float64

func (*CreateBillingGroupRequestInvoiceVendor) GetSupportAmountTarget added in v0.35.13

func (x *CreateBillingGroupRequestInvoiceVendor) GetSupportAmountTarget() string

func (*CreateBillingGroupRequestInvoiceVendor) GetSupportFee added in v0.35.13

func (*CreateBillingGroupRequestInvoiceVendor) GetSupportFeeCalcTarget added in v0.35.13

func (x *CreateBillingGroupRequestInvoiceVendor) GetSupportFeeCalcTarget() string

func (*CreateBillingGroupRequestInvoiceVendor) GetSupportFix added in v0.35.13

func (*CreateBillingGroupRequestInvoiceVendor) GetSupportRate added in v0.35.13

func (x *CreateBillingGroupRequestInvoiceVendor) GetSupportRate() float64

func (*CreateBillingGroupRequestInvoiceVendor) GetTaxRate added in v0.35.13

func (*CreateBillingGroupRequestInvoiceVendor) ProtoMessage added in v0.35.13

func (*CreateBillingGroupRequestInvoiceVendor) ProtoReflect added in v0.35.13

func (*CreateBillingGroupRequestInvoiceVendor) Reset added in v0.35.13

func (*CreateBillingGroupRequestInvoiceVendor) String added in v0.35.13

type GetBillingGroupRequest added in v0.36.3

type GetBillingGroupRequest struct {
	BillingInternalId string `protobuf:"bytes,1,opt,name=billingInternalId,proto3" json:"billingInternalId,omitempty"`
	// contains filtered or unexported fields
}

Request message for the Billing.GetBillingGroup rpc.

func (*GetBillingGroupRequest) Descriptor deprecated added in v0.36.3

func (*GetBillingGroupRequest) Descriptor() ([]byte, []int)

Deprecated: Use GetBillingGroupRequest.ProtoReflect.Descriptor instead.

func (*GetBillingGroupRequest) GetBillingInternalId added in v0.36.3

func (x *GetBillingGroupRequest) GetBillingInternalId() string

func (*GetBillingGroupRequest) ProtoMessage added in v0.36.3

func (*GetBillingGroupRequest) ProtoMessage()

func (*GetBillingGroupRequest) ProtoReflect added in v0.36.3

func (x *GetBillingGroupRequest) ProtoReflect() protoreflect.Message

func (*GetBillingGroupRequest) Reset added in v0.36.3

func (x *GetBillingGroupRequest) Reset()

func (*GetBillingGroupRequest) String added in v0.36.3

func (x *GetBillingGroupRequest) String() string

type GetBillingGroupResponse added in v0.36.3

type GetBillingGroupResponse struct {
	BillingGroup *BillingGroup `protobuf:"bytes,1,opt,name=billingGroup,proto3" json:"billingGroup,omitempty"`
	// contains filtered or unexported fields
}

Response message for the Billing.GetBillingGroup rpc.

func (*GetBillingGroupResponse) Descriptor deprecated added in v0.36.3

func (*GetBillingGroupResponse) Descriptor() ([]byte, []int)

Deprecated: Use GetBillingGroupResponse.ProtoReflect.Descriptor instead.

func (*GetBillingGroupResponse) GetBillingGroup added in v0.36.3

func (x *GetBillingGroupResponse) GetBillingGroup() *BillingGroup

func (*GetBillingGroupResponse) ProtoMessage added in v0.36.3

func (*GetBillingGroupResponse) ProtoMessage()

func (*GetBillingGroupResponse) ProtoReflect added in v0.36.3

func (x *GetBillingGroupResponse) ProtoReflect() protoreflect.Message

func (*GetBillingGroupResponse) Reset added in v0.36.3

func (x *GetBillingGroupResponse) Reset()

func (*GetBillingGroupResponse) String added in v0.36.3

func (x *GetBillingGroupResponse) String() string

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) CreateBillingGroup added in v0.35.11

func (UnimplementedBillingServer) GetBillingGroup added in v0.36.3

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.

Jump to

Keyboard shortcuts

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