Documentation
¶
Index ¶
- Variables
- func NewBalanceEndpoints() []*api.Endpoint
- func RegisterBalanceHandler(s server.Server, hdlr BalanceHandler, opts ...server.HandlerOption) error
- type Adjustment
- func (*Adjustment) Descriptor() ([]byte, []int)deprecated
- func (x *Adjustment) GetCreated() int64
- func (x *Adjustment) GetDelta() int64
- func (x *Adjustment) GetId() string
- func (x *Adjustment) GetMeta() map[string]string
- func (x *Adjustment) GetReference() string
- func (*Adjustment) ProtoMessage()
- func (x *Adjustment) ProtoReflect() protoreflect.Message
- func (x *Adjustment) Reset()
- func (x *Adjustment) String() string
- type BalanceHandler
- type BalanceService
- type CurrentRequest
- type CurrentResponse
- type DecrementRequest
- func (*DecrementRequest) Descriptor() ([]byte, []int)deprecated
- func (x *DecrementRequest) GetCustomerId() string
- func (x *DecrementRequest) GetDelta() int64
- func (x *DecrementRequest) GetIdempotencyKey() string
- func (x *DecrementRequest) GetReference() string
- func (x *DecrementRequest) GetVisible() bool
- func (*DecrementRequest) ProtoMessage()
- func (x *DecrementRequest) ProtoReflect() protoreflect.Message
- func (x *DecrementRequest) Reset()
- func (x *DecrementRequest) String() string
- type DecrementResponse
- type DeleteCustomerRequest
- func (*DeleteCustomerRequest) Descriptor() ([]byte, []int)deprecated
- func (x *DeleteCustomerRequest) GetUserId() string
- func (*DeleteCustomerRequest) ProtoMessage()
- func (x *DeleteCustomerRequest) ProtoReflect() protoreflect.Message
- func (x *DeleteCustomerRequest) Reset()
- func (x *DeleteCustomerRequest) String() string
- type DeleteCustomerResponse
- type IncrementRequest
- func (*IncrementRequest) Descriptor() ([]byte, []int)deprecated
- func (x *IncrementRequest) GetCustomerId() string
- func (x *IncrementRequest) GetDelta() int64
- func (x *IncrementRequest) GetIdempotencyKey() string
- func (x *IncrementRequest) GetReference() string
- func (x *IncrementRequest) GetVisible() bool
- func (*IncrementRequest) ProtoMessage()
- func (x *IncrementRequest) ProtoReflect() protoreflect.Message
- func (x *IncrementRequest) Reset()
- func (x *IncrementRequest) String() string
- type IncrementResponse
- type ListAdjustmentsRequest
- func (*ListAdjustmentsRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ListAdjustmentsRequest) GetCustomerId() string
- func (*ListAdjustmentsRequest) ProtoMessage()
- func (x *ListAdjustmentsRequest) ProtoReflect() protoreflect.Message
- func (x *ListAdjustmentsRequest) Reset()
- func (x *ListAdjustmentsRequest) String() string
- type ListAdjustmentsResponse
- func (*ListAdjustmentsResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ListAdjustmentsResponse) GetAdjustments() []*Adjustment
- func (*ListAdjustmentsResponse) ProtoMessage()
- func (x *ListAdjustmentsResponse) ProtoReflect() protoreflect.Message
- func (x *ListAdjustmentsResponse) Reset()
- func (x *ListAdjustmentsResponse) String() string
- type TransferRequest
- func (*TransferRequest) Descriptor() ([]byte, []int)deprecated
- func (x *TransferRequest) GetAmount() int64
- func (x *TransferRequest) GetFromId() string
- func (x *TransferRequest) GetReference() string
- func (x *TransferRequest) GetToId() string
- func (x *TransferRequest) GetVisible() bool
- func (*TransferRequest) ProtoMessage()
- func (x *TransferRequest) ProtoReflect() protoreflect.Message
- func (x *TransferRequest) Reset()
- func (x *TransferRequest) String() string
- type TransferResponse
Constants ¶
This section is empty.
Variables ¶
var File_proto_balance_proto protoreflect.FileDescriptor
Functions ¶
func NewBalanceEndpoints ¶
func RegisterBalanceHandler ¶
func RegisterBalanceHandler(s server.Server, hdlr BalanceHandler, opts ...server.HandlerOption) error
Types ¶
type Adjustment ¶
type Adjustment struct {
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
Created int64 `protobuf:"varint,2,opt,name=created,proto3" json:"created,omitempty"`
Delta int64 `protobuf:"varint,3,opt,name=delta,proto3" json:"delta,omitempty"`
Reference string `protobuf:"bytes,4,opt,name=reference,proto3" json:"reference,omitempty"`
Meta map[string]string `` /* 149-byte string literal not displayed */
// contains filtered or unexported fields
}
func (*Adjustment) Descriptor
deprecated
func (*Adjustment) Descriptor() ([]byte, []int)
Deprecated: Use Adjustment.ProtoReflect.Descriptor instead.
func (*Adjustment) GetCreated ¶
func (x *Adjustment) GetCreated() int64
func (*Adjustment) GetDelta ¶
func (x *Adjustment) GetDelta() int64
func (*Adjustment) GetId ¶
func (x *Adjustment) GetId() string
func (*Adjustment) GetMeta ¶
func (x *Adjustment) GetMeta() map[string]string
func (*Adjustment) GetReference ¶
func (x *Adjustment) GetReference() string
func (*Adjustment) ProtoMessage ¶
func (*Adjustment) ProtoMessage()
func (*Adjustment) ProtoReflect ¶
func (x *Adjustment) ProtoReflect() protoreflect.Message
func (*Adjustment) Reset ¶
func (x *Adjustment) Reset()
func (*Adjustment) String ¶
func (x *Adjustment) String() string
type BalanceHandler ¶
type BalanceHandler interface {
Increment(context.Context, *IncrementRequest, *IncrementResponse) error
Decrement(context.Context, *DecrementRequest, *DecrementResponse) error
Current(context.Context, *CurrentRequest, *CurrentResponse) error
ListAdjustments(context.Context, *ListAdjustmentsRequest, *ListAdjustmentsResponse) error
DeleteCustomer(context.Context, *DeleteCustomerRequest, *DeleteCustomerResponse) error
Transfer(context.Context, *TransferRequest, *TransferResponse) error
}
type BalanceService ¶
type BalanceService interface {
Increment(ctx context.Context, in *IncrementRequest, opts ...client.CallOption) (*IncrementResponse, error)
Decrement(ctx context.Context, in *DecrementRequest, opts ...client.CallOption) (*DecrementResponse, error)
Current(ctx context.Context, in *CurrentRequest, opts ...client.CallOption) (*CurrentResponse, error)
ListAdjustments(ctx context.Context, in *ListAdjustmentsRequest, opts ...client.CallOption) (*ListAdjustmentsResponse, error)
DeleteCustomer(ctx context.Context, in *DeleteCustomerRequest, opts ...client.CallOption) (*DeleteCustomerResponse, error)
Transfer(ctx context.Context, in *TransferRequest, opts ...client.CallOption) (*TransferResponse, error)
}
func NewBalanceService ¶
func NewBalanceService(name string, c client.Client) BalanceService
type CurrentRequest ¶
type CurrentRequest struct {
CustomerId string `protobuf:"bytes,1,opt,name=customer_id,json=customerId,proto3" json:"customer_id,omitempty"`
// contains filtered or unexported fields
}
func (*CurrentRequest) Descriptor
deprecated
func (*CurrentRequest) Descriptor() ([]byte, []int)
Deprecated: Use CurrentRequest.ProtoReflect.Descriptor instead.
func (*CurrentRequest) GetCustomerId ¶
func (x *CurrentRequest) GetCustomerId() string
func (*CurrentRequest) ProtoMessage ¶
func (*CurrentRequest) ProtoMessage()
func (*CurrentRequest) ProtoReflect ¶
func (x *CurrentRequest) ProtoReflect() protoreflect.Message
func (*CurrentRequest) Reset ¶
func (x *CurrentRequest) Reset()
func (*CurrentRequest) String ¶
func (x *CurrentRequest) String() string
type CurrentResponse ¶
type CurrentResponse struct {
CurrentBalance int64 `protobuf:"varint,1,opt,name=current_balance,json=currentBalance,proto3" json:"current_balance,omitempty"`
// contains filtered or unexported fields
}
func (*CurrentResponse) Descriptor
deprecated
func (*CurrentResponse) Descriptor() ([]byte, []int)
Deprecated: Use CurrentResponse.ProtoReflect.Descriptor instead.
func (*CurrentResponse) GetCurrentBalance ¶
func (x *CurrentResponse) GetCurrentBalance() int64
func (*CurrentResponse) ProtoMessage ¶
func (*CurrentResponse) ProtoMessage()
func (*CurrentResponse) ProtoReflect ¶
func (x *CurrentResponse) ProtoReflect() protoreflect.Message
func (*CurrentResponse) Reset ¶
func (x *CurrentResponse) Reset()
func (*CurrentResponse) String ¶
func (x *CurrentResponse) String() string
type DecrementRequest ¶
type DecrementRequest struct {
CustomerId string `protobuf:"bytes,1,opt,name=customer_id,json=customerId,proto3" json:"customer_id,omitempty"`
Delta int64 `protobuf:"varint,2,opt,name=delta,proto3" json:"delta,omitempty"`
IdempotencyKey string `protobuf:"bytes,3,opt,name=idempotency_key,json=idempotencyKey,proto3" json:"idempotency_key,omitempty"`
Visible bool `protobuf:"varint,4,opt,name=visible,proto3" json:"visible,omitempty"`
Reference string `protobuf:"bytes,5,opt,name=reference,proto3" json:"reference,omitempty"`
// contains filtered or unexported fields
}
func (*DecrementRequest) Descriptor
deprecated
func (*DecrementRequest) Descriptor() ([]byte, []int)
Deprecated: Use DecrementRequest.ProtoReflect.Descriptor instead.
func (*DecrementRequest) GetCustomerId ¶
func (x *DecrementRequest) GetCustomerId() string
func (*DecrementRequest) GetDelta ¶
func (x *DecrementRequest) GetDelta() int64
func (*DecrementRequest) GetIdempotencyKey ¶
func (x *DecrementRequest) GetIdempotencyKey() string
func (*DecrementRequest) GetReference ¶
func (x *DecrementRequest) GetReference() string
func (*DecrementRequest) GetVisible ¶
func (x *DecrementRequest) GetVisible() bool
func (*DecrementRequest) ProtoMessage ¶
func (*DecrementRequest) ProtoMessage()
func (*DecrementRequest) ProtoReflect ¶
func (x *DecrementRequest) ProtoReflect() protoreflect.Message
func (*DecrementRequest) Reset ¶
func (x *DecrementRequest) Reset()
func (*DecrementRequest) String ¶
func (x *DecrementRequest) String() string
type DecrementResponse ¶
type DecrementResponse struct {
NewBalance int64 `protobuf:"varint,1,opt,name=new_balance,json=newBalance,proto3" json:"new_balance,omitempty"`
// contains filtered or unexported fields
}
func (*DecrementResponse) Descriptor
deprecated
func (*DecrementResponse) Descriptor() ([]byte, []int)
Deprecated: Use DecrementResponse.ProtoReflect.Descriptor instead.
func (*DecrementResponse) GetNewBalance ¶
func (x *DecrementResponse) GetNewBalance() int64
func (*DecrementResponse) ProtoMessage ¶
func (*DecrementResponse) ProtoMessage()
func (*DecrementResponse) ProtoReflect ¶
func (x *DecrementResponse) ProtoReflect() protoreflect.Message
func (*DecrementResponse) Reset ¶
func (x *DecrementResponse) Reset()
func (*DecrementResponse) String ¶
func (x *DecrementResponse) String() string
type DeleteCustomerRequest ¶
type DeleteCustomerRequest struct {
UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
// contains filtered or unexported fields
}
func (*DeleteCustomerRequest) Descriptor
deprecated
func (*DeleteCustomerRequest) Descriptor() ([]byte, []int)
Deprecated: Use DeleteCustomerRequest.ProtoReflect.Descriptor instead.
func (*DeleteCustomerRequest) GetUserId ¶
func (x *DeleteCustomerRequest) GetUserId() string
func (*DeleteCustomerRequest) ProtoMessage ¶
func (*DeleteCustomerRequest) ProtoMessage()
func (*DeleteCustomerRequest) ProtoReflect ¶
func (x *DeleteCustomerRequest) ProtoReflect() protoreflect.Message
func (*DeleteCustomerRequest) Reset ¶
func (x *DeleteCustomerRequest) Reset()
func (*DeleteCustomerRequest) String ¶
func (x *DeleteCustomerRequest) String() string
type DeleteCustomerResponse ¶
type DeleteCustomerResponse struct {
// contains filtered or unexported fields
}
func (*DeleteCustomerResponse) Descriptor
deprecated
func (*DeleteCustomerResponse) Descriptor() ([]byte, []int)
Deprecated: Use DeleteCustomerResponse.ProtoReflect.Descriptor instead.
func (*DeleteCustomerResponse) ProtoMessage ¶
func (*DeleteCustomerResponse) ProtoMessage()
func (*DeleteCustomerResponse) ProtoReflect ¶
func (x *DeleteCustomerResponse) ProtoReflect() protoreflect.Message
func (*DeleteCustomerResponse) Reset ¶
func (x *DeleteCustomerResponse) Reset()
func (*DeleteCustomerResponse) String ¶
func (x *DeleteCustomerResponse) String() string
type IncrementRequest ¶
type IncrementRequest struct {
CustomerId string `protobuf:"bytes,1,opt,name=customer_id,json=customerId,proto3" json:"customer_id,omitempty"`
Delta int64 `protobuf:"varint,2,opt,name=delta,proto3" json:"delta,omitempty"`
IdempotencyKey string `protobuf:"bytes,3,opt,name=idempotency_key,json=idempotencyKey,proto3" json:"idempotency_key,omitempty"`
Visible bool `protobuf:"varint,4,opt,name=visible,proto3" json:"visible,omitempty"`
Reference string `protobuf:"bytes,5,opt,name=reference,proto3" json:"reference,omitempty"`
// contains filtered or unexported fields
}
func (*IncrementRequest) Descriptor
deprecated
func (*IncrementRequest) Descriptor() ([]byte, []int)
Deprecated: Use IncrementRequest.ProtoReflect.Descriptor instead.
func (*IncrementRequest) GetCustomerId ¶
func (x *IncrementRequest) GetCustomerId() string
func (*IncrementRequest) GetDelta ¶
func (x *IncrementRequest) GetDelta() int64
func (*IncrementRequest) GetIdempotencyKey ¶
func (x *IncrementRequest) GetIdempotencyKey() string
func (*IncrementRequest) GetReference ¶
func (x *IncrementRequest) GetReference() string
func (*IncrementRequest) GetVisible ¶
func (x *IncrementRequest) GetVisible() bool
func (*IncrementRequest) ProtoMessage ¶
func (*IncrementRequest) ProtoMessage()
func (*IncrementRequest) ProtoReflect ¶
func (x *IncrementRequest) ProtoReflect() protoreflect.Message
func (*IncrementRequest) Reset ¶
func (x *IncrementRequest) Reset()
func (*IncrementRequest) String ¶
func (x *IncrementRequest) String() string
type IncrementResponse ¶
type IncrementResponse struct {
NewBalance int64 `protobuf:"varint,1,opt,name=new_balance,json=newBalance,proto3" json:"new_balance,omitempty"`
// contains filtered or unexported fields
}
func (*IncrementResponse) Descriptor
deprecated
func (*IncrementResponse) Descriptor() ([]byte, []int)
Deprecated: Use IncrementResponse.ProtoReflect.Descriptor instead.
func (*IncrementResponse) GetNewBalance ¶
func (x *IncrementResponse) GetNewBalance() int64
func (*IncrementResponse) ProtoMessage ¶
func (*IncrementResponse) ProtoMessage()
func (*IncrementResponse) ProtoReflect ¶
func (x *IncrementResponse) ProtoReflect() protoreflect.Message
func (*IncrementResponse) Reset ¶
func (x *IncrementResponse) Reset()
func (*IncrementResponse) String ¶
func (x *IncrementResponse) String() string
type ListAdjustmentsRequest ¶
type ListAdjustmentsRequest struct {
CustomerId string `protobuf:"bytes,1,opt,name=customer_id,json=customerId,proto3" json:"customer_id,omitempty"`
// contains filtered or unexported fields
}
func (*ListAdjustmentsRequest) Descriptor
deprecated
func (*ListAdjustmentsRequest) Descriptor() ([]byte, []int)
Deprecated: Use ListAdjustmentsRequest.ProtoReflect.Descriptor instead.
func (*ListAdjustmentsRequest) GetCustomerId ¶
func (x *ListAdjustmentsRequest) GetCustomerId() string
func (*ListAdjustmentsRequest) ProtoMessage ¶
func (*ListAdjustmentsRequest) ProtoMessage()
func (*ListAdjustmentsRequest) ProtoReflect ¶
func (x *ListAdjustmentsRequest) ProtoReflect() protoreflect.Message
func (*ListAdjustmentsRequest) Reset ¶
func (x *ListAdjustmentsRequest) Reset()
func (*ListAdjustmentsRequest) String ¶
func (x *ListAdjustmentsRequest) String() string
type ListAdjustmentsResponse ¶
type ListAdjustmentsResponse struct {
Adjustments []*Adjustment `protobuf:"bytes,1,rep,name=adjustments,proto3" json:"adjustments,omitempty"`
// contains filtered or unexported fields
}
func (*ListAdjustmentsResponse) Descriptor
deprecated
func (*ListAdjustmentsResponse) Descriptor() ([]byte, []int)
Deprecated: Use ListAdjustmentsResponse.ProtoReflect.Descriptor instead.
func (*ListAdjustmentsResponse) GetAdjustments ¶
func (x *ListAdjustmentsResponse) GetAdjustments() []*Adjustment
func (*ListAdjustmentsResponse) ProtoMessage ¶
func (*ListAdjustmentsResponse) ProtoMessage()
func (*ListAdjustmentsResponse) ProtoReflect ¶
func (x *ListAdjustmentsResponse) ProtoReflect() protoreflect.Message
func (*ListAdjustmentsResponse) Reset ¶
func (x *ListAdjustmentsResponse) Reset()
func (*ListAdjustmentsResponse) String ¶
func (x *ListAdjustmentsResponse) String() string
type TransferRequest ¶
type TransferRequest struct {
// from email
FromId string `protobuf:"bytes,1,opt,name=from_id,json=fromId,proto3" json:"from_id,omitempty"`
// to email
ToId string `protobuf:"bytes,2,opt,name=to_id,json=toId,proto3" json:"to_id,omitempty"`
// amount to transfer
Amount int64 `protobuf:"varint,3,opt,name=amount,proto3" json:"amount,omitempty"`
// reference
Reference string `protobuf:"bytes,4,opt,name=reference,proto3" json:"reference,omitempty"`
// visible?
Visible bool `protobuf:"varint,5,opt,name=visible,proto3" json:"visible,omitempty"`
// contains filtered or unexported fields
}
func (*TransferRequest) Descriptor
deprecated
func (*TransferRequest) Descriptor() ([]byte, []int)
Deprecated: Use TransferRequest.ProtoReflect.Descriptor instead.
func (*TransferRequest) GetAmount ¶
func (x *TransferRequest) GetAmount() int64
func (*TransferRequest) GetFromId ¶
func (x *TransferRequest) GetFromId() string
func (*TransferRequest) GetReference ¶
func (x *TransferRequest) GetReference() string
func (*TransferRequest) GetToId ¶
func (x *TransferRequest) GetToId() string
func (*TransferRequest) GetVisible ¶
func (x *TransferRequest) GetVisible() bool
func (*TransferRequest) ProtoMessage ¶
func (*TransferRequest) ProtoMessage()
func (*TransferRequest) ProtoReflect ¶
func (x *TransferRequest) ProtoReflect() protoreflect.Message
func (*TransferRequest) Reset ¶
func (x *TransferRequest) Reset()
func (*TransferRequest) String ¶
func (x *TransferRequest) String() string
type TransferResponse ¶
type TransferResponse struct {
// contains filtered or unexported fields
}
func (*TransferResponse) Descriptor
deprecated
func (*TransferResponse) Descriptor() ([]byte, []int)
Deprecated: Use TransferResponse.ProtoReflect.Descriptor instead.
func (*TransferResponse) ProtoMessage ¶
func (*TransferResponse) ProtoMessage()
func (*TransferResponse) ProtoReflect ¶
func (x *TransferResponse) ProtoReflect() protoreflect.Message
func (*TransferResponse) Reset ¶
func (x *TransferResponse) Reset()
func (*TransferResponse) String ¶
func (x *TransferResponse) String() string