wallet

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_proto_wallet_proto protoreflect.FileDescriptor

Functions

func NewWalletEndpoints

func NewWalletEndpoints() []*api.Endpoint

func RegisterWalletHandler

func RegisterWalletHandler(s server.Server, hdlr WalletHandler, opts ...server.HandlerOption) error

Types

type Account

type Account struct {

	// wallet id
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// name of the wallet
	Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	// description of the wallet
	Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
	// current balance
	Balance int64 `protobuf:"varint,4,opt,name=balance,proto3" json:"balance,omitempty"`
	// contains filtered or unexported fields
}

func (*Account) Descriptor deprecated

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

Deprecated: Use Account.ProtoReflect.Descriptor instead.

func (*Account) GetBalance

func (x *Account) GetBalance() int64

func (*Account) GetDescription

func (x *Account) GetDescription() string

func (*Account) GetId

func (x *Account) GetId() string

func (*Account) GetName

func (x *Account) GetName() string

func (*Account) ProtoMessage

func (*Account) ProtoMessage()

func (*Account) ProtoReflect

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

func (*Account) Reset

func (x *Account) Reset()

func (*Account) String

func (x *Account) String() string

type BalanceRequest

type BalanceRequest struct {

	// wallet id
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

Get the balance of a wallet

func (*BalanceRequest) Descriptor deprecated

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

Deprecated: Use BalanceRequest.ProtoReflect.Descriptor instead.

func (*BalanceRequest) GetId

func (x *BalanceRequest) GetId() string

func (*BalanceRequest) ProtoMessage

func (*BalanceRequest) ProtoMessage()

func (*BalanceRequest) ProtoReflect

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

func (*BalanceRequest) Reset

func (x *BalanceRequest) Reset()

func (*BalanceRequest) String

func (x *BalanceRequest) String() string

type BalanceResponse

type BalanceResponse struct {

	// current balance
	Balance int64 `protobuf:"varint,1,opt,name=balance,proto3" json:"balance,omitempty"`
	// contains filtered or unexported fields
}

func (*BalanceResponse) Descriptor deprecated

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

Deprecated: Use BalanceResponse.ProtoReflect.Descriptor instead.

func (*BalanceResponse) GetBalance

func (x *BalanceResponse) GetBalance() int64

func (*BalanceResponse) ProtoMessage

func (*BalanceResponse) ProtoMessage()

func (*BalanceResponse) ProtoReflect

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

func (*BalanceResponse) Reset

func (x *BalanceResponse) Reset()

func (*BalanceResponse) String

func (x *BalanceResponse) String() string

type CreateRequest

type CreateRequest struct {

	// optional id
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// name of the wallet
	Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	// description for wallet
	Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
	// contains filtered or unexported fields
}

Create a new wallet

func (*CreateRequest) Descriptor deprecated

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

Deprecated: Use CreateRequest.ProtoReflect.Descriptor instead.

func (*CreateRequest) GetDescription

func (x *CreateRequest) GetDescription() string

func (*CreateRequest) GetId

func (x *CreateRequest) GetId() string

func (*CreateRequest) GetName

func (x *CreateRequest) GetName() string

func (*CreateRequest) ProtoMessage

func (*CreateRequest) ProtoMessage()

func (*CreateRequest) ProtoReflect

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

func (*CreateRequest) Reset

func (x *CreateRequest) Reset()

func (*CreateRequest) String

func (x *CreateRequest) String() string

type CreateResponse

type CreateResponse struct {

	// the wallet created
	Account *Account `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateResponse) Descriptor deprecated

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

Deprecated: Use CreateResponse.ProtoReflect.Descriptor instead.

func (*CreateResponse) GetAccount

func (x *CreateResponse) GetAccount() *Account

func (*CreateResponse) ProtoMessage

func (*CreateResponse) ProtoMessage()

func (*CreateResponse) ProtoReflect

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

func (*CreateResponse) Reset

func (x *CreateResponse) Reset()

func (*CreateResponse) String

func (x *CreateResponse) String() string

type CreditRequest

type CreditRequest struct {

	// wallet id
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// amount to credit
	Amount int64 `protobuf:"varint,2,opt,name=amount,proto3" json:"amount,omitempty"`
	// idempotency key
	IdempotencyKey string `protobuf:"bytes,3,opt,name=idempotency_key,json=idempotencyKey,proto3" json:"idempotency_key,omitempty"`
	// if the transaction is visible
	Visible bool `protobuf:"varint,4,opt,name=visible,proto3" json:"visible,omitempty"`
	// reference note
	Reference string `protobuf:"bytes,5,opt,name=reference,proto3" json:"reference,omitempty"`
	// contains filtered or unexported fields
}

Add credit to a wallet

func (*CreditRequest) Descriptor deprecated

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

Deprecated: Use CreditRequest.ProtoReflect.Descriptor instead.

func (*CreditRequest) GetAmount

func (x *CreditRequest) GetAmount() int64

func (*CreditRequest) GetId

func (x *CreditRequest) GetId() string

func (*CreditRequest) GetIdempotencyKey

func (x *CreditRequest) GetIdempotencyKey() string

func (*CreditRequest) GetReference

func (x *CreditRequest) GetReference() string

func (*CreditRequest) GetVisible

func (x *CreditRequest) GetVisible() bool

func (*CreditRequest) ProtoMessage

func (*CreditRequest) ProtoMessage()

func (*CreditRequest) ProtoReflect

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

func (*CreditRequest) Reset

func (x *CreditRequest) Reset()

func (*CreditRequest) String

func (x *CreditRequest) String() string

type CreditResponse

type CreditResponse struct {

	// the new balance
	Balance int64 `protobuf:"varint,1,opt,name=balance,proto3" json:"balance,omitempty"`
	// contains filtered or unexported fields
}

func (*CreditResponse) Descriptor deprecated

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

Deprecated: Use CreditResponse.ProtoReflect.Descriptor instead.

func (*CreditResponse) GetBalance

func (x *CreditResponse) GetBalance() int64

func (*CreditResponse) ProtoMessage

func (*CreditResponse) ProtoMessage()

func (*CreditResponse) ProtoReflect

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

func (*CreditResponse) Reset

func (x *CreditResponse) Reset()

func (*CreditResponse) String

func (x *CreditResponse) String() string

type DebitRequest

type DebitRequest struct {

	// wallet
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// amount to debit
	Amount int64 `protobuf:"varint,2,opt,name=amount,proto3" json:"amount,omitempty"`
	// idempotency key
	IdempotencyKey string `protobuf:"bytes,3,opt,name=idempotency_key,json=idempotencyKey,proto3" json:"idempotency_key,omitempty"`
	// if the transaction is visible
	Visible bool `protobuf:"varint,4,opt,name=visible,proto3" json:"visible,omitempty"`
	// reference note
	Reference string `protobuf:"bytes,5,opt,name=reference,proto3" json:"reference,omitempty"`
	// contains filtered or unexported fields
}

Debit a wallet

func (*DebitRequest) Descriptor deprecated

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

Deprecated: Use DebitRequest.ProtoReflect.Descriptor instead.

func (*DebitRequest) GetAmount

func (x *DebitRequest) GetAmount() int64

func (*DebitRequest) GetId

func (x *DebitRequest) GetId() string

func (*DebitRequest) GetIdempotencyKey

func (x *DebitRequest) GetIdempotencyKey() string

func (*DebitRequest) GetReference

func (x *DebitRequest) GetReference() string

func (*DebitRequest) GetVisible

func (x *DebitRequest) GetVisible() bool

func (*DebitRequest) ProtoMessage

func (*DebitRequest) ProtoMessage()

func (*DebitRequest) ProtoReflect

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

func (*DebitRequest) Reset

func (x *DebitRequest) Reset()

func (*DebitRequest) String

func (x *DebitRequest) String() string

type DebitResponse

type DebitResponse struct {

	// the new balance
	Balance int64 `protobuf:"varint,1,opt,name=balance,proto3" json:"balance,omitempty"`
	// contains filtered or unexported fields
}

func (*DebitResponse) Descriptor deprecated

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

Deprecated: Use DebitResponse.ProtoReflect.Descriptor instead.

func (*DebitResponse) GetBalance

func (x *DebitResponse) GetBalance() int64

func (*DebitResponse) ProtoMessage

func (*DebitResponse) ProtoMessage()

func (*DebitResponse) ProtoReflect

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

func (*DebitResponse) Reset

func (x *DebitResponse) Reset()

func (*DebitResponse) String

func (x *DebitResponse) String() string

type DeleteRequest

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

Delete a wallet

func (*DeleteRequest) Descriptor deprecated

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

Deprecated: Use DeleteRequest.ProtoReflect.Descriptor instead.

func (*DeleteRequest) GetId

func (x *DeleteRequest) GetId() string

func (*DeleteRequest) ProtoMessage

func (*DeleteRequest) ProtoMessage()

func (*DeleteRequest) ProtoReflect

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

func (*DeleteRequest) Reset

func (x *DeleteRequest) Reset()

func (*DeleteRequest) String

func (x *DeleteRequest) String() string

type DeleteResponse

type DeleteResponse struct {
	// contains filtered or unexported fields
}

func (*DeleteResponse) Descriptor deprecated

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

Deprecated: Use DeleteResponse.ProtoReflect.Descriptor instead.

func (*DeleteResponse) ProtoMessage

func (*DeleteResponse) ProtoMessage()

func (*DeleteResponse) ProtoReflect

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

func (*DeleteResponse) Reset

func (x *DeleteResponse) Reset()

func (*DeleteResponse) String

func (x *DeleteResponse) String() string

type ListRequest

type ListRequest struct {
	// contains filtered or unexported fields
}

List your wallets

func (*ListRequest) Descriptor deprecated

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

Deprecated: Use ListRequest.ProtoReflect.Descriptor instead.

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 {
	Accounts []*Account `protobuf:"bytes,1,rep,name=accounts,proto3" json:"accounts,omitempty"`
	// contains filtered or unexported fields
}

func (*ListResponse) Descriptor deprecated

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

Deprecated: Use ListResponse.ProtoReflect.Descriptor instead.

func (*ListResponse) GetAccounts

func (x *ListResponse) GetAccounts() []*Account

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 ReadRequest

type ReadRequest struct {

	// wallet id
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

Get wallet by id

func (*ReadRequest) Descriptor deprecated

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

Deprecated: Use ReadRequest.ProtoReflect.Descriptor instead.

func (*ReadRequest) GetId

func (x *ReadRequest) GetId() string

func (*ReadRequest) ProtoMessage

func (*ReadRequest) ProtoMessage()

func (*ReadRequest) ProtoReflect

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

func (*ReadRequest) Reset

func (x *ReadRequest) Reset()

func (*ReadRequest) String

func (x *ReadRequest) String() string

type ReadResponse

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

func (*ReadResponse) Descriptor deprecated

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

Deprecated: Use ReadResponse.ProtoReflect.Descriptor instead.

func (*ReadResponse) GetAccount

func (x *ReadResponse) GetAccount() *Account

func (*ReadResponse) ProtoMessage

func (*ReadResponse) ProtoMessage()

func (*ReadResponse) ProtoReflect

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

func (*ReadResponse) Reset

func (x *ReadResponse) Reset()

func (*ReadResponse) String

func (x *ReadResponse) String() string

type Transaction

type Transaction struct {

	// unique id of transaction
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// time of transaction
	Created string `protobuf:"bytes,2,opt,name=created,proto3" json:"created,omitempty"`
	// amount in transaction
	Amount int64 `protobuf:"varint,3,opt,name=amount,proto3" json:"amount,omitempty"`
	// reference note
	Reference string `protobuf:"bytes,4,opt,name=reference,proto3" json:"reference,omitempty"`
	// associated metadata
	Metadata map[string]string `` /* 157-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) GetAmount

func (x *Transaction) GetAmount() int64

func (*Transaction) GetCreated

func (x *Transaction) GetCreated() string

func (*Transaction) GetId

func (x *Transaction) GetId() string

func (*Transaction) GetMetadata

func (x *Transaction) GetMetadata() map[string]string

func (*Transaction) GetReference

func (x *Transaction) GetReference() 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 TransactionsRequest

type TransactionsRequest struct {

	// wallet id
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

List the transactions for a wallet

func (*TransactionsRequest) Descriptor deprecated

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

Deprecated: Use TransactionsRequest.ProtoReflect.Descriptor instead.

func (*TransactionsRequest) GetId

func (x *TransactionsRequest) GetId() string

func (*TransactionsRequest) ProtoMessage

func (*TransactionsRequest) ProtoMessage()

func (*TransactionsRequest) ProtoReflect

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

func (*TransactionsRequest) Reset

func (x *TransactionsRequest) Reset()

func (*TransactionsRequest) String

func (x *TransactionsRequest) String() string

type TransactionsResponse

type TransactionsResponse struct {

	// list of transactions
	Transactions []*Transaction `protobuf:"bytes,1,rep,name=transactions,proto3" json:"transactions,omitempty"`
	// contains filtered or unexported fields
}

func (*TransactionsResponse) Descriptor deprecated

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

Deprecated: Use TransactionsResponse.ProtoReflect.Descriptor instead.

func (*TransactionsResponse) GetTransactions

func (x *TransactionsResponse) GetTransactions() []*Transaction

func (*TransactionsResponse) ProtoMessage

func (*TransactionsResponse) ProtoMessage()

func (*TransactionsResponse) ProtoReflect

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

func (*TransactionsResponse) Reset

func (x *TransactionsResponse) Reset()

func (*TransactionsResponse) String

func (x *TransactionsResponse) String() string

type TransferRequest

type TransferRequest struct {

	// from wallet id
	FromId string `protobuf:"bytes,1,opt,name=from_id,json=fromId,proto3" json:"from_id,omitempty"`
	// to wallet id
	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
}

Make a transfer from one wallet to another

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

type WalletService

func NewWalletService

func NewWalletService(name string, c client.Client) WalletService

Jump to

Keyboard shortcuts

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