Documentation
¶
Overview ¶
Package proto is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterBillingServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterBillingServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client BillingServiceClient) error
- func RegisterBillingServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterBillingServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server BillingServiceServer) error
- func RegisterBillingServiceServer(s grpc.ServiceRegistrar, srv BillingServiceServer)
- func RegisterCurrencyServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterCurrencyServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client CurrencyServiceClient) error
- func RegisterCurrencyServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterCurrencyServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server CurrencyServiceServer) error
- func RegisterCurrencyServiceServer(s grpc.ServiceRegistrar, srv CurrencyServiceServer)
- func RegisterRecordsServiceServer(s grpc.ServiceRegistrar, srv RecordsServiceServer)
- type BillingServiceClient
- type BillingServiceServer
- type ConversionRequest
- func (*ConversionRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ConversionRequest) GetAmount() float64
- func (x *ConversionRequest) GetFrom() Currency
- func (x *ConversionRequest) GetTo() Currency
- func (*ConversionRequest) ProtoMessage()
- func (x *ConversionRequest) ProtoReflect() protoreflect.Message
- func (x *ConversionRequest) Reset()
- func (x *ConversionRequest) String() string
- type ConversionResponse
- func (*ConversionResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ConversionResponse) GetAmount() float64
- func (*ConversionResponse) ProtoMessage()
- func (x *ConversionResponse) ProtoReflect() protoreflect.Message
- func (x *ConversionResponse) Reset()
- func (x *ConversionResponse) String() string
- type CreateExchangeRateRequest
- func (*CreateExchangeRateRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CreateExchangeRateRequest) GetFrom() Currency
- func (x *CreateExchangeRateRequest) GetRate() float64
- func (x *CreateExchangeRateRequest) GetTo() Currency
- func (*CreateExchangeRateRequest) ProtoMessage()
- func (x *CreateExchangeRateRequest) ProtoReflect() protoreflect.Message
- func (x *CreateExchangeRateRequest) Reset()
- func (x *CreateExchangeRateRequest) String() string
- type CreateExchangeRateResponse
- type Currency
- type CurrencyServiceClient
- type CurrencyServiceServer
- type DeleteExchangeRateRequest
- func (*DeleteExchangeRateRequest) Descriptor() ([]byte, []int)deprecated
- func (x *DeleteExchangeRateRequest) GetFrom() Currency
- func (x *DeleteExchangeRateRequest) GetTo() Currency
- func (*DeleteExchangeRateRequest) ProtoMessage()
- func (x *DeleteExchangeRateRequest) ProtoReflect() protoreflect.Message
- func (x *DeleteExchangeRateRequest) Reset()
- func (x *DeleteExchangeRateRequest) String() string
- type DeleteExchangeRateResponse
- type Fee
- func (*Fee) Descriptor() ([]byte, []int)deprecated
- func (x *Fee) GetDefault() float64
- func (x *Fee) GetPrecision() int64
- func (x *Fee) GetRanges() []*FeeRange
- func (x *Fee) GetRound() Round
- func (*Fee) ProtoMessage()
- func (x *Fee) ProtoReflect() protoreflect.Message
- func (x *Fee) Reset()
- func (x *Fee) String() string
- type FeeRange
- func (*FeeRange) Descriptor() ([]byte, []int)deprecated
- func (x *FeeRange) GetFactor() float64
- func (x *FeeRange) GetFrom() float64
- func (x *FeeRange) GetTo() float64
- func (*FeeRange) ProtoMessage()
- func (x *FeeRange) ProtoReflect() protoreflect.Message
- func (x *FeeRange) Reset()
- func (x *FeeRange) String() string
- type GetActiveRequest
- type GetCurrenciesRequest
- type GetCurrenciesResponse
- func (*GetCurrenciesResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetCurrenciesResponse) GetCurrencies() []Currency
- func (*GetCurrenciesResponse) ProtoMessage()
- func (x *GetCurrenciesResponse) ProtoReflect() protoreflect.Message
- func (x *GetCurrenciesResponse) Reset()
- func (x *GetCurrenciesResponse) String() string
- type GetExchangeRateRequest
- func (*GetExchangeRateRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetExchangeRateRequest) GetFrom() Currency
- func (x *GetExchangeRateRequest) GetTo() Currency
- func (*GetExchangeRateRequest) ProtoMessage()
- func (x *GetExchangeRateRequest) ProtoReflect() protoreflect.Message
- func (x *GetExchangeRateRequest) Reset()
- func (x *GetExchangeRateRequest) String() string
- type GetExchangeRateResponse
- func (*GetExchangeRateResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetExchangeRateResponse) GetRate() float64
- func (*GetExchangeRateResponse) ProtoMessage()
- func (x *GetExchangeRateResponse) ProtoReflect() protoreflect.Message
- func (x *GetExchangeRateResponse) Reset()
- func (x *GetExchangeRateResponse) String() string
- type GetTransactionsRequest
- func (*GetTransactionsRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetTransactionsRequest) GetAccount() string
- func (x *GetTransactionsRequest) GetService() string
- func (*GetTransactionsRequest) ProtoMessage()
- func (x *GetTransactionsRequest) ProtoReflect() protoreflect.Message
- func (x *GetTransactionsRequest) Reset()
- func (x *GetTransactionsRequest) String() string
- type Kind
- type ListRequest
- func (*ListRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ListRequest) GetAnonymously() bool
- func (x *ListRequest) GetSpUuid() string
- func (*ListRequest) ProtoMessage()
- func (x *ListRequest) ProtoReflect() protoreflect.Message
- func (x *ListRequest) Reset()
- func (x *ListRequest) String() string
- type ListResponse
- type Plan
- func (*Plan) Descriptor() ([]byte, []int)deprecated
- func (x *Plan) GetFee() *Fee
- func (x *Plan) GetKind() PlanKind
- func (x *Plan) GetMeta() map[string]*structpb.Value
- func (x *Plan) GetProducts() map[string]*Product
- func (x *Plan) GetPublic() bool
- func (x *Plan) GetResources() []*ResourceConf
- func (x *Plan) GetTitle() string
- func (x *Plan) GetType() string
- func (x *Plan) GetUuid() string
- func (*Plan) ProtoMessage()
- func (x *Plan) ProtoReflect() protoreflect.Message
- func (x *Plan) Reset()
- func (x *Plan) String() string
- type PlanKind
- type Product
- func (*Product) Descriptor() ([]byte, []int)deprecated
- func (x *Product) GetKind() Kind
- func (x *Product) GetMeta() map[string]*structpb.Value
- func (x *Product) GetPeriod() int64
- func (x *Product) GetPrice() float64
- func (x *Product) GetResources() map[string]*structpb.Value
- func (x *Product) GetSorter() int32
- func (x *Product) GetTitle() string
- func (*Product) ProtoMessage()
- func (x *Product) ProtoReflect() protoreflect.Message
- func (x *Product) Reset()
- func (x *Product) String() string
- type Record
- func (*Record) Descriptor() ([]byte, []int)deprecated
- func (x *Record) GetEnd() int64
- func (x *Record) GetExec() int64
- func (x *Record) GetInstance() string
- func (x *Record) GetMeta() map[string]*structpb.Value
- func (x *Record) GetProcessed() bool
- func (x *Record) GetProduct() string
- func (x *Record) GetResource() string
- func (x *Record) GetStart() int64
- func (x *Record) GetState() proto.NoCloudState
- func (x *Record) GetTotal() float64
- func (x *Record) GetUuid() string
- func (*Record) ProtoMessage()
- func (x *Record) ProtoReflect() protoreflect.Message
- func (x *Record) Reset()
- func (x *Record) String() string
- type Records
- type RecordsServiceClient
- type RecordsServiceServer
- type ReprocessTransactionsRequest
- func (*ReprocessTransactionsRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ReprocessTransactionsRequest) GetAccount() string
- func (*ReprocessTransactionsRequest) ProtoMessage()
- func (x *ReprocessTransactionsRequest) ProtoReflect() protoreflect.Message
- func (x *ReprocessTransactionsRequest) Reset()
- func (x *ReprocessTransactionsRequest) String() string
- type ResourceConf
- func (*ResourceConf) Descriptor() ([]byte, []int)deprecated
- func (x *ResourceConf) GetExcept() bool
- func (x *ResourceConf) GetFee() *Fee
- func (x *ResourceConf) GetKey() string
- func (x *ResourceConf) GetKind() Kind
- func (x *ResourceConf) GetOn() []proto.NoCloudState
- func (x *ResourceConf) GetPeriod() int64
- func (x *ResourceConf) GetPrice() float64
- func (*ResourceConf) ProtoMessage()
- func (x *ResourceConf) ProtoReflect() protoreflect.Message
- func (x *ResourceConf) Reset()
- func (x *ResourceConf) String() string
- type Round
- type Transaction
- func (*Transaction) Descriptor() ([]byte, []int)deprecated
- func (x *Transaction) GetAccount() string
- func (x *Transaction) GetExec() int64
- func (x *Transaction) GetMeta() map[string]*structpb.Value
- func (x *Transaction) GetProc() int64
- func (x *Transaction) GetProcessed() bool
- func (x *Transaction) GetRecords() []string
- func (x *Transaction) GetService() string
- func (x *Transaction) GetTotal() float64
- func (x *Transaction) GetUuid() string
- func (*Transaction) ProtoMessage()
- func (x *Transaction) ProtoReflect() protoreflect.Message
- func (x *Transaction) Reset()
- func (x *Transaction) String() string
- type Transactions
- type UnimplementedBillingServiceServer
- func (UnimplementedBillingServiceServer) CreatePlan(context.Context, *Plan) (*Plan, error)
- func (UnimplementedBillingServiceServer) CreateTransaction(context.Context, *Transaction) (*Transaction, error)
- func (UnimplementedBillingServiceServer) DeletePlan(context.Context, *Plan) (*Plan, error)
- func (UnimplementedBillingServiceServer) GetPlan(context.Context, *Plan) (*Plan, error)
- func (UnimplementedBillingServiceServer) GetRecords(context.Context, *Transaction) (*Records, error)
- func (UnimplementedBillingServiceServer) GetTransactions(context.Context, *GetTransactionsRequest) (*Transactions, error)
- func (UnimplementedBillingServiceServer) ListPlans(context.Context, *ListRequest) (*ListResponse, error)
- func (UnimplementedBillingServiceServer) Reprocess(context.Context, *ReprocessTransactionsRequest) (*Transactions, error)
- func (UnimplementedBillingServiceServer) UpdatePlan(context.Context, *Plan) (*Plan, error)
- type UnimplementedCurrencyServiceServer
- func (UnimplementedCurrencyServiceServer) Convert(context.Context, *ConversionRequest) (*ConversionResponse, error)
- func (UnimplementedCurrencyServiceServer) CreateExchangeRate(context.Context, *CreateExchangeRateRequest) (*CreateExchangeRateResponse, error)
- func (UnimplementedCurrencyServiceServer) DeleteExchangeRateRequest(context.Context, *CreateExchangeRateRequest) (*CreateExchangeRateResponse, error)
- func (UnimplementedCurrencyServiceServer) GetCurrencies(context.Context, *GetCurrenciesRequest) (*GetCurrenciesResponse, error)
- func (UnimplementedCurrencyServiceServer) GetExchangeRate(context.Context, *GetExchangeRateRequest) (*GetExchangeRateResponse, error)
- func (UnimplementedCurrencyServiceServer) UpdateExchangeRateRequest(context.Context, *CreateExchangeRateRequest) (*CreateExchangeRateResponse, error)
- type UnimplementedRecordsServiceServer
- type UnsafeBillingServiceServer
- type UnsafeCurrencyServiceServer
- type UnsafeRecordsServiceServer
- type UpdateExchangeRateRequest
- func (*UpdateExchangeRateRequest) Descriptor() ([]byte, []int)deprecated
- func (x *UpdateExchangeRateRequest) GetFrom() Currency
- func (x *UpdateExchangeRateRequest) GetRate() float64
- func (x *UpdateExchangeRateRequest) GetTo() Currency
- func (*UpdateExchangeRateRequest) ProtoMessage()
- func (x *UpdateExchangeRateRequest) ProtoReflect() protoreflect.Message
- func (x *UpdateExchangeRateRequest) Reset()
- func (x *UpdateExchangeRateRequest) String() string
- type UpdateExchangeRateResponse
Constants ¶
This section is empty.
Variables ¶
var ( PlanKind_name = map[int32]string{ 0: "UNKNOWN", 1: "DYNAMIC", 2: "STATIC", } PlanKind_value = map[string]int32{ "UNKNOWN": 0, "DYNAMIC": 1, "STATIC": 2, } )
Enum value maps for PlanKind.
var ( Round_name = map[int32]string{ 0: "NONE", 1: "FLOOR", 2: "ROUND", 3: "CEIL", } Round_value = map[string]int32{ "NONE": 0, "FLOOR": 1, "ROUND": 2, "CEIL": 3, } )
Enum value maps for Round.
var ( Kind_name = map[int32]string{ 0: "UNSPECIFIED", 1: "POSTPAID", 2: "PREPAID", } Kind_value = map[string]int32{ "UNSPECIFIED": 0, "POSTPAID": 1, "PREPAID": 2, } )
Enum value maps for Kind.
var ( Currency_name = map[int32]string{ 0: "NCU", 1: "USD", 2: "EUR", 3: "BYN", 4: "PLN", } Currency_value = map[string]int32{ "NCU": 0, "USD": 1, "EUR": 2, "BYN": 3, "PLN": 4, } )
Enum value maps for Currency.
var BillingService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "nocloud.billing.BillingService", HandlerType: (*BillingServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "CreatePlan", Handler: _BillingService_CreatePlan_Handler, }, { MethodName: "UpdatePlan", Handler: _BillingService_UpdatePlan_Handler, }, { MethodName: "GetPlan", Handler: _BillingService_GetPlan_Handler, }, { MethodName: "ListPlans", Handler: _BillingService_ListPlans_Handler, }, { MethodName: "DeletePlan", Handler: _BillingService_DeletePlan_Handler, }, { MethodName: "CreateTransaction", Handler: _BillingService_CreateTransaction_Handler, }, { MethodName: "GetTransactions", Handler: _BillingService_GetTransactions_Handler, }, { MethodName: "GetRecords", Handler: _BillingService_GetRecords_Handler, }, { MethodName: "Reprocess", Handler: _BillingService_Reprocess_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "pkg/billing/proto/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)
var CurrencyService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "nocloud.billing.CurrencyService", HandlerType: (*CurrencyServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetCurrencies", Handler: _CurrencyService_GetCurrencies_Handler, }, { MethodName: "GetExchangeRate", Handler: _CurrencyService_GetExchangeRate_Handler, }, { MethodName: "CreateExchangeRate", Handler: _CurrencyService_CreateExchangeRate_Handler, }, { MethodName: "UpdateExchangeRateRequest", Handler: _CurrencyService_UpdateExchangeRateRequest_Handler, }, { MethodName: "DeleteExchangeRateRequest", Handler: _CurrencyService_DeleteExchangeRateRequest_Handler, }, { MethodName: "Convert", Handler: _CurrencyService_Convert_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "pkg/billing/proto/billing.proto", }
CurrencyService_ServiceDesc is the grpc.ServiceDesc for CurrencyService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_pkg_billing_proto_billing_proto protoreflect.FileDescriptor
var RecordsService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "nocloud.billing.RecordsService", HandlerType: (*RecordsServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetActive", Handler: _RecordsService_GetActive_Handler, }, { MethodName: "Create", Handler: _RecordsService_Create_Handler, }, { MethodName: "Update", Handler: _RecordsService_Update_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "pkg/billing/proto/billing.proto", }
RecordsService_ServiceDesc is the grpc.ServiceDesc for RecordsService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
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)
func RegisterCurrencyServiceHandler ¶
func RegisterCurrencyServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterCurrencyServiceHandler registers the http handlers for service CurrencyService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterCurrencyServiceHandlerClient ¶
func RegisterCurrencyServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client CurrencyServiceClient) error
RegisterCurrencyServiceHandlerClient registers the http handlers for service CurrencyService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "CurrencyServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "CurrencyServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "CurrencyServiceClient" to call the correct interceptors.
func RegisterCurrencyServiceHandlerFromEndpoint ¶
func RegisterCurrencyServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterCurrencyServiceHandlerFromEndpoint is same as RegisterCurrencyServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterCurrencyServiceHandlerServer ¶
func RegisterCurrencyServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server CurrencyServiceServer) error
RegisterCurrencyServiceHandlerServer registers the http handlers for service CurrencyService to "mux". UnaryRPC :call CurrencyServiceServer 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 RegisterCurrencyServiceHandlerFromEndpoint instead.
func RegisterCurrencyServiceServer ¶
func RegisterCurrencyServiceServer(s grpc.ServiceRegistrar, srv CurrencyServiceServer)
func RegisterRecordsServiceServer ¶
func RegisterRecordsServiceServer(s grpc.ServiceRegistrar, srv RecordsServiceServer)
Types ¶
type BillingServiceClient ¶
type BillingServiceClient interface { CreatePlan(ctx context.Context, in *Plan, opts ...grpc.CallOption) (*Plan, error) UpdatePlan(ctx context.Context, in *Plan, opts ...grpc.CallOption) (*Plan, error) GetPlan(ctx context.Context, in *Plan, opts ...grpc.CallOption) (*Plan, error) ListPlans(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ListResponse, error) DeletePlan(ctx context.Context, in *Plan, opts ...grpc.CallOption) (*Plan, error) CreateTransaction(ctx context.Context, in *Transaction, opts ...grpc.CallOption) (*Transaction, error) GetTransactions(ctx context.Context, in *GetTransactionsRequest, opts ...grpc.CallOption) (*Transactions, error) GetRecords(ctx context.Context, in *Transaction, opts ...grpc.CallOption) (*Records, error) Reprocess(ctx context.Context, in *ReprocessTransactionsRequest, opts ...grpc.CallOption) (*Transactions, 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.
func NewBillingServiceClient ¶
func NewBillingServiceClient(cc grpc.ClientConnInterface) BillingServiceClient
type BillingServiceServer ¶
type BillingServiceServer interface { CreatePlan(context.Context, *Plan) (*Plan, error) UpdatePlan(context.Context, *Plan) (*Plan, error) GetPlan(context.Context, *Plan) (*Plan, error) ListPlans(context.Context, *ListRequest) (*ListResponse, error) DeletePlan(context.Context, *Plan) (*Plan, error) CreateTransaction(context.Context, *Transaction) (*Transaction, error) GetTransactions(context.Context, *GetTransactionsRequest) (*Transactions, error) GetRecords(context.Context, *Transaction) (*Records, error) Reprocess(context.Context, *ReprocessTransactionsRequest) (*Transactions, error) // contains filtered or unexported methods }
BillingServiceServer is the server API for BillingService service. All implementations must embed UnimplementedBillingServiceServer for forward compatibility
type ConversionRequest ¶
type ConversionRequest struct { From Currency `protobuf:"varint,1,opt,name=from,proto3,enum=nocloud.billing.Currency" json:"from,omitempty"` To Currency `protobuf:"varint,2,opt,name=to,proto3,enum=nocloud.billing.Currency" json:"to,omitempty"` Amount float64 `protobuf:"fixed64,3,opt,name=amount,proto3" json:"amount,omitempty"` // contains filtered or unexported fields }
func (*ConversionRequest) Descriptor
deprecated
func (*ConversionRequest) Descriptor() ([]byte, []int)
Deprecated: Use ConversionRequest.ProtoReflect.Descriptor instead.
func (*ConversionRequest) GetAmount ¶
func (x *ConversionRequest) GetAmount() float64
func (*ConversionRequest) GetFrom ¶
func (x *ConversionRequest) GetFrom() Currency
func (*ConversionRequest) GetTo ¶
func (x *ConversionRequest) GetTo() Currency
func (*ConversionRequest) ProtoMessage ¶
func (*ConversionRequest) ProtoMessage()
func (*ConversionRequest) ProtoReflect ¶
func (x *ConversionRequest) ProtoReflect() protoreflect.Message
func (*ConversionRequest) Reset ¶
func (x *ConversionRequest) Reset()
func (*ConversionRequest) String ¶
func (x *ConversionRequest) String() string
type ConversionResponse ¶
type ConversionResponse struct { Amount float64 `protobuf:"fixed64,1,opt,name=amount,proto3" json:"amount,omitempty"` // contains filtered or unexported fields }
func (*ConversionResponse) Descriptor
deprecated
func (*ConversionResponse) Descriptor() ([]byte, []int)
Deprecated: Use ConversionResponse.ProtoReflect.Descriptor instead.
func (*ConversionResponse) GetAmount ¶
func (x *ConversionResponse) GetAmount() float64
func (*ConversionResponse) ProtoMessage ¶
func (*ConversionResponse) ProtoMessage()
func (*ConversionResponse) ProtoReflect ¶
func (x *ConversionResponse) ProtoReflect() protoreflect.Message
func (*ConversionResponse) Reset ¶
func (x *ConversionResponse) Reset()
func (*ConversionResponse) String ¶
func (x *ConversionResponse) String() string
type CreateExchangeRateRequest ¶
type CreateExchangeRateRequest struct { From Currency `protobuf:"varint,1,opt,name=from,proto3,enum=nocloud.billing.Currency" json:"from,omitempty"` To Currency `protobuf:"varint,2,opt,name=to,proto3,enum=nocloud.billing.Currency" json:"to,omitempty"` Rate float64 `protobuf:"fixed64,3,opt,name=rate,proto3" json:"rate,omitempty"` // contains filtered or unexported fields }
func (*CreateExchangeRateRequest) Descriptor
deprecated
func (*CreateExchangeRateRequest) Descriptor() ([]byte, []int)
Deprecated: Use CreateExchangeRateRequest.ProtoReflect.Descriptor instead.
func (*CreateExchangeRateRequest) GetFrom ¶
func (x *CreateExchangeRateRequest) GetFrom() Currency
func (*CreateExchangeRateRequest) GetRate ¶
func (x *CreateExchangeRateRequest) GetRate() float64
func (*CreateExchangeRateRequest) GetTo ¶
func (x *CreateExchangeRateRequest) GetTo() Currency
func (*CreateExchangeRateRequest) ProtoMessage ¶
func (*CreateExchangeRateRequest) ProtoMessage()
func (*CreateExchangeRateRequest) ProtoReflect ¶
func (x *CreateExchangeRateRequest) ProtoReflect() protoreflect.Message
func (*CreateExchangeRateRequest) Reset ¶
func (x *CreateExchangeRateRequest) Reset()
func (*CreateExchangeRateRequest) String ¶
func (x *CreateExchangeRateRequest) String() string
type CreateExchangeRateResponse ¶
type CreateExchangeRateResponse struct {
// contains filtered or unexported fields
}
func (*CreateExchangeRateResponse) Descriptor
deprecated
func (*CreateExchangeRateResponse) Descriptor() ([]byte, []int)
Deprecated: Use CreateExchangeRateResponse.ProtoReflect.Descriptor instead.
func (*CreateExchangeRateResponse) ProtoMessage ¶
func (*CreateExchangeRateResponse) ProtoMessage()
func (*CreateExchangeRateResponse) ProtoReflect ¶
func (x *CreateExchangeRateResponse) ProtoReflect() protoreflect.Message
func (*CreateExchangeRateResponse) Reset ¶
func (x *CreateExchangeRateResponse) Reset()
func (*CreateExchangeRateResponse) String ¶
func (x *CreateExchangeRateResponse) String() string
type Currency ¶
type Currency int32
func (Currency) Descriptor ¶
func (Currency) Descriptor() protoreflect.EnumDescriptor
func (Currency) EnumDescriptor
deprecated
func (Currency) Number ¶
func (x Currency) Number() protoreflect.EnumNumber
func (Currency) Type ¶
func (Currency) Type() protoreflect.EnumType
type CurrencyServiceClient ¶
type CurrencyServiceClient interface { GetCurrencies(ctx context.Context, in *GetCurrenciesRequest, opts ...grpc.CallOption) (*GetCurrenciesResponse, error) GetExchangeRate(ctx context.Context, in *GetExchangeRateRequest, opts ...grpc.CallOption) (*GetExchangeRateResponse, error) CreateExchangeRate(ctx context.Context, in *CreateExchangeRateRequest, opts ...grpc.CallOption) (*CreateExchangeRateResponse, error) UpdateExchangeRateRequest(ctx context.Context, in *CreateExchangeRateRequest, opts ...grpc.CallOption) (*CreateExchangeRateResponse, error) DeleteExchangeRateRequest(ctx context.Context, in *CreateExchangeRateRequest, opts ...grpc.CallOption) (*CreateExchangeRateResponse, error) Convert(ctx context.Context, in *ConversionRequest, opts ...grpc.CallOption) (*ConversionResponse, error) }
CurrencyServiceClient is the client API for CurrencyService 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 NewCurrencyServiceClient ¶
func NewCurrencyServiceClient(cc grpc.ClientConnInterface) CurrencyServiceClient
type CurrencyServiceServer ¶
type CurrencyServiceServer interface { GetCurrencies(context.Context, *GetCurrenciesRequest) (*GetCurrenciesResponse, error) GetExchangeRate(context.Context, *GetExchangeRateRequest) (*GetExchangeRateResponse, error) CreateExchangeRate(context.Context, *CreateExchangeRateRequest) (*CreateExchangeRateResponse, error) UpdateExchangeRateRequest(context.Context, *CreateExchangeRateRequest) (*CreateExchangeRateResponse, error) DeleteExchangeRateRequest(context.Context, *CreateExchangeRateRequest) (*CreateExchangeRateResponse, error) Convert(context.Context, *ConversionRequest) (*ConversionResponse, error) // contains filtered or unexported methods }
CurrencyServiceServer is the server API for CurrencyService service. All implementations must embed UnimplementedCurrencyServiceServer for forward compatibility
type DeleteExchangeRateRequest ¶
type DeleteExchangeRateRequest struct { From Currency `protobuf:"varint,1,opt,name=from,proto3,enum=nocloud.billing.Currency" json:"from,omitempty"` To Currency `protobuf:"varint,2,opt,name=to,proto3,enum=nocloud.billing.Currency" json:"to,omitempty"` // contains filtered or unexported fields }
func (*DeleteExchangeRateRequest) Descriptor
deprecated
func (*DeleteExchangeRateRequest) Descriptor() ([]byte, []int)
Deprecated: Use DeleteExchangeRateRequest.ProtoReflect.Descriptor instead.
func (*DeleteExchangeRateRequest) GetFrom ¶
func (x *DeleteExchangeRateRequest) GetFrom() Currency
func (*DeleteExchangeRateRequest) GetTo ¶
func (x *DeleteExchangeRateRequest) GetTo() Currency
func (*DeleteExchangeRateRequest) ProtoMessage ¶
func (*DeleteExchangeRateRequest) ProtoMessage()
func (*DeleteExchangeRateRequest) ProtoReflect ¶
func (x *DeleteExchangeRateRequest) ProtoReflect() protoreflect.Message
func (*DeleteExchangeRateRequest) Reset ¶
func (x *DeleteExchangeRateRequest) Reset()
func (*DeleteExchangeRateRequest) String ¶
func (x *DeleteExchangeRateRequest) String() string
type DeleteExchangeRateResponse ¶
type DeleteExchangeRateResponse struct {
// contains filtered or unexported fields
}
func (*DeleteExchangeRateResponse) Descriptor
deprecated
func (*DeleteExchangeRateResponse) Descriptor() ([]byte, []int)
Deprecated: Use DeleteExchangeRateResponse.ProtoReflect.Descriptor instead.
func (*DeleteExchangeRateResponse) ProtoMessage ¶
func (*DeleteExchangeRateResponse) ProtoMessage()
func (*DeleteExchangeRateResponse) ProtoReflect ¶
func (x *DeleteExchangeRateResponse) ProtoReflect() protoreflect.Message
func (*DeleteExchangeRateResponse) Reset ¶
func (x *DeleteExchangeRateResponse) Reset()
func (*DeleteExchangeRateResponse) String ¶
func (x *DeleteExchangeRateResponse) String() string
type Fee ¶
type Fee struct { Precision int64 `protobuf:"varint,1,opt,name=precision,proto3" json:"precision,omitempty"` Round Round `protobuf:"varint,2,opt,name=round,proto3,enum=nocloud.billing.Round" json:"round,omitempty"` Default float64 `protobuf:"fixed64,3,opt,name=default,proto3" json:"default,omitempty"` Ranges []*FeeRange `protobuf:"bytes,4,rep,name=ranges,proto3" json:"ranges,omitempty"` // contains filtered or unexported fields }
func (*Fee) Descriptor
deprecated
func (*Fee) GetDefault ¶
func (*Fee) GetPrecision ¶
func (*Fee) ProtoMessage ¶
func (*Fee) ProtoMessage()
func (*Fee) ProtoReflect ¶
func (x *Fee) ProtoReflect() protoreflect.Message
type FeeRange ¶
type FeeRange struct { From float64 `protobuf:"fixed64,1,opt,name=from,proto3" json:"from,omitempty"` To float64 `protobuf:"fixed64,2,opt,name=to,proto3" json:"to,omitempty"` Factor float64 `protobuf:"fixed64,3,opt,name=factor,proto3" json:"factor,omitempty"` // contains filtered or unexported fields }
func (*FeeRange) Descriptor
deprecated
func (*FeeRange) ProtoMessage ¶
func (*FeeRange) ProtoMessage()
func (*FeeRange) ProtoReflect ¶
func (x *FeeRange) ProtoReflect() protoreflect.Message
type GetActiveRequest ¶
type GetActiveRequest struct { Uuid string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"` // Instance UUID // contains filtered or unexported fields }
func (*GetActiveRequest) Descriptor
deprecated
func (*GetActiveRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetActiveRequest.ProtoReflect.Descriptor instead.
func (*GetActiveRequest) GetUuid ¶
func (x *GetActiveRequest) GetUuid() string
func (*GetActiveRequest) ProtoMessage ¶
func (*GetActiveRequest) ProtoMessage()
func (*GetActiveRequest) ProtoReflect ¶
func (x *GetActiveRequest) ProtoReflect() protoreflect.Message
func (*GetActiveRequest) Reset ¶
func (x *GetActiveRequest) Reset()
func (*GetActiveRequest) String ¶
func (x *GetActiveRequest) String() string
type GetCurrenciesRequest ¶
type GetCurrenciesRequest struct {
// contains filtered or unexported fields
}
func (*GetCurrenciesRequest) Descriptor
deprecated
func (*GetCurrenciesRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetCurrenciesRequest.ProtoReflect.Descriptor instead.
func (*GetCurrenciesRequest) ProtoMessage ¶
func (*GetCurrenciesRequest) ProtoMessage()
func (*GetCurrenciesRequest) ProtoReflect ¶
func (x *GetCurrenciesRequest) ProtoReflect() protoreflect.Message
func (*GetCurrenciesRequest) Reset ¶
func (x *GetCurrenciesRequest) Reset()
func (*GetCurrenciesRequest) String ¶
func (x *GetCurrenciesRequest) String() string
type GetCurrenciesResponse ¶
type GetCurrenciesResponse struct { Currencies []Currency `protobuf:"varint,1,rep,packed,name=currencies,proto3,enum=nocloud.billing.Currency" json:"currencies,omitempty"` // contains filtered or unexported fields }
func (*GetCurrenciesResponse) Descriptor
deprecated
func (*GetCurrenciesResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetCurrenciesResponse.ProtoReflect.Descriptor instead.
func (*GetCurrenciesResponse) GetCurrencies ¶
func (x *GetCurrenciesResponse) GetCurrencies() []Currency
func (*GetCurrenciesResponse) ProtoMessage ¶
func (*GetCurrenciesResponse) ProtoMessage()
func (*GetCurrenciesResponse) ProtoReflect ¶
func (x *GetCurrenciesResponse) ProtoReflect() protoreflect.Message
func (*GetCurrenciesResponse) Reset ¶
func (x *GetCurrenciesResponse) Reset()
func (*GetCurrenciesResponse) String ¶
func (x *GetCurrenciesResponse) String() string
type GetExchangeRateRequest ¶
type GetExchangeRateRequest struct { From Currency `protobuf:"varint,1,opt,name=from,proto3,enum=nocloud.billing.Currency" json:"from,omitempty"` To Currency `protobuf:"varint,2,opt,name=to,proto3,enum=nocloud.billing.Currency" json:"to,omitempty"` // contains filtered or unexported fields }
func (*GetExchangeRateRequest) Descriptor
deprecated
func (*GetExchangeRateRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetExchangeRateRequest.ProtoReflect.Descriptor instead.
func (*GetExchangeRateRequest) GetFrom ¶
func (x *GetExchangeRateRequest) GetFrom() Currency
func (*GetExchangeRateRequest) GetTo ¶
func (x *GetExchangeRateRequest) GetTo() Currency
func (*GetExchangeRateRequest) ProtoMessage ¶
func (*GetExchangeRateRequest) ProtoMessage()
func (*GetExchangeRateRequest) ProtoReflect ¶
func (x *GetExchangeRateRequest) ProtoReflect() protoreflect.Message
func (*GetExchangeRateRequest) Reset ¶
func (x *GetExchangeRateRequest) Reset()
func (*GetExchangeRateRequest) String ¶
func (x *GetExchangeRateRequest) String() string
type GetExchangeRateResponse ¶
type GetExchangeRateResponse struct { Rate float64 `protobuf:"fixed64,1,opt,name=rate,proto3" json:"rate,omitempty"` // contains filtered or unexported fields }
func (*GetExchangeRateResponse) Descriptor
deprecated
func (*GetExchangeRateResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetExchangeRateResponse.ProtoReflect.Descriptor instead.
func (*GetExchangeRateResponse) GetRate ¶
func (x *GetExchangeRateResponse) GetRate() float64
func (*GetExchangeRateResponse) ProtoMessage ¶
func (*GetExchangeRateResponse) ProtoMessage()
func (*GetExchangeRateResponse) ProtoReflect ¶
func (x *GetExchangeRateResponse) ProtoReflect() protoreflect.Message
func (*GetExchangeRateResponse) Reset ¶
func (x *GetExchangeRateResponse) Reset()
func (*GetExchangeRateResponse) String ¶
func (x *GetExchangeRateResponse) String() string
type GetTransactionsRequest ¶
type GetTransactionsRequest struct { Account *string `protobuf:"bytes,1,opt,name=account,proto3,oneof" json:"account,omitempty"` Service *string `protobuf:"bytes,2,opt,name=service,proto3,oneof" json:"service,omitempty"` // contains filtered or unexported fields }
func (*GetTransactionsRequest) Descriptor
deprecated
func (*GetTransactionsRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetTransactionsRequest.ProtoReflect.Descriptor instead.
func (*GetTransactionsRequest) GetAccount ¶
func (x *GetTransactionsRequest) GetAccount() string
func (*GetTransactionsRequest) GetService ¶
func (x *GetTransactionsRequest) GetService() string
func (*GetTransactionsRequest) ProtoMessage ¶
func (*GetTransactionsRequest) ProtoMessage()
func (*GetTransactionsRequest) ProtoReflect ¶
func (x *GetTransactionsRequest) ProtoReflect() protoreflect.Message
func (*GetTransactionsRequest) Reset ¶
func (x *GetTransactionsRequest) Reset()
func (*GetTransactionsRequest) String ¶
func (x *GetTransactionsRequest) String() string
type Kind ¶
type Kind int32
func (Kind) Descriptor ¶
func (Kind) Descriptor() protoreflect.EnumDescriptor
func (Kind) EnumDescriptor
deprecated
func (Kind) Number ¶
func (x Kind) Number() protoreflect.EnumNumber
func (Kind) Type ¶
func (Kind) Type() protoreflect.EnumType
type ListRequest ¶
type ListRequest struct { SpUuid string `protobuf:"bytes,1,opt,name=sp_uuid,json=spUuid,proto3" json:"sp_uuid,omitempty"` Anonymously bool `protobuf:"varint,2,opt,name=anonymously,proto3" json:"anonymously,omitempty"` // contains filtered or unexported fields }
func (*ListRequest) Descriptor
deprecated
func (*ListRequest) Descriptor() ([]byte, []int)
Deprecated: Use ListRequest.ProtoReflect.Descriptor instead.
func (*ListRequest) GetAnonymously ¶
func (x *ListRequest) GetAnonymously() bool
func (*ListRequest) GetSpUuid ¶
func (x *ListRequest) GetSpUuid() string
func (*ListRequest) ProtoMessage ¶
func (*ListRequest) ProtoMessage()
func (*ListRequest) ProtoReflect ¶
func (x *ListRequest) ProtoReflect() protoreflect.Message
func (*ListRequest) Reset ¶
func (x *ListRequest) Reset()
func (*ListRequest) String ¶
func (x *ListRequest) String() string
type ListResponse ¶
type ListResponse struct { Pool []*Plan `protobuf:"bytes,1,rep,name=pool,proto3" json:"pool,omitempty"` // contains filtered or unexported fields }
func (*ListResponse) Descriptor
deprecated
func (*ListResponse) Descriptor() ([]byte, []int)
Deprecated: Use ListResponse.ProtoReflect.Descriptor instead.
func (*ListResponse) GetPool ¶
func (x *ListResponse) GetPool() []*Plan
func (*ListResponse) ProtoMessage ¶
func (*ListResponse) ProtoMessage()
func (*ListResponse) ProtoReflect ¶
func (x *ListResponse) ProtoReflect() protoreflect.Message
func (*ListResponse) Reset ¶
func (x *ListResponse) Reset()
func (*ListResponse) String ¶
func (x *ListResponse) String() string
type Plan ¶
type Plan struct { Uuid string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"` Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"` Type string `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"` // Instance / InstanceGroup type supported by this plan Public bool `protobuf:"varint,4,opt,name=public,proto3" json:"public,omitempty"` // if true, then this plan is available for all users Kind PlanKind `protobuf:"varint,5,opt,name=kind,proto3,enum=nocloud.billing.PlanKind" json:"kind,omitempty"` // dynamic(based on resources) or static(based on products) Resources []*ResourceConf `protobuf:"bytes,6,rep,name=resources,proto3" json:"resources,omitempty"` // Resources confs to make plan dynamic Products map[string]*Product `` // Products to make plan pre defined(map key is product key like sm, lg /* 157-byte string literal not displayed */ // or whatever) Meta map[string]*structpb.Value `` /* 149-byte string literal not displayed */ Fee *Fee `protobuf:"bytes,9,opt,name=fee,proto3" json:"fee,omitempty"` // contains filtered or unexported fields }
func (*Plan) Descriptor
deprecated
func (*Plan) GetProducts ¶
func (*Plan) GetResources ¶
func (x *Plan) GetResources() []*ResourceConf
func (*Plan) ProtoMessage ¶
func (*Plan) ProtoMessage()
func (*Plan) ProtoReflect ¶
func (x *Plan) ProtoReflect() protoreflect.Message
type PlanKind ¶
type PlanKind int32
func (PlanKind) Descriptor ¶
func (PlanKind) Descriptor() protoreflect.EnumDescriptor
func (PlanKind) EnumDescriptor
deprecated
func (PlanKind) Number ¶
func (x PlanKind) Number() protoreflect.EnumNumber
func (PlanKind) Type ¶
func (PlanKind) Type() protoreflect.EnumType
type Product ¶
type Product struct { Kind Kind `protobuf:"varint,1,opt,name=kind,proto3,enum=nocloud.billing.Kind" json:"kind,omitempty"` Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"` // Product title Price float64 `protobuf:"fixed64,3,opt,name=price,proto3" json:"price,omitempty"` // Product price in NCU per period Period int64 `protobuf:"varint,4,opt,name=period,proto3" json:"period,omitempty"` Resources map[string]*structpb.Value `` // Map of resources keys to fixed units amount /* 159-byte string literal not displayed */ Meta map[string]*structpb.Value `` /* 149-byte string literal not displayed */ Sorter *int32 `protobuf:"varint,7,opt,name=sorter,proto3,oneof" json:"sorter,omitempty"` // Sorting order, might be needed in UIs // contains filtered or unexported fields }
func (*Product) Descriptor
deprecated
func (*Product) ProtoMessage ¶
func (*Product) ProtoMessage()
func (*Product) ProtoReflect ¶
func (x *Product) ProtoReflect() protoreflect.Message
type Record ¶
type Record struct { Uuid string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"` // Record UUID Start int64 `protobuf:"varint,2,opt,name=start,proto3" json:"start,omitempty"` // Timestamp of Record coverage frame start End int64 `protobuf:"varint,3,opt,name=end,proto3" json:"end,omitempty"` // Timestamp of Record coverage frame end Exec int64 `protobuf:"varint,4,opt,name=exec,proto3" json:"exec,omitempty"` // Time when Record must be processed Processed bool `protobuf:"varint,5,opt,name=processed,proto3" json:"processed,omitempty"` // Wether Record has been processed(converted to Transaction) Instance string `protobuf:"bytes,6,opt,name=instance,proto3" json:"instance,omitempty"` // Instance UUID State proto.NoCloudState `protobuf:"varint,7,opt,name=state,proto3,enum=nocloud.states.NoCloudState" json:"state,omitempty"` // Instance state Resource string `protobuf:"bytes,8,opt,name=resource,proto3" json:"resource,omitempty"` // Resource key Product string `protobuf:"bytes,9,opt,name=product,proto3" json:"product,omitempty"` // Product key Total float64 `protobuf:"fixed64,10,opt,name=total,proto3" json:"total,omitempty"` // Record total value in NCU // Record meta data, like // meta: { // total: <number> // resource "quantity", e.g. CPU cores, RAM Mb, Drive // Mb, IP quantity price_atm: <number> // hourly price per quant of resouce at // the moment, e.g. 1 NCU [other keys]: <any> // for example Drive // Type(SSD/HDD/NVMe/etc) // } Meta map[string]*structpb.Value `` /* 150-byte string literal not displayed */ // contains filtered or unexported fields }
func (*Record) Descriptor
deprecated
func (*Record) GetInstance ¶
func (*Record) GetProcessed ¶
func (*Record) GetProduct ¶
func (*Record) GetResource ¶
func (*Record) GetState ¶
func (x *Record) GetState() proto.NoCloudState
func (*Record) ProtoMessage ¶
func (*Record) ProtoMessage()
func (*Record) ProtoReflect ¶
func (x *Record) ProtoReflect() protoreflect.Message
type Records ¶
type Records struct { Pool []*Record `protobuf:"bytes,1,rep,name=pool,proto3" json:"pool,omitempty"` // contains filtered or unexported fields }
func (*Records) Descriptor
deprecated
func (*Records) ProtoMessage ¶
func (*Records) ProtoMessage()
func (*Records) ProtoReflect ¶
func (x *Records) ProtoReflect() protoreflect.Message
type RecordsServiceClient ¶
type RecordsServiceClient interface { GetActive(ctx context.Context, in *GetActiveRequest, opts ...grpc.CallOption) (*Records, error) Create(ctx context.Context, in *Records, opts ...grpc.CallOption) (*Records, error) Update(ctx context.Context, in *Records, opts ...grpc.CallOption) (*Records, error) }
RecordsServiceClient is the client API for RecordsService 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 NewRecordsServiceClient ¶
func NewRecordsServiceClient(cc grpc.ClientConnInterface) RecordsServiceClient
type RecordsServiceServer ¶
type RecordsServiceServer interface { GetActive(context.Context, *GetActiveRequest) (*Records, error) Create(context.Context, *Records) (*Records, error) Update(context.Context, *Records) (*Records, error) // contains filtered or unexported methods }
RecordsServiceServer is the server API for RecordsService service. All implementations must embed UnimplementedRecordsServiceServer for forward compatibility
type ReprocessTransactionsRequest ¶
type ReprocessTransactionsRequest struct { Account string `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"` // contains filtered or unexported fields }
func (*ReprocessTransactionsRequest) Descriptor
deprecated
func (*ReprocessTransactionsRequest) Descriptor() ([]byte, []int)
Deprecated: Use ReprocessTransactionsRequest.ProtoReflect.Descriptor instead.
func (*ReprocessTransactionsRequest) GetAccount ¶
func (x *ReprocessTransactionsRequest) GetAccount() string
func (*ReprocessTransactionsRequest) ProtoMessage ¶
func (*ReprocessTransactionsRequest) ProtoMessage()
func (*ReprocessTransactionsRequest) ProtoReflect ¶
func (x *ReprocessTransactionsRequest) ProtoReflect() protoreflect.Message
func (*ReprocessTransactionsRequest) Reset ¶
func (x *ReprocessTransactionsRequest) Reset()
func (*ReprocessTransactionsRequest) String ¶
func (x *ReprocessTransactionsRequest) String() string
type ResourceConf ¶
type ResourceConf struct { Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` Kind Kind `protobuf:"varint,2,opt,name=kind,proto3,enum=nocloud.billing.Kind" json:"kind,omitempty"` Price float64 `protobuf:"fixed64,3,opt,name=price,proto3" json:"price,omitempty"` // Price in NCU per period Period int64 `protobuf:"varint,4,opt,name=period,proto3" json:"period,omitempty"` // if set to 0, then it's a one-time payment // If except set to true then transaction will be created if Instance is in // one of the states listed in on If except set to false then transaction will // be created if Instance is NOT in one of the states listed in on Except bool `protobuf:"varint,5,opt,name=except,proto3" json:"except,omitempty"` On []proto.NoCloudState `protobuf:"varint,6,rep,packed,name=on,proto3,enum=nocloud.states.NoCloudState" json:"on,omitempty"` Fee *Fee `protobuf:"bytes,7,opt,name=fee,proto3" json:"fee,omitempty"` // contains filtered or unexported fields }
func (*ResourceConf) Descriptor
deprecated
func (*ResourceConf) Descriptor() ([]byte, []int)
Deprecated: Use ResourceConf.ProtoReflect.Descriptor instead.
func (*ResourceConf) GetExcept ¶
func (x *ResourceConf) GetExcept() bool
func (*ResourceConf) GetFee ¶
func (x *ResourceConf) GetFee() *Fee
func (*ResourceConf) GetKey ¶
func (x *ResourceConf) GetKey() string
func (*ResourceConf) GetKind ¶
func (x *ResourceConf) GetKind() Kind
func (*ResourceConf) GetOn ¶
func (x *ResourceConf) GetOn() []proto.NoCloudState
func (*ResourceConf) GetPeriod ¶
func (x *ResourceConf) GetPeriod() int64
func (*ResourceConf) GetPrice ¶
func (x *ResourceConf) GetPrice() float64
func (*ResourceConf) ProtoMessage ¶
func (*ResourceConf) ProtoMessage()
func (*ResourceConf) ProtoReflect ¶
func (x *ResourceConf) ProtoReflect() protoreflect.Message
func (*ResourceConf) Reset ¶
func (x *ResourceConf) Reset()
func (*ResourceConf) String ¶
func (x *ResourceConf) String() string
type Round ¶
type Round int32
func (Round) Descriptor ¶
func (Round) Descriptor() protoreflect.EnumDescriptor
func (Round) EnumDescriptor
deprecated
func (Round) Number ¶
func (x Round) Number() protoreflect.EnumNumber
func (Round) Type ¶
func (Round) Type() protoreflect.EnumType
type Transaction ¶
type Transaction struct { Uuid string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"` // transaction UUID Exec int64 `protobuf:"varint,2,opt,name=exec,proto3" json:"exec,omitempty"` // Timestamp of Transaction planned execution time Proc int64 `protobuf:"varint,3,opt,name=proc,proto3" json:"proc,omitempty"` // Timestamp of Transaction processing time Processed bool `protobuf:"varint,4,opt,name=processed,proto3" json:"processed,omitempty"` // Wether Transaction has been processed(applied to Account string `protobuf:"bytes,5,opt,name=account,proto3" json:"account,omitempty"` Service string `protobuf:"bytes,6,opt,name=service,proto3" json:"service,omitempty"` Records []string `protobuf:"bytes,7,rep,name=records,proto3" json:"records,omitempty"` // list of records UUIDs Total float64 `protobuf:"fixed64,8,opt,name=total,proto3" json:"total,omitempty"` // Transaction total value in NCU // Transaction meta data, like // meta: { // total: <number> // resource "quantity", e.g. CPU cores, RAM Mb, Drive // Mb, IP quantity price_atm: <number> // hourly price per quant of resouce at // the moment, e.g. 1 NCU [other keys]: <any> // for example Drive // Type(SSD/HDD/NVMe/etc) // } Meta map[string]*structpb.Value `` /* 149-byte string literal not displayed */ // contains filtered or unexported fields }
func (*Transaction) Descriptor
deprecated
func (*Transaction) Descriptor() ([]byte, []int)
Deprecated: Use Transaction.ProtoReflect.Descriptor instead.
func (*Transaction) GetAccount ¶
func (x *Transaction) GetAccount() string
func (*Transaction) GetExec ¶
func (x *Transaction) GetExec() int64
func (*Transaction) GetProc ¶
func (x *Transaction) GetProc() int64
func (*Transaction) GetProcessed ¶
func (x *Transaction) GetProcessed() bool
func (*Transaction) GetRecords ¶
func (x *Transaction) GetRecords() []string
func (*Transaction) GetService ¶
func (x *Transaction) GetService() string
func (*Transaction) GetTotal ¶
func (x *Transaction) GetTotal() float64
func (*Transaction) GetUuid ¶
func (x *Transaction) GetUuid() string
func (*Transaction) ProtoMessage ¶
func (*Transaction) ProtoMessage()
func (*Transaction) ProtoReflect ¶
func (x *Transaction) ProtoReflect() protoreflect.Message
func (*Transaction) Reset ¶
func (x *Transaction) Reset()
func (*Transaction) String ¶
func (x *Transaction) String() string
type Transactions ¶
type Transactions struct { Pool []*Transaction `protobuf:"bytes,1,rep,name=pool,proto3" json:"pool,omitempty"` // contains filtered or unexported fields }
func (*Transactions) Descriptor
deprecated
func (*Transactions) Descriptor() ([]byte, []int)
Deprecated: Use Transactions.ProtoReflect.Descriptor instead.
func (*Transactions) GetPool ¶
func (x *Transactions) GetPool() []*Transaction
func (*Transactions) ProtoMessage ¶
func (*Transactions) ProtoMessage()
func (*Transactions) ProtoReflect ¶
func (x *Transactions) ProtoReflect() protoreflect.Message
func (*Transactions) Reset ¶
func (x *Transactions) Reset()
func (*Transactions) String ¶
func (x *Transactions) String() string
type UnimplementedBillingServiceServer ¶
type UnimplementedBillingServiceServer struct { }
UnimplementedBillingServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedBillingServiceServer) CreatePlan ¶
func (UnimplementedBillingServiceServer) CreateTransaction ¶
func (UnimplementedBillingServiceServer) CreateTransaction(context.Context, *Transaction) (*Transaction, error)
func (UnimplementedBillingServiceServer) DeletePlan ¶
func (UnimplementedBillingServiceServer) GetRecords ¶
func (UnimplementedBillingServiceServer) GetRecords(context.Context, *Transaction) (*Records, error)
func (UnimplementedBillingServiceServer) GetTransactions ¶
func (UnimplementedBillingServiceServer) GetTransactions(context.Context, *GetTransactionsRequest) (*Transactions, error)
func (UnimplementedBillingServiceServer) ListPlans ¶
func (UnimplementedBillingServiceServer) ListPlans(context.Context, *ListRequest) (*ListResponse, error)
func (UnimplementedBillingServiceServer) Reprocess ¶
func (UnimplementedBillingServiceServer) Reprocess(context.Context, *ReprocessTransactionsRequest) (*Transactions, error)
func (UnimplementedBillingServiceServer) UpdatePlan ¶
type UnimplementedCurrencyServiceServer ¶
type UnimplementedCurrencyServiceServer struct { }
UnimplementedCurrencyServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedCurrencyServiceServer) Convert ¶
func (UnimplementedCurrencyServiceServer) Convert(context.Context, *ConversionRequest) (*ConversionResponse, error)
func (UnimplementedCurrencyServiceServer) CreateExchangeRate ¶
func (UnimplementedCurrencyServiceServer) CreateExchangeRate(context.Context, *CreateExchangeRateRequest) (*CreateExchangeRateResponse, error)
func (UnimplementedCurrencyServiceServer) DeleteExchangeRateRequest ¶
func (UnimplementedCurrencyServiceServer) DeleteExchangeRateRequest(context.Context, *CreateExchangeRateRequest) (*CreateExchangeRateResponse, error)
func (UnimplementedCurrencyServiceServer) GetCurrencies ¶
func (UnimplementedCurrencyServiceServer) GetCurrencies(context.Context, *GetCurrenciesRequest) (*GetCurrenciesResponse, error)
func (UnimplementedCurrencyServiceServer) GetExchangeRate ¶
func (UnimplementedCurrencyServiceServer) GetExchangeRate(context.Context, *GetExchangeRateRequest) (*GetExchangeRateResponse, error)
func (UnimplementedCurrencyServiceServer) UpdateExchangeRateRequest ¶
func (UnimplementedCurrencyServiceServer) UpdateExchangeRateRequest(context.Context, *CreateExchangeRateRequest) (*CreateExchangeRateResponse, error)
type UnimplementedRecordsServiceServer ¶
type UnimplementedRecordsServiceServer struct { }
UnimplementedRecordsServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedRecordsServiceServer) GetActive ¶
func (UnimplementedRecordsServiceServer) GetActive(context.Context, *GetActiveRequest) (*Records, error)
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.
type UnsafeCurrencyServiceServer ¶
type UnsafeCurrencyServiceServer interface {
// contains filtered or unexported methods
}
UnsafeCurrencyServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to CurrencyServiceServer will result in compilation errors.
type UnsafeRecordsServiceServer ¶
type UnsafeRecordsServiceServer interface {
// contains filtered or unexported methods
}
UnsafeRecordsServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to RecordsServiceServer will result in compilation errors.
type UpdateExchangeRateRequest ¶
type UpdateExchangeRateRequest struct { From Currency `protobuf:"varint,1,opt,name=from,proto3,enum=nocloud.billing.Currency" json:"from,omitempty"` To Currency `protobuf:"varint,2,opt,name=to,proto3,enum=nocloud.billing.Currency" json:"to,omitempty"` Rate float64 `protobuf:"fixed64,3,opt,name=rate,proto3" json:"rate,omitempty"` // contains filtered or unexported fields }
func (*UpdateExchangeRateRequest) Descriptor
deprecated
func (*UpdateExchangeRateRequest) Descriptor() ([]byte, []int)
Deprecated: Use UpdateExchangeRateRequest.ProtoReflect.Descriptor instead.
func (*UpdateExchangeRateRequest) GetFrom ¶
func (x *UpdateExchangeRateRequest) GetFrom() Currency
func (*UpdateExchangeRateRequest) GetRate ¶
func (x *UpdateExchangeRateRequest) GetRate() float64
func (*UpdateExchangeRateRequest) GetTo ¶
func (x *UpdateExchangeRateRequest) GetTo() Currency
func (*UpdateExchangeRateRequest) ProtoMessage ¶
func (*UpdateExchangeRateRequest) ProtoMessage()
func (*UpdateExchangeRateRequest) ProtoReflect ¶
func (x *UpdateExchangeRateRequest) ProtoReflect() protoreflect.Message
func (*UpdateExchangeRateRequest) Reset ¶
func (x *UpdateExchangeRateRequest) Reset()
func (*UpdateExchangeRateRequest) String ¶
func (x *UpdateExchangeRateRequest) String() string
type UpdateExchangeRateResponse ¶
type UpdateExchangeRateResponse struct {
// contains filtered or unexported fields
}
func (*UpdateExchangeRateResponse) Descriptor
deprecated
func (*UpdateExchangeRateResponse) Descriptor() ([]byte, []int)
Deprecated: Use UpdateExchangeRateResponse.ProtoReflect.Descriptor instead.
func (*UpdateExchangeRateResponse) ProtoMessage ¶
func (*UpdateExchangeRateResponse) ProtoMessage()
func (*UpdateExchangeRateResponse) ProtoReflect ¶
func (x *UpdateExchangeRateResponse) ProtoReflect() protoreflect.Message
func (*UpdateExchangeRateResponse) Reset ¶
func (x *UpdateExchangeRateResponse) Reset()
func (*UpdateExchangeRateResponse) String ¶
func (x *UpdateExchangeRateResponse) String() string