transaction

package
v0.0.0-...-ac17c7f Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2021 License: GPL-3.0 Imports: 17 Imported by: 0

Documentation

Overview

Package transaction is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
var (
	AccountType_name = map[int32]string{
		0: "ACCOUNT_TYPE_UNSPECIFIED",
		1: "SAVINGS_ACCOUNT",
	}
	AccountType_value = map[string]int32{
		"ACCOUNT_TYPE_UNSPECIFIED": 0,
		"SAVINGS_ACCOUNT":          1,
	}
)

Enum value maps for AccountType.

View Source
var (
	TransactionType_name = map[int32]string{
		0: "TRANSACTION_TYPE_UNSPECIFIED",
		1: "WITHDRAWAL",
		2: "DEPOSIT",
	}
	TransactionType_value = map[string]int32{
		"TRANSACTION_TYPE_UNSPECIFIED": 0,
		"WITHDRAWAL":                   1,
		"DEPOSIT":                      2,
	}
)

Enum value maps for TransactionType.

View Source
var File_transaction_proto protoreflect.FileDescriptor

Functions

func RegisterChamaAccountAPIHandler

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

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

func RegisterChamaAccountAPIHandlerClient

func RegisterChamaAccountAPIHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ChamaAccountAPIClient) error

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

func RegisterChamaAccountAPIHandlerFromEndpoint

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

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

func RegisterChamaAccountAPIHandlerServer

func RegisterChamaAccountAPIHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ChamaAccountAPIServer) error

RegisterChamaAccountAPIHandlerServer registers the http handlers for service ChamaAccountAPI to "mux". UnaryRPC :call ChamaAccountAPIServer 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 RegisterChamaAccountAPIHandlerFromEndpoint instead.

func RegisterChamaAccountAPIServer

func RegisterChamaAccountAPIServer(s grpc.ServiceRegistrar, srv ChamaAccountAPIServer)

func RegisterTransactionAPIHandler

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

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

func RegisterTransactionAPIHandlerClient

func RegisterTransactionAPIHandlerClient(ctx context.Context, mux *runtime.ServeMux, client TransactionAPIClient) error

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

func RegisterTransactionAPIHandlerFromEndpoint

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

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

func RegisterTransactionAPIHandlerServer

func RegisterTransactionAPIHandlerServer(ctx context.Context, mux *runtime.ServeMux, server TransactionAPIServer) error

RegisterTransactionAPIHandlerServer registers the http handlers for service TransactionAPI to "mux". UnaryRPC :call TransactionAPIServer 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 RegisterTransactionAPIHandlerFromEndpoint instead.

func RegisterTransactionAPIServer

func RegisterTransactionAPIServer(s grpc.ServiceRegistrar, srv TransactionAPIServer)

Types

type AccountType

type AccountType int32
const (
	AccountType_ACCOUNT_TYPE_UNSPECIFIED AccountType = 0
	AccountType_SAVINGS_ACCOUNT          AccountType = 1
)

func (AccountType) Descriptor

func (AccountType) Enum

func (x AccountType) Enum() *AccountType

func (AccountType) EnumDescriptor deprecated

func (AccountType) EnumDescriptor() ([]byte, []int)

Deprecated: Use AccountType.Descriptor instead.

func (AccountType) Number

func (x AccountType) Number() protoreflect.EnumNumber

func (AccountType) String

func (x AccountType) String() string

func (AccountType) Type

type ChamaAccount

type ChamaAccount struct {
	AccountId            string      `protobuf:"bytes,1,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"`
	OwnerId              string      `protobuf:"bytes,2,opt,name=owner_id,json=ownerId,proto3" json:"owner_id,omitempty"`
	AccountName          string      `protobuf:"bytes,3,opt,name=account_name,json=accountName,proto3" json:"account_name,omitempty"`
	AccountType          AccountType `` /* 131-byte string literal not displayed */
	Withdrawable         bool        `protobuf:"varint,5,opt,name=withdrawable,proto3" json:"withdrawable,omitempty"`
	AvailableAmount      float64     `protobuf:"fixed64,6,opt,name=available_amount,json=availableAmount,proto3" json:"available_amount,omitempty"`
	TotalDepositedAmount float64     `protobuf:"fixed64,7,opt,name=total_deposited_amount,json=totalDepositedAmount,proto3" json:"total_deposited_amount,omitempty"`
	TotalWithdrawnAmount float64     `protobuf:"fixed64,8,opt,name=total_withdrawn_amount,json=totalWithdrawnAmount,proto3" json:"total_withdrawn_amount,omitempty"`
	LastDepositedAmount  float64     `protobuf:"fixed64,9,opt,name=last_deposited_amount,json=lastDepositedAmount,proto3" json:"last_deposited_amount,omitempty"`
	LastWithdrawnAmount  float64     `protobuf:"fixed64,10,opt,name=last_withdrawn_amount,json=lastWithdrawnAmount,proto3" json:"last_withdrawn_amount,omitempty"`
	Active               bool        `protobuf:"varint,11,opt,name=active,proto3" json:"active,omitempty"`
	CreatedDate          string      `protobuf:"bytes,12,opt,name=created_date,json=createdDate,proto3" json:"created_date,omitempty"`
	UpdatedDate          string      `protobuf:"bytes,13,opt,name=updated_date,json=updatedDate,proto3" json:"updated_date,omitempty"`
	// contains filtered or unexported fields
}

func (*ChamaAccount) Descriptor deprecated

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

Deprecated: Use ChamaAccount.ProtoReflect.Descriptor instead.

func (*ChamaAccount) GetAccountId

func (x *ChamaAccount) GetAccountId() string

func (*ChamaAccount) GetAccountName

func (x *ChamaAccount) GetAccountName() string

func (*ChamaAccount) GetAccountType

func (x *ChamaAccount) GetAccountType() AccountType

func (*ChamaAccount) GetActive

func (x *ChamaAccount) GetActive() bool

func (*ChamaAccount) GetAvailableAmount

func (x *ChamaAccount) GetAvailableAmount() float64

func (*ChamaAccount) GetCreatedDate

func (x *ChamaAccount) GetCreatedDate() string

func (*ChamaAccount) GetLastDepositedAmount

func (x *ChamaAccount) GetLastDepositedAmount() float64

func (*ChamaAccount) GetLastWithdrawnAmount

func (x *ChamaAccount) GetLastWithdrawnAmount() float64

func (*ChamaAccount) GetOwnerId

func (x *ChamaAccount) GetOwnerId() string

func (*ChamaAccount) GetTotalDepositedAmount

func (x *ChamaAccount) GetTotalDepositedAmount() float64

func (*ChamaAccount) GetTotalWithdrawnAmount

func (x *ChamaAccount) GetTotalWithdrawnAmount() float64

func (*ChamaAccount) GetUpdatedDate

func (x *ChamaAccount) GetUpdatedDate() string

func (*ChamaAccount) GetWithdrawable

func (x *ChamaAccount) GetWithdrawable() bool

func (*ChamaAccount) ProtoMessage

func (*ChamaAccount) ProtoMessage()

func (*ChamaAccount) ProtoReflect

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

func (*ChamaAccount) Reset

func (x *ChamaAccount) Reset()

func (*ChamaAccount) String

func (x *ChamaAccount) String() string

type ChamaAccountAPIClient

type ChamaAccountAPIClient interface {
	CreateChamaAccount(ctx context.Context, in *CreateChamaAccountRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
	ListChamaAccounts(ctx context.Context, in *ListChamaAccountsRequest, opts ...grpc.CallOption) (*ListChamaAccountsResponse, error)
	GetChamaAccount(ctx context.Context, in *GetChamaAccountRequest, opts ...grpc.CallOption) (*ChamaAccount, error)
}

ChamaAccountAPIClient is the client API for ChamaAccountAPI service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

type ChamaAccountAPIServer

type ChamaAccountAPIServer interface {
	CreateChamaAccount(context.Context, *CreateChamaAccountRequest) (*emptypb.Empty, error)
	ListChamaAccounts(context.Context, *ListChamaAccountsRequest) (*ListChamaAccountsResponse, error)
	GetChamaAccount(context.Context, *GetChamaAccountRequest) (*ChamaAccount, error)
	// contains filtered or unexported methods
}

ChamaAccountAPIServer is the server API for ChamaAccountAPI service. All implementations must embed UnimplementedChamaAccountAPIServer for forward compatibility

type ChamaAccountFilter

type ChamaAccountFilter struct {
	AccountIds      []string    `protobuf:"bytes,1,rep,name=account_ids,json=accountIds,proto3" json:"account_ids,omitempty"`
	OwnerIds        []string    `protobuf:"bytes,2,rep,name=owner_ids,json=ownerIds,proto3" json:"owner_ids,omitempty"`
	AccountType     AccountType `` /* 131-byte string literal not displayed */
	Withdrawable    bool        `protobuf:"varint,4,opt,name=withdrawable,proto3" json:"withdrawable,omitempty"`
	NotWithdrawable bool        `protobuf:"varint,5,opt,name=not_withdrawable,json=notWithdrawable,proto3" json:"not_withdrawable,omitempty"`
	// contains filtered or unexported fields
}

func (*ChamaAccountFilter) Descriptor deprecated

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

Deprecated: Use ChamaAccountFilter.ProtoReflect.Descriptor instead.

func (*ChamaAccountFilter) GetAccountIds

func (x *ChamaAccountFilter) GetAccountIds() []string

func (*ChamaAccountFilter) GetAccountType

func (x *ChamaAccountFilter) GetAccountType() AccountType

func (*ChamaAccountFilter) GetNotWithdrawable

func (x *ChamaAccountFilter) GetNotWithdrawable() bool

func (*ChamaAccountFilter) GetOwnerIds

func (x *ChamaAccountFilter) GetOwnerIds() []string

func (*ChamaAccountFilter) GetWithdrawable

func (x *ChamaAccountFilter) GetWithdrawable() bool

func (*ChamaAccountFilter) ProtoMessage

func (*ChamaAccountFilter) ProtoMessage()

func (*ChamaAccountFilter) ProtoReflect

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

func (*ChamaAccountFilter) Reset

func (x *ChamaAccountFilter) Reset()

func (*ChamaAccountFilter) String

func (x *ChamaAccountFilter) String() string

type CreateChamaAccountRequest

type CreateChamaAccountRequest struct {
	ChamaAccount *ChamaAccount `protobuf:"bytes,1,opt,name=chama_account,json=chamaAccount,proto3" json:"chama_account,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateChamaAccountRequest) Descriptor deprecated

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

Deprecated: Use CreateChamaAccountRequest.ProtoReflect.Descriptor instead.

func (*CreateChamaAccountRequest) GetChamaAccount

func (x *CreateChamaAccountRequest) GetChamaAccount() *ChamaAccount

func (*CreateChamaAccountRequest) ProtoMessage

func (*CreateChamaAccountRequest) ProtoMessage()

func (*CreateChamaAccountRequest) ProtoReflect

func (*CreateChamaAccountRequest) Reset

func (x *CreateChamaAccountRequest) Reset()

func (*CreateChamaAccountRequest) String

func (x *CreateChamaAccountRequest) String() string

type DepositRequest

type DepositRequest struct {
	ActorId     string  `protobuf:"bytes,1,opt,name=actor_id,json=actorId,proto3" json:"actor_id,omitempty"`
	AccountId   string  `protobuf:"bytes,2,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"`
	Description string  `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
	Amount      float64 `protobuf:"fixed64,4,opt,name=amount,proto3" json:"amount,omitempty"`
	// contains filtered or unexported fields
}

func (*DepositRequest) Descriptor deprecated

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

Deprecated: Use DepositRequest.ProtoReflect.Descriptor instead.

func (*DepositRequest) GetAccountId

func (x *DepositRequest) GetAccountId() string

func (*DepositRequest) GetActorId

func (x *DepositRequest) GetActorId() string

func (*DepositRequest) GetAmount

func (x *DepositRequest) GetAmount() float64

func (*DepositRequest) GetDescription

func (x *DepositRequest) GetDescription() string

func (*DepositRequest) ProtoMessage

func (*DepositRequest) ProtoMessage()

func (*DepositRequest) ProtoReflect

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

func (*DepositRequest) Reset

func (x *DepositRequest) Reset()

func (*DepositRequest) String

func (x *DepositRequest) String() string

type GetChamaAccountRequest

type GetChamaAccountRequest struct {
	AccountId   string `protobuf:"bytes,1,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"`
	OwnerId     string `protobuf:"bytes,2,opt,name=owner_id,json=ownerId,proto3" json:"owner_id,omitempty"`
	AccountName string `protobuf:"bytes,3,opt,name=account_name,json=accountName,proto3" json:"account_name,omitempty"`
	// contains filtered or unexported fields
}

func (*GetChamaAccountRequest) Descriptor deprecated

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

Deprecated: Use GetChamaAccountRequest.ProtoReflect.Descriptor instead.

func (*GetChamaAccountRequest) GetAccountId

func (x *GetChamaAccountRequest) GetAccountId() string

func (*GetChamaAccountRequest) GetAccountName

func (x *GetChamaAccountRequest) GetAccountName() string

func (*GetChamaAccountRequest) GetOwnerId

func (x *GetChamaAccountRequest) GetOwnerId() string

func (*GetChamaAccountRequest) ProtoMessage

func (*GetChamaAccountRequest) ProtoMessage()

func (*GetChamaAccountRequest) ProtoReflect

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

func (*GetChamaAccountRequest) Reset

func (x *GetChamaAccountRequest) Reset()

func (*GetChamaAccountRequest) String

func (x *GetChamaAccountRequest) String() string

type GetTransactionRequest

type GetTransactionRequest struct {
	TransactionId string `protobuf:"bytes,1,opt,name=transaction_id,json=transactionId,proto3" json:"transaction_id,omitempty"`
	// contains filtered or unexported fields
}

func (*GetTransactionRequest) Descriptor deprecated

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

Deprecated: Use GetTransactionRequest.ProtoReflect.Descriptor instead.

func (*GetTransactionRequest) GetTransactionId

func (x *GetTransactionRequest) GetTransactionId() string

func (*GetTransactionRequest) ProtoMessage

func (*GetTransactionRequest) ProtoMessage()

func (*GetTransactionRequest) ProtoReflect

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

func (*GetTransactionRequest) Reset

func (x *GetTransactionRequest) Reset()

func (*GetTransactionRequest) String

func (x *GetTransactionRequest) String() string

type ListChamaAccountsRequest

type ListChamaAccountsRequest struct {
	Filter    *ChamaAccountFilter `protobuf:"bytes,1,opt,name=filter,proto3" json:"filter,omitempty"`
	PageToken string              `protobuf:"bytes,2,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
	PageSize  int32               `protobuf:"varint,3,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
	// contains filtered or unexported fields
}

func (*ListChamaAccountsRequest) Descriptor deprecated

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

Deprecated: Use ListChamaAccountsRequest.ProtoReflect.Descriptor instead.

func (*ListChamaAccountsRequest) GetFilter

func (*ListChamaAccountsRequest) GetPageSize

func (x *ListChamaAccountsRequest) GetPageSize() int32

func (*ListChamaAccountsRequest) GetPageToken

func (x *ListChamaAccountsRequest) GetPageToken() string

func (*ListChamaAccountsRequest) ProtoMessage

func (*ListChamaAccountsRequest) ProtoMessage()

func (*ListChamaAccountsRequest) ProtoReflect

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

func (*ListChamaAccountsRequest) Reset

func (x *ListChamaAccountsRequest) Reset()

func (*ListChamaAccountsRequest) String

func (x *ListChamaAccountsRequest) String() string

type ListChamaAccountsResponse

type ListChamaAccountsResponse struct {
	ChamaAccounts []*ChamaAccount `protobuf:"bytes,1,rep,name=chama_accounts,json=chamaAccounts,proto3" json:"chama_accounts,omitempty"`
	NextPageToken string          `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
	// contains filtered or unexported fields
}

func (*ListChamaAccountsResponse) Descriptor deprecated

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

Deprecated: Use ListChamaAccountsResponse.ProtoReflect.Descriptor instead.

func (*ListChamaAccountsResponse) GetChamaAccounts

func (x *ListChamaAccountsResponse) GetChamaAccounts() []*ChamaAccount

func (*ListChamaAccountsResponse) GetNextPageToken

func (x *ListChamaAccountsResponse) GetNextPageToken() string

func (*ListChamaAccountsResponse) ProtoMessage

func (*ListChamaAccountsResponse) ProtoMessage()

func (*ListChamaAccountsResponse) ProtoReflect

func (*ListChamaAccountsResponse) Reset

func (x *ListChamaAccountsResponse) Reset()

func (*ListChamaAccountsResponse) String

func (x *ListChamaAccountsResponse) String() string

type ListTransactionsRequest

type ListTransactionsRequest struct {
	Filter    *TransactionFilter `protobuf:"bytes,1,opt,name=filter,proto3" json:"filter,omitempty"`
	PageToken string             `protobuf:"bytes,2,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
	PageSize  int32              `protobuf:"varint,3,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
	// contains filtered or unexported fields
}

func (*ListTransactionsRequest) Descriptor deprecated

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

Deprecated: Use ListTransactionsRequest.ProtoReflect.Descriptor instead.

func (*ListTransactionsRequest) GetFilter

func (*ListTransactionsRequest) GetPageSize

func (x *ListTransactionsRequest) GetPageSize() int32

func (*ListTransactionsRequest) GetPageToken

func (x *ListTransactionsRequest) GetPageToken() string

func (*ListTransactionsRequest) ProtoMessage

func (*ListTransactionsRequest) ProtoMessage()

func (*ListTransactionsRequest) ProtoReflect

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

func (*ListTransactionsRequest) Reset

func (x *ListTransactionsRequest) Reset()

func (*ListTransactionsRequest) String

func (x *ListTransactionsRequest) String() string

type ListTransactionsResponse

type ListTransactionsResponse struct {
	Transactions  []*Transaction `protobuf:"bytes,1,rep,name=transactions,proto3" json:"transactions,omitempty"`
	NextPageToken string         `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
	// contains filtered or unexported fields
}

func (*ListTransactionsResponse) Descriptor deprecated

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

Deprecated: Use ListTransactionsResponse.ProtoReflect.Descriptor instead.

func (*ListTransactionsResponse) GetNextPageToken

func (x *ListTransactionsResponse) GetNextPageToken() string

func (*ListTransactionsResponse) GetTransactions

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

func (*ListTransactionsResponse) ProtoMessage

func (*ListTransactionsResponse) ProtoMessage()

func (*ListTransactionsResponse) ProtoReflect

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

func (*ListTransactionsResponse) Reset

func (x *ListTransactionsResponse) Reset()

func (*ListTransactionsResponse) String

func (x *ListTransactionsResponse) String() string

type Transaction

type Transaction struct {
	TransactionId          string          `protobuf:"bytes,1,opt,name=transaction_id,json=transactionId,proto3" json:"transaction_id,omitempty"`
	ActorId                string          `protobuf:"bytes,2,opt,name=actor_id,json=actorId,proto3" json:"actor_id,omitempty"`
	AccountId              string          `protobuf:"bytes,3,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"`
	Description            string          `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"`
	TransactionType        TransactionType `` /* 147-byte string literal not displayed */
	TransactionAmount      float64         `protobuf:"fixed64,6,opt,name=transaction_amount,json=transactionAmount,proto3" json:"transaction_amount,omitempty"`
	TransactionTimeSeconds int64           `` /* 130-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) GetAccountId

func (x *Transaction) GetAccountId() string

func (*Transaction) GetActorId

func (x *Transaction) GetActorId() string

func (*Transaction) GetDescription

func (x *Transaction) GetDescription() string

func (*Transaction) GetTransactionAmount

func (x *Transaction) GetTransactionAmount() float64

func (*Transaction) GetTransactionId

func (x *Transaction) GetTransactionId() string

func (*Transaction) GetTransactionTimeSeconds

func (x *Transaction) GetTransactionTimeSeconds() int64

func (*Transaction) GetTransactionType

func (x *Transaction) GetTransactionType() TransactionType

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 TransactionAPIClient

type TransactionAPIClient interface {
	Deposit(ctx context.Context, in *DepositRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
	Withdraw(ctx context.Context, in *WithdrawRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
	ListTransactions(ctx context.Context, in *ListTransactionsRequest, opts ...grpc.CallOption) (*ListTransactionsResponse, error)
	GetTransaction(ctx context.Context, in *GetTransactionRequest, opts ...grpc.CallOption) (*Transaction, error)
}

TransactionAPIClient is the client API for TransactionAPI service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

type TransactionAPIServer

type TransactionAPIServer interface {
	Deposit(context.Context, *DepositRequest) (*emptypb.Empty, error)
	Withdraw(context.Context, *WithdrawRequest) (*emptypb.Empty, error)
	ListTransactions(context.Context, *ListTransactionsRequest) (*ListTransactionsResponse, error)
	GetTransaction(context.Context, *GetTransactionRequest) (*Transaction, error)
	// contains filtered or unexported methods
}

TransactionAPIServer is the server API for TransactionAPI service. All implementations must embed UnimplementedTransactionAPIServer for forward compatibility

type TransactionFilter

type TransactionFilter struct {
	TransactionIds  []string        `protobuf:"bytes,1,rep,name=transaction_ids,json=transactionIds,proto3" json:"transaction_ids,omitempty"`
	ActorIds        []string        `protobuf:"bytes,2,rep,name=actor_ids,json=actorIds,proto3" json:"actor_ids,omitempty"`
	AccountIds      []string        `protobuf:"bytes,3,rep,name=account_ids,json=accountIds,proto3" json:"account_ids,omitempty"`
	TransactionType TransactionType `` /* 147-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*TransactionFilter) Descriptor deprecated

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

Deprecated: Use TransactionFilter.ProtoReflect.Descriptor instead.

func (*TransactionFilter) GetAccountIds

func (x *TransactionFilter) GetAccountIds() []string

func (*TransactionFilter) GetActorIds

func (x *TransactionFilter) GetActorIds() []string

func (*TransactionFilter) GetTransactionIds

func (x *TransactionFilter) GetTransactionIds() []string

func (*TransactionFilter) GetTransactionType

func (x *TransactionFilter) GetTransactionType() TransactionType

func (*TransactionFilter) ProtoMessage

func (*TransactionFilter) ProtoMessage()

func (*TransactionFilter) ProtoReflect

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

func (*TransactionFilter) Reset

func (x *TransactionFilter) Reset()

func (*TransactionFilter) String

func (x *TransactionFilter) String() string

type TransactionType

type TransactionType int32
const (
	TransactionType_TRANSACTION_TYPE_UNSPECIFIED TransactionType = 0
	TransactionType_WITHDRAWAL                   TransactionType = 1
	TransactionType_DEPOSIT                      TransactionType = 2
)

func (TransactionType) Descriptor

func (TransactionType) Enum

func (x TransactionType) Enum() *TransactionType

func (TransactionType) EnumDescriptor deprecated

func (TransactionType) EnumDescriptor() ([]byte, []int)

Deprecated: Use TransactionType.Descriptor instead.

func (TransactionType) Number

func (TransactionType) String

func (x TransactionType) String() string

func (TransactionType) Type

type UnimplementedChamaAccountAPIServer

type UnimplementedChamaAccountAPIServer struct {
}

UnimplementedChamaAccountAPIServer must be embedded to have forward compatible implementations.

func (UnimplementedChamaAccountAPIServer) CreateChamaAccount

func (UnimplementedChamaAccountAPIServer) GetChamaAccount

func (UnimplementedChamaAccountAPIServer) ListChamaAccounts

type UnimplementedTransactionAPIServer

type UnimplementedTransactionAPIServer struct {
}

UnimplementedTransactionAPIServer must be embedded to have forward compatible implementations.

func (UnimplementedTransactionAPIServer) Deposit

func (UnimplementedTransactionAPIServer) GetTransaction

func (UnimplementedTransactionAPIServer) ListTransactions

func (UnimplementedTransactionAPIServer) Withdraw

type UnsafeChamaAccountAPIServer

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

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

type UnsafeTransactionAPIServer

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

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

type WithdrawRequest

type WithdrawRequest struct {
	ActorId     string  `protobuf:"bytes,1,opt,name=actor_id,json=actorId,proto3" json:"actor_id,omitempty"`
	AccountId   string  `protobuf:"bytes,2,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"`
	Description string  `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
	Amount      float64 `protobuf:"fixed64,4,opt,name=amount,proto3" json:"amount,omitempty"`
	// contains filtered or unexported fields
}

func (*WithdrawRequest) Descriptor deprecated

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

Deprecated: Use WithdrawRequest.ProtoReflect.Descriptor instead.

func (*WithdrawRequest) GetAccountId

func (x *WithdrawRequest) GetAccountId() string

func (*WithdrawRequest) GetActorId

func (x *WithdrawRequest) GetActorId() string

func (*WithdrawRequest) GetAmount

func (x *WithdrawRequest) GetAmount() float64

func (*WithdrawRequest) GetDescription

func (x *WithdrawRequest) GetDescription() string

func (*WithdrawRequest) ProtoMessage

func (*WithdrawRequest) ProtoMessage()

func (*WithdrawRequest) ProtoReflect

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

func (*WithdrawRequest) Reset

func (x *WithdrawRequest) Reset()

func (*WithdrawRequest) String

func (x *WithdrawRequest) String() string

Jump to

Keyboard shortcuts

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