Documentation ¶
Overview ¶
Package v1 is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterBalanceServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterBalanceServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client BalanceServiceClient) error
- func RegisterBalanceServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterBalanceServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server BalanceServiceServer) error
- func RegisterBalanceServiceServer(s grpc.ServiceRegistrar, srv BalanceServiceServer)
- type AccountAndBalance
- func (*AccountAndBalance) Descriptor() ([]byte, []int)deprecated
- func (x *AccountAndBalance) GetAvailable() string
- func (x *AccountAndBalance) GetBalance() string
- func (x *AccountAndBalance) GetBalanceAt() *timestamppb.Timestamp
- func (x *AccountAndBalance) GetCurrency() string
- func (x *AccountAndBalance) GetFiatValue() string
- func (x *AccountAndBalance) GetHold() string
- func (x *AccountAndBalance) GetUserId() string
- func (*AccountAndBalance) ProtoMessage()
- func (x *AccountAndBalance) ProtoReflect() protoreflect.Message
- func (x *AccountAndBalance) Reset()
- func (x *AccountAndBalance) String() string
- func (m *AccountAndBalance) Validate() error
- func (m *AccountAndBalance) ValidateAll() error
- type AccountAndBalanceMultiError
- type AccountAndBalanceValidationError
- func (e AccountAndBalanceValidationError) Cause() error
- func (e AccountAndBalanceValidationError) Error() string
- func (e AccountAndBalanceValidationError) ErrorName() string
- func (e AccountAndBalanceValidationError) Field() string
- func (e AccountAndBalanceValidationError) Key() bool
- func (e AccountAndBalanceValidationError) Reason() string
- type BalanceServiceClient
- type BalanceServiceServer
- type ListBalancesRequest
- func (*ListBalancesRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ListBalancesRequest) GetId() string
- func (*ListBalancesRequest) ProtoMessage()
- func (x *ListBalancesRequest) ProtoReflect() protoreflect.Message
- func (x *ListBalancesRequest) Reset()
- func (x *ListBalancesRequest) String() string
- func (m *ListBalancesRequest) Validate() error
- func (m *ListBalancesRequest) ValidateAll() error
- type ListBalancesRequestMultiError
- type ListBalancesRequestValidationError
- func (e ListBalancesRequestValidationError) Cause() error
- func (e ListBalancesRequestValidationError) Error() string
- func (e ListBalancesRequestValidationError) ErrorName() string
- func (e ListBalancesRequestValidationError) Field() string
- func (e ListBalancesRequestValidationError) Key() bool
- func (e ListBalancesRequestValidationError) Reason() string
- type ListBalancesResponse
- func (*ListBalancesResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ListBalancesResponse) GetData() []*AccountAndBalance
- func (*ListBalancesResponse) ProtoMessage()
- func (x *ListBalancesResponse) ProtoReflect() protoreflect.Message
- func (x *ListBalancesResponse) Reset()
- func (x *ListBalancesResponse) String() string
- func (m *ListBalancesResponse) Validate() error
- func (m *ListBalancesResponse) ValidateAll() error
- type ListBalancesResponseMultiError
- type ListBalancesResponseValidationError
- func (e ListBalancesResponseValidationError) Cause() error
- func (e ListBalancesResponseValidationError) Error() string
- func (e ListBalancesResponseValidationError) ErrorName() string
- func (e ListBalancesResponseValidationError) Field() string
- func (e ListBalancesResponseValidationError) Key() bool
- func (e ListBalancesResponseValidationError) Reason() string
- type UnimplementedBalanceServiceServer
- type UnsafeBalanceServiceServer
Constants ¶
This section is empty.
Variables ¶
var BalanceService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "pkg.pbs.balance.v1.BalanceService", HandlerType: (*BalanceServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "ListBalances", Handler: _BalanceService_ListBalances_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "pkg/pbs/balance/v1/balance.proto", }
BalanceService_ServiceDesc is the grpc.ServiceDesc for BalanceService 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_pbs_balance_v1_balance_proto protoreflect.FileDescriptor
Functions ¶
func RegisterBalanceServiceHandler ¶
func RegisterBalanceServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterBalanceServiceHandler registers the http handlers for service BalanceService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterBalanceServiceHandlerClient ¶
func RegisterBalanceServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client BalanceServiceClient) error
RegisterBalanceServiceHandlerClient registers the http handlers for service BalanceService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "BalanceServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "BalanceServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "BalanceServiceClient" to call the correct interceptors.
func RegisterBalanceServiceHandlerFromEndpoint ¶
func RegisterBalanceServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterBalanceServiceHandlerFromEndpoint is same as RegisterBalanceServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterBalanceServiceHandlerServer ¶
func RegisterBalanceServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server BalanceServiceServer) error
RegisterBalanceServiceHandlerServer registers the http handlers for service BalanceService to "mux". UnaryRPC :call BalanceServiceServer 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 RegisterBalanceServiceHandlerFromEndpoint instead.
func RegisterBalanceServiceServer ¶
func RegisterBalanceServiceServer(s grpc.ServiceRegistrar, srv BalanceServiceServer)
Types ¶
type AccountAndBalance ¶
type AccountAndBalance struct { UserId string `protobuf:"bytes,1,opt,name=userId,proto3" json:"userId,omitempty"` Currency string `protobuf:"bytes,2,opt,name=currency,proto3" json:"currency,omitempty"` Balance string `protobuf:"bytes,3,opt,name=balance,proto3" json:"balance,omitempty"` Hold string `protobuf:"bytes,4,opt,name=hold,proto3" json:"hold,omitempty"` Available string `protobuf:"bytes,5,opt,name=available,proto3" json:"available,omitempty"` BalanceAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=balanceAt,proto3" json:"balanceAt,omitempty"` FiatValue string `protobuf:"bytes,7,opt,name=fiatValue,proto3" json:"fiatValue,omitempty"` // contains filtered or unexported fields }
func (*AccountAndBalance) Descriptor
deprecated
func (*AccountAndBalance) Descriptor() ([]byte, []int)
Deprecated: Use AccountAndBalance.ProtoReflect.Descriptor instead.
func (*AccountAndBalance) GetAvailable ¶
func (x *AccountAndBalance) GetAvailable() string
func (*AccountAndBalance) GetBalance ¶
func (x *AccountAndBalance) GetBalance() string
func (*AccountAndBalance) GetBalanceAt ¶
func (x *AccountAndBalance) GetBalanceAt() *timestamppb.Timestamp
func (*AccountAndBalance) GetCurrency ¶
func (x *AccountAndBalance) GetCurrency() string
func (*AccountAndBalance) GetFiatValue ¶
func (x *AccountAndBalance) GetFiatValue() string
func (*AccountAndBalance) GetHold ¶
func (x *AccountAndBalance) GetHold() string
func (*AccountAndBalance) GetUserId ¶
func (x *AccountAndBalance) GetUserId() string
func (*AccountAndBalance) ProtoMessage ¶
func (*AccountAndBalance) ProtoMessage()
func (*AccountAndBalance) ProtoReflect ¶
func (x *AccountAndBalance) ProtoReflect() protoreflect.Message
func (*AccountAndBalance) Reset ¶
func (x *AccountAndBalance) Reset()
func (*AccountAndBalance) String ¶
func (x *AccountAndBalance) String() string
func (*AccountAndBalance) Validate ¶
func (m *AccountAndBalance) Validate() error
Validate checks the field values on AccountAndBalance with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*AccountAndBalance) ValidateAll ¶
func (m *AccountAndBalance) ValidateAll() error
ValidateAll checks the field values on AccountAndBalance with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in AccountAndBalanceMultiError, or nil if none found.
type AccountAndBalanceMultiError ¶
type AccountAndBalanceMultiError []error
AccountAndBalanceMultiError is an error wrapping multiple validation errors returned by AccountAndBalance.ValidateAll() if the designated constraints aren't met.
func (AccountAndBalanceMultiError) AllErrors ¶
func (m AccountAndBalanceMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (AccountAndBalanceMultiError) Error ¶
func (m AccountAndBalanceMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type AccountAndBalanceValidationError ¶
type AccountAndBalanceValidationError struct {
// contains filtered or unexported fields
}
AccountAndBalanceValidationError is the validation error returned by AccountAndBalance.Validate if the designated constraints aren't met.
func (AccountAndBalanceValidationError) Cause ¶
func (e AccountAndBalanceValidationError) Cause() error
Cause function returns cause value.
func (AccountAndBalanceValidationError) Error ¶
func (e AccountAndBalanceValidationError) Error() string
Error satisfies the builtin error interface
func (AccountAndBalanceValidationError) ErrorName ¶
func (e AccountAndBalanceValidationError) ErrorName() string
ErrorName returns error name.
func (AccountAndBalanceValidationError) Field ¶
func (e AccountAndBalanceValidationError) Field() string
Field function returns field value.
func (AccountAndBalanceValidationError) Key ¶
func (e AccountAndBalanceValidationError) Key() bool
Key function returns key value.
func (AccountAndBalanceValidationError) Reason ¶
func (e AccountAndBalanceValidationError) Reason() string
Reason function returns reason value.
type BalanceServiceClient ¶
type BalanceServiceClient interface {
ListBalances(ctx context.Context, in *ListBalancesRequest, opts ...grpc.CallOption) (*ListBalancesResponse, error)
}
BalanceServiceClient is the client API for BalanceService 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 NewBalanceServiceClient ¶
func NewBalanceServiceClient(cc grpc.ClientConnInterface) BalanceServiceClient
type BalanceServiceServer ¶
type BalanceServiceServer interface { ListBalances(context.Context, *ListBalancesRequest) (*ListBalancesResponse, error) // contains filtered or unexported methods }
BalanceServiceServer is the server API for BalanceService service. All implementations must embed UnimplementedBalanceServiceServer for forward compatibility
type ListBalancesRequest ¶
type ListBalancesRequest struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*ListBalancesRequest) Descriptor
deprecated
func (*ListBalancesRequest) Descriptor() ([]byte, []int)
Deprecated: Use ListBalancesRequest.ProtoReflect.Descriptor instead.
func (*ListBalancesRequest) GetId ¶
func (x *ListBalancesRequest) GetId() string
func (*ListBalancesRequest) ProtoMessage ¶
func (*ListBalancesRequest) ProtoMessage()
func (*ListBalancesRequest) ProtoReflect ¶
func (x *ListBalancesRequest) ProtoReflect() protoreflect.Message
func (*ListBalancesRequest) Reset ¶
func (x *ListBalancesRequest) Reset()
func (*ListBalancesRequest) String ¶
func (x *ListBalancesRequest) String() string
func (*ListBalancesRequest) Validate ¶
func (m *ListBalancesRequest) Validate() error
Validate checks the field values on ListBalancesRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*ListBalancesRequest) ValidateAll ¶
func (m *ListBalancesRequest) ValidateAll() error
ValidateAll checks the field values on ListBalancesRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in ListBalancesRequestMultiError, or nil if none found.
type ListBalancesRequestMultiError ¶
type ListBalancesRequestMultiError []error
ListBalancesRequestMultiError is an error wrapping multiple validation errors returned by ListBalancesRequest.ValidateAll() if the designated constraints aren't met.
func (ListBalancesRequestMultiError) AllErrors ¶
func (m ListBalancesRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (ListBalancesRequestMultiError) Error ¶
func (m ListBalancesRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type ListBalancesRequestValidationError ¶
type ListBalancesRequestValidationError struct {
// contains filtered or unexported fields
}
ListBalancesRequestValidationError is the validation error returned by ListBalancesRequest.Validate if the designated constraints aren't met.
func (ListBalancesRequestValidationError) Cause ¶
func (e ListBalancesRequestValidationError) Cause() error
Cause function returns cause value.
func (ListBalancesRequestValidationError) Error ¶
func (e ListBalancesRequestValidationError) Error() string
Error satisfies the builtin error interface
func (ListBalancesRequestValidationError) ErrorName ¶
func (e ListBalancesRequestValidationError) ErrorName() string
ErrorName returns error name.
func (ListBalancesRequestValidationError) Field ¶
func (e ListBalancesRequestValidationError) Field() string
Field function returns field value.
func (ListBalancesRequestValidationError) Key ¶
func (e ListBalancesRequestValidationError) Key() bool
Key function returns key value.
func (ListBalancesRequestValidationError) Reason ¶
func (e ListBalancesRequestValidationError) Reason() string
Reason function returns reason value.
type ListBalancesResponse ¶
type ListBalancesResponse struct { Data []*AccountAndBalance `protobuf:"bytes,1,rep,name=data,proto3" json:"data,omitempty"` // contains filtered or unexported fields }
func (*ListBalancesResponse) Descriptor
deprecated
func (*ListBalancesResponse) Descriptor() ([]byte, []int)
Deprecated: Use ListBalancesResponse.ProtoReflect.Descriptor instead.
func (*ListBalancesResponse) GetData ¶
func (x *ListBalancesResponse) GetData() []*AccountAndBalance
func (*ListBalancesResponse) ProtoMessage ¶
func (*ListBalancesResponse) ProtoMessage()
func (*ListBalancesResponse) ProtoReflect ¶
func (x *ListBalancesResponse) ProtoReflect() protoreflect.Message
func (*ListBalancesResponse) Reset ¶
func (x *ListBalancesResponse) Reset()
func (*ListBalancesResponse) String ¶
func (x *ListBalancesResponse) String() string
func (*ListBalancesResponse) Validate ¶
func (m *ListBalancesResponse) Validate() error
Validate checks the field values on ListBalancesResponse with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*ListBalancesResponse) ValidateAll ¶
func (m *ListBalancesResponse) ValidateAll() error
ValidateAll checks the field values on ListBalancesResponse with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in ListBalancesResponseMultiError, or nil if none found.
type ListBalancesResponseMultiError ¶
type ListBalancesResponseMultiError []error
ListBalancesResponseMultiError is an error wrapping multiple validation errors returned by ListBalancesResponse.ValidateAll() if the designated constraints aren't met.
func (ListBalancesResponseMultiError) AllErrors ¶
func (m ListBalancesResponseMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (ListBalancesResponseMultiError) Error ¶
func (m ListBalancesResponseMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type ListBalancesResponseValidationError ¶
type ListBalancesResponseValidationError struct {
// contains filtered or unexported fields
}
ListBalancesResponseValidationError is the validation error returned by ListBalancesResponse.Validate if the designated constraints aren't met.
func (ListBalancesResponseValidationError) Cause ¶
func (e ListBalancesResponseValidationError) Cause() error
Cause function returns cause value.
func (ListBalancesResponseValidationError) Error ¶
func (e ListBalancesResponseValidationError) Error() string
Error satisfies the builtin error interface
func (ListBalancesResponseValidationError) ErrorName ¶
func (e ListBalancesResponseValidationError) ErrorName() string
ErrorName returns error name.
func (ListBalancesResponseValidationError) Field ¶
func (e ListBalancesResponseValidationError) Field() string
Field function returns field value.
func (ListBalancesResponseValidationError) Key ¶
func (e ListBalancesResponseValidationError) Key() bool
Key function returns key value.
func (ListBalancesResponseValidationError) Reason ¶
func (e ListBalancesResponseValidationError) Reason() string
Reason function returns reason value.
type UnimplementedBalanceServiceServer ¶
type UnimplementedBalanceServiceServer struct { }
UnimplementedBalanceServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedBalanceServiceServer) ListBalances ¶
func (UnimplementedBalanceServiceServer) ListBalances(context.Context, *ListBalancesRequest) (*ListBalancesResponse, error)
type UnsafeBalanceServiceServer ¶
type UnsafeBalanceServiceServer interface {
// contains filtered or unexported methods
}
UnsafeBalanceServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to BalanceServiceServer will result in compilation errors.