pbbilling

package
v0.0.0-...-a156103 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2021 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Overview

Package pbbilling is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
var BillingService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "pbbilling.BillingService",
	HandlerType: (*BillingServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "ListBillingDetail",
			Handler:    _BillingService_ListBillingDetail_Handler,
		},
		{
			MethodName: "ListBilling",
			Handler:    _BillingService_ListBilling_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "idl/pbbilling/billing.proto",
}

BillingService_ServiceDesc is the grpc.ServiceDesc for BillingService 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_idl_pbbilling_billing_proto protoreflect.FileDescriptor

Functions

func RegisterBillingServiceHandler

func RegisterBillingServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterBillingServiceHandler registers the http handlers for service BillingService to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterBillingServiceHandlerClient

func RegisterBillingServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client BillingServiceClient) error

RegisterBillingServiceHandlerClient registers the http handlers for service BillingService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "BillingServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "BillingServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "BillingServiceClient" to call the correct interceptors.

func RegisterBillingServiceHandlerFromEndpoint

func RegisterBillingServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterBillingServiceHandlerFromEndpoint is same as RegisterBillingServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterBillingServiceHandlerServer

func RegisterBillingServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server BillingServiceServer) error

RegisterBillingServiceHandlerServer registers the http handlers for service BillingService to "mux". UnaryRPC :call BillingServiceServer 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 RegisterBillingServiceHandlerFromEndpoint instead.

func RegisterBillingServiceServer

func RegisterBillingServiceServer(s grpc.ServiceRegistrar, srv BillingServiceServer)

Types

type AliProductInfo

type AliProductInfo struct {

	// 产品代码
	ProductCode string `protobuf:"bytes,1,opt,name=product_code,json=productCode,proto3" json:"product_code,omitempty"`
	// 产品名称
	ProductName string `protobuf:"bytes,2,opt,name=product_name,json=productName,proto3" json:"product_name,omitempty"`
	// 产品类型
	ProductType string `protobuf:"bytes,3,opt,name=product_type,json=productType,proto3" json:"product_type,omitempty"`
	// 订阅类型。取值:Subscription:预付费 / PayAsYouGo:后付
	SubscriptionType string `protobuf:"bytes,4,opt,name=subscription_type,json=subscriptionType,proto3" json:"subscription_type,omitempty"`
	// contains filtered or unexported fields
}

func (*AliProductInfo) Descriptor deprecated

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

Deprecated: Use AliProductInfo.ProtoReflect.Descriptor instead.

func (*AliProductInfo) GetProductCode

func (x *AliProductInfo) GetProductCode() string

func (*AliProductInfo) GetProductName

func (x *AliProductInfo) GetProductName() string

func (*AliProductInfo) GetProductType

func (x *AliProductInfo) GetProductType() string

func (*AliProductInfo) GetSubscriptionType

func (x *AliProductInfo) GetSubscriptionType() string

func (*AliProductInfo) ProtoMessage

func (*AliProductInfo) ProtoMessage()

func (*AliProductInfo) ProtoReflect

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

func (*AliProductInfo) Reset

func (x *AliProductInfo) Reset()

func (*AliProductInfo) String

func (x *AliProductInfo) String() string

type BillingInstance

type BillingInstance struct {

	// 云类型
	Provider pbtenant.CloudProvider `protobuf:"varint,1,opt,name=provider,proto3,enum=pbtenant.CloudProvider" json:"provider,omitempty"`
	// 计费周期
	BillingCycle string `protobuf:"bytes,2,opt,name=billing_cycle,json=billingCycle,proto3" json:"billing_cycle,omitempty"`
	// 账号名称
	AccountName string `protobuf:"bytes,3,opt,name=account_name,json=accountName,proto3" json:"account_name,omitempty"`
	// 区域名称
	RegionName string `protobuf:"bytes,4,opt,name=region_name,json=regionName,proto3" json:"region_name,omitempty"`
	// 产品类型
	ProductCode string `protobuf:"bytes,5,opt,name=product_code,json=productCode,proto3" json:"product_code,omitempty"`
	// 产品类型
	ProductType string `protobuf:"bytes,6,opt,name=product_type,json=productType,proto3" json:"product_type,omitempty"`
	// 产品ID
	InstanceId string `protobuf:"bytes,7,opt,name=instance_id,json=instanceId,proto3" json:"instance_id,omitempty"`
	// 产品费用
	Fee float64 `protobuf:"fixed64,8,opt,name=fee,proto3" json:"fee,omitempty"`
	// 账单类型: SubscriptionOrder (预付订单) PayAsYouGoBill (后付账单) Refund (退款) Adjustment (调账)
	Item string `protobuf:"bytes,9,opt,name=item,proto3" json:"item,omitempty"`
	// 实例昵称
	InstanceName string `protobuf:"bytes,10,opt,name=instance_name,json=instanceName,proto3" json:"instance_name,omitempty"`
	// 订阅类型:Subscription:预付费 PayAsYouGo:后付费
	SubscriptionType string `protobuf:"bytes,11,opt,name=subscription_type,json=subscriptionType,proto3" json:"subscription_type,omitempty"`
	// contains filtered or unexported fields
}

func (*BillingInstance) Descriptor deprecated

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

Deprecated: Use BillingInstance.ProtoReflect.Descriptor instead.

func (*BillingInstance) GetAccountName

func (x *BillingInstance) GetAccountName() string

func (*BillingInstance) GetBillingCycle

func (x *BillingInstance) GetBillingCycle() string

func (*BillingInstance) GetFee

func (x *BillingInstance) GetFee() float64

func (*BillingInstance) GetInstanceId

func (x *BillingInstance) GetInstanceId() string

func (*BillingInstance) GetInstanceName

func (x *BillingInstance) GetInstanceName() string

func (*BillingInstance) GetItem

func (x *BillingInstance) GetItem() string

func (*BillingInstance) GetProductCode

func (x *BillingInstance) GetProductCode() string

func (*BillingInstance) GetProductType

func (x *BillingInstance) GetProductType() string

func (*BillingInstance) GetProvider

func (x *BillingInstance) GetProvider() pbtenant.CloudProvider

func (*BillingInstance) GetRegionName

func (x *BillingInstance) GetRegionName() string

func (*BillingInstance) GetSubscriptionType

func (x *BillingInstance) GetSubscriptionType() string

func (*BillingInstance) ProtoMessage

func (*BillingInstance) ProtoMessage()

func (*BillingInstance) ProtoReflect

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

func (*BillingInstance) Reset

func (x *BillingInstance) Reset()

func (*BillingInstance) String

func (x *BillingInstance) String() string

type BillingServiceClient

type BillingServiceClient interface {
	// 查询费用明细  - 支持云类型、账户过滤条件
	ListBillingDetail(ctx context.Context, in *ListDetailReq, opts ...grpc.CallOption) (*ListDetailResp, error)
	// 查询费用全量 - 根据云类型
	ListBilling(ctx context.Context, in *ListReq, opts ...grpc.CallOption) (*ListResp, error)
}

BillingServiceClient is the client API for BillingService 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 BillingServiceServer

type BillingServiceServer interface {
	// 查询费用明细  - 支持云类型、账户过滤条件
	ListBillingDetail(context.Context, *ListDetailReq) (*ListDetailResp, error)
	// 查询费用全量 - 根据云类型
	ListBilling(context.Context, *ListReq) (*ListResp, error)
	// contains filtered or unexported methods
}

BillingServiceServer is the server API for BillingService service. All implementations must embed UnimplementedBillingServiceServer for forward compatibility

type ListDetailReq

type ListDetailReq struct {

	// 云名称
	Provider pbtenant.CloudProvider `protobuf:"varint,1,opt,name=provider,proto3,enum=pbtenant.CloudProvider" json:"provider,omitempty"`
	// 计费周期,格式为 YYYY-MM
	BillingCycle string `protobuf:"bytes,2,opt,name=billing_cycle,json=billingCycle,proto3" json:"billing_cycle,omitempty"`
	// 账户名称,根据config.yaml中的配置,默认为第一个配置的账户
	AccountName string `protobuf:"bytes,3,opt,name=account_name,json=accountName,proto3" json:"account_name,omitempty"`
	// contains filtered or unexported fields
}

func (*ListDetailReq) Descriptor deprecated

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

Deprecated: Use ListDetailReq.ProtoReflect.Descriptor instead.

func (*ListDetailReq) GetAccountName

func (x *ListDetailReq) GetAccountName() string

func (*ListDetailReq) GetBillingCycle

func (x *ListDetailReq) GetBillingCycle() string

func (*ListDetailReq) GetProvider

func (x *ListDetailReq) GetProvider() pbtenant.CloudProvider

func (*ListDetailReq) ProtoMessage

func (*ListDetailReq) ProtoMessage()

func (*ListDetailReq) ProtoReflect

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

func (*ListDetailReq) Reset

func (x *ListDetailReq) Reset()

func (*ListDetailReq) String

func (x *ListDetailReq) String() string

type ListDetailResp

type ListDetailResp struct {

	// Billing 集合
	Billings []*BillingInstance `protobuf:"bytes,1,rep,name=billings,proto3" json:"billings,omitempty"`
	// contains filtered or unexported fields
}

func (*ListDetailResp) Descriptor deprecated

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

Deprecated: Use ListDetailResp.ProtoReflect.Descriptor instead.

func (*ListDetailResp) GetBillings

func (x *ListDetailResp) GetBillings() []*BillingInstance

func (*ListDetailResp) ProtoMessage

func (*ListDetailResp) ProtoMessage()

func (*ListDetailResp) ProtoReflect

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

func (*ListDetailResp) Reset

func (x *ListDetailResp) Reset()

func (*ListDetailResp) String

func (x *ListDetailResp) String() string

type ListReq

type ListReq struct {

	// 云名称
	Provider pbtenant.CloudProvider `protobuf:"varint,1,opt,name=provider,proto3,enum=pbtenant.CloudProvider" json:"provider,omitempty"`
	// 计费周期,格式为 YYYY-MM
	BillingCycle string `protobuf:"bytes,2,opt,name=billing_cycle,json=billingCycle,proto3" json:"billing_cycle,omitempty"`
	// contains filtered or unexported fields
}

func (*ListReq) Descriptor deprecated

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

Deprecated: Use ListReq.ProtoReflect.Descriptor instead.

func (*ListReq) GetBillingCycle

func (x *ListReq) GetBillingCycle() string

func (*ListReq) GetProvider

func (x *ListReq) GetProvider() pbtenant.CloudProvider

func (*ListReq) ProtoMessage

func (*ListReq) ProtoMessage()

func (*ListReq) ProtoReflect

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

func (*ListReq) Reset

func (x *ListReq) Reset()

func (*ListReq) String

func (x *ListReq) String() string

type ListResp

type ListResp struct {

	// Billing 集合
	Billings []*BillingInstance `protobuf:"bytes,1,rep,name=billings,proto3" json:"billings,omitempty"`
	// contains filtered or unexported fields
}

func (*ListResp) Descriptor deprecated

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

Deprecated: Use ListResp.ProtoReflect.Descriptor instead.

func (*ListResp) GetBillings

func (x *ListResp) GetBillings() []*BillingInstance

func (*ListResp) ProtoMessage

func (*ListResp) ProtoMessage()

func (*ListResp) ProtoReflect

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

func (*ListResp) Reset

func (x *ListResp) Reset()

func (*ListResp) String

func (x *ListResp) String() string

type UnimplementedBillingServiceServer

type UnimplementedBillingServiceServer struct {
}

UnimplementedBillingServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedBillingServiceServer) ListBilling

func (UnimplementedBillingServiceServer) ListBillingDetail

type UnsafeBillingServiceServer

type UnsafeBillingServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeBillingServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to BillingServiceServer will result in compilation errors.

Jump to

Keyboard shortcuts

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