Documentation ¶
Overview ¶
Package ledgerv1 is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Package ledgerv1 is a generated GoMock package.
Index ¶
- Constants
- Variables
- func CreateProxyHandler(ctx context.Context, proxyOptions common.ProxyOptions) (*http.ServeMux, error)
- func RegisterLedgerServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterLedgerServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client LedgerServiceClient) error
- func RegisterLedgerServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterLedgerServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server LedgerServiceServer) error
- func RegisterLedgerServiceServer(s grpc.ServiceRegistrar, srv LedgerServiceServer)
- func ToContext(ctx context.Context, client *LedgerClient) context.Context
- type Account
- func (*Account) Descriptor() ([]byte, []int)deprecated
- func (x *Account) GetBalance() *money.Money
- func (x *Account) GetData() map[string]string
- func (x *Account) GetLedger() string
- func (x *Account) GetReference() string
- func (x *Account) GetReservedBalance() *money.Money
- func (x *Account) GetUnclearedBalance() *money.Money
- func (*Account) ProtoMessage()
- func (x *Account) ProtoReflect() protoreflect.Message
- func (x *Account) Reset()
- func (x *Account) String() string
- type Ledger
- func (*Ledger) Descriptor() ([]byte, []int)deprecated
- func (x *Ledger) GetData() map[string]string
- func (x *Ledger) GetParent() string
- func (x *Ledger) GetReference() string
- func (x *Ledger) GetType() LedgerType
- func (*Ledger) ProtoMessage()
- func (x *Ledger) ProtoReflect() protoreflect.Message
- func (x *Ledger) Reset()
- func (x *Ledger) String() string
- type LedgerClient
- type LedgerServiceClient
- type LedgerServiceServer
- type LedgerService_SearchAccountsClient
- type LedgerService_SearchAccountsServer
- type LedgerService_SearchLedgersClient
- type LedgerService_SearchLedgersServer
- type LedgerService_SearchTransactionEntriesClient
- type LedgerService_SearchTransactionEntriesServer
- type LedgerService_SearchTransactionsClient
- type LedgerService_SearchTransactionsServer
- type LedgerType
- type MockLedgerServiceClient
- func (m *MockLedgerServiceClient) CreateAccount(ctx context.Context, in *Account, opts ...grpc.CallOption) (*Account, error)
- func (m *MockLedgerServiceClient) CreateLedger(ctx context.Context, in *Ledger, opts ...grpc.CallOption) (*Ledger, error)
- func (m *MockLedgerServiceClient) CreateTransaction(ctx context.Context, in *Transaction, opts ...grpc.CallOption) (*Transaction, error)
- func (m *MockLedgerServiceClient) EXPECT() *MockLedgerServiceClientMockRecorder
- func (m *MockLedgerServiceClient) ReverseTransaction(ctx context.Context, in *Transaction, opts ...grpc.CallOption) (*Transaction, error)
- func (m *MockLedgerServiceClient) SearchAccounts(ctx context.Context, in *commonv1.SearchRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[Account], error)
- func (m *MockLedgerServiceClient) SearchLedgers(ctx context.Context, in *commonv1.SearchRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[Ledger], error)
- func (m *MockLedgerServiceClient) SearchTransactionEntries(ctx context.Context, in *commonv1.SearchRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[TransactionEntry], error)
- func (m *MockLedgerServiceClient) SearchTransactions(ctx context.Context, in *commonv1.SearchRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[Transaction], error)
- func (m *MockLedgerServiceClient) UpdateAccount(ctx context.Context, in *Account, opts ...grpc.CallOption) (*Account, error)
- func (m *MockLedgerServiceClient) UpdateLedger(ctx context.Context, in *Ledger, opts ...grpc.CallOption) (*Ledger, error)
- func (m *MockLedgerServiceClient) UpdateTransaction(ctx context.Context, in *Transaction, opts ...grpc.CallOption) (*Transaction, error)
- type MockLedgerServiceClientMockRecorder
- func (mr *MockLedgerServiceClientMockRecorder) CreateAccount(ctx, in any, opts ...any) *gomock.Call
- func (mr *MockLedgerServiceClientMockRecorder) CreateLedger(ctx, in any, opts ...any) *gomock.Call
- func (mr *MockLedgerServiceClientMockRecorder) CreateTransaction(ctx, in any, opts ...any) *gomock.Call
- func (mr *MockLedgerServiceClientMockRecorder) ReverseTransaction(ctx, in any, opts ...any) *gomock.Call
- func (mr *MockLedgerServiceClientMockRecorder) SearchAccounts(ctx, in any, opts ...any) *gomock.Call
- func (mr *MockLedgerServiceClientMockRecorder) SearchLedgers(ctx, in any, opts ...any) *gomock.Call
- func (mr *MockLedgerServiceClientMockRecorder) SearchTransactionEntries(ctx, in any, opts ...any) *gomock.Call
- func (mr *MockLedgerServiceClientMockRecorder) SearchTransactions(ctx, in any, opts ...any) *gomock.Call
- func (mr *MockLedgerServiceClientMockRecorder) UpdateAccount(ctx, in any, opts ...any) *gomock.Call
- func (mr *MockLedgerServiceClientMockRecorder) UpdateLedger(ctx, in any, opts ...any) *gomock.Call
- func (mr *MockLedgerServiceClientMockRecorder) UpdateTransaction(ctx, in any, opts ...any) *gomock.Call
- type MockLedgerServiceServer
- func (m *MockLedgerServiceServer) CreateAccount(arg0 context.Context, arg1 *Account) (*Account, error)
- func (m *MockLedgerServiceServer) CreateLedger(arg0 context.Context, arg1 *Ledger) (*Ledger, error)
- func (m *MockLedgerServiceServer) CreateTransaction(arg0 context.Context, arg1 *Transaction) (*Transaction, error)
- func (m *MockLedgerServiceServer) EXPECT() *MockLedgerServiceServerMockRecorder
- func (m *MockLedgerServiceServer) ReverseTransaction(arg0 context.Context, arg1 *Transaction) (*Transaction, error)
- func (m *MockLedgerServiceServer) SearchAccounts(arg0 *commonv1.SearchRequest, arg1 grpc.ServerStreamingServer[Account]) error
- func (m *MockLedgerServiceServer) SearchLedgers(arg0 *commonv1.SearchRequest, arg1 grpc.ServerStreamingServer[Ledger]) error
- func (m *MockLedgerServiceServer) SearchTransactionEntries(arg0 *commonv1.SearchRequest, ...) error
- func (m *MockLedgerServiceServer) SearchTransactions(arg0 *commonv1.SearchRequest, arg1 grpc.ServerStreamingServer[Transaction]) error
- func (m *MockLedgerServiceServer) UpdateAccount(arg0 context.Context, arg1 *Account) (*Account, error)
- func (m *MockLedgerServiceServer) UpdateLedger(arg0 context.Context, arg1 *Ledger) (*Ledger, error)
- func (m *MockLedgerServiceServer) UpdateTransaction(arg0 context.Context, arg1 *Transaction) (*Transaction, error)
- type MockLedgerServiceServerMockRecorder
- func (mr *MockLedgerServiceServerMockRecorder) CreateAccount(arg0, arg1 any) *gomock.Call
- func (mr *MockLedgerServiceServerMockRecorder) CreateLedger(arg0, arg1 any) *gomock.Call
- func (mr *MockLedgerServiceServerMockRecorder) CreateTransaction(arg0, arg1 any) *gomock.Call
- func (mr *MockLedgerServiceServerMockRecorder) ReverseTransaction(arg0, arg1 any) *gomock.Call
- func (mr *MockLedgerServiceServerMockRecorder) SearchAccounts(arg0, arg1 any) *gomock.Call
- func (mr *MockLedgerServiceServerMockRecorder) SearchLedgers(arg0, arg1 any) *gomock.Call
- func (mr *MockLedgerServiceServerMockRecorder) SearchTransactionEntries(arg0, arg1 any) *gomock.Call
- func (mr *MockLedgerServiceServerMockRecorder) SearchTransactions(arg0, arg1 any) *gomock.Call
- func (mr *MockLedgerServiceServerMockRecorder) UpdateAccount(arg0, arg1 any) *gomock.Call
- func (mr *MockLedgerServiceServerMockRecorder) UpdateLedger(arg0, arg1 any) *gomock.Call
- func (mr *MockLedgerServiceServerMockRecorder) UpdateTransaction(arg0, arg1 any) *gomock.Call
- type MockUnsafeLedgerServiceServer
- type MockUnsafeLedgerServiceServerMockRecorder
- type SearchRequest
- type Transaction
- func (*Transaction) Descriptor() ([]byte, []int)deprecated
- func (x *Transaction) GetCleared() bool
- func (x *Transaction) GetCurrency() string
- func (x *Transaction) GetData() map[string]string
- func (x *Transaction) GetEntries() []*TransactionEntry
- func (x *Transaction) GetReference() string
- func (x *Transaction) GetTransactedAt() string
- func (x *Transaction) GetType() TransactionType
- func (*Transaction) ProtoMessage()
- func (x *Transaction) ProtoReflect() protoreflect.Message
- func (x *Transaction) Reset()
- func (x *Transaction) String() string
- type TransactionEntry
- func (*TransactionEntry) Descriptor() ([]byte, []int)deprecated
- func (x *TransactionEntry) GetAccBalance() *money.Money
- func (x *TransactionEntry) GetAccount() string
- func (x *TransactionEntry) GetAmount() *money.Money
- func (x *TransactionEntry) GetClearedAt() string
- func (x *TransactionEntry) GetCredit() bool
- func (x *TransactionEntry) GetTransactedAt() string
- func (x *TransactionEntry) GetTransaction() string
- func (*TransactionEntry) ProtoMessage()
- func (x *TransactionEntry) ProtoReflect() protoreflect.Message
- func (x *TransactionEntry) Reset()
- func (x *TransactionEntry) String() string
- type TransactionType
- func (TransactionType) Descriptor() protoreflect.EnumDescriptor
- func (x TransactionType) Enum() *TransactionType
- func (TransactionType) EnumDescriptor() ([]byte, []int)deprecated
- func (x TransactionType) Number() protoreflect.EnumNumber
- func (x TransactionType) String() string
- func (TransactionType) Type() protoreflect.EnumType
- type UnimplementedLedgerServiceServer
- func (UnimplementedLedgerServiceServer) CreateAccount(context.Context, *Account) (*Account, error)
- func (UnimplementedLedgerServiceServer) CreateLedger(context.Context, *Ledger) (*Ledger, error)
- func (UnimplementedLedgerServiceServer) CreateTransaction(context.Context, *Transaction) (*Transaction, error)
- func (UnimplementedLedgerServiceServer) ReverseTransaction(context.Context, *Transaction) (*Transaction, error)
- func (UnimplementedLedgerServiceServer) SearchAccounts(*v1.SearchRequest, grpc.ServerStreamingServer[Account]) error
- func (UnimplementedLedgerServiceServer) SearchLedgers(*v1.SearchRequest, grpc.ServerStreamingServer[Ledger]) error
- func (UnimplementedLedgerServiceServer) SearchTransactionEntries(*v1.SearchRequest, grpc.ServerStreamingServer[TransactionEntry]) error
- func (UnimplementedLedgerServiceServer) SearchTransactions(*v1.SearchRequest, grpc.ServerStreamingServer[Transaction]) error
- func (UnimplementedLedgerServiceServer) UpdateAccount(context.Context, *Account) (*Account, error)
- func (UnimplementedLedgerServiceServer) UpdateLedger(context.Context, *Ledger) (*Ledger, error)
- func (UnimplementedLedgerServiceServer) UpdateTransaction(context.Context, *Transaction) (*Transaction, error)
- type UnsafeLedgerServiceServer
Constants ¶
const ( LedgerService_SearchLedgers_FullMethodName = "/ledger.v1.LedgerService/SearchLedgers" LedgerService_CreateLedger_FullMethodName = "/ledger.v1.LedgerService/CreateLedger" LedgerService_UpdateLedger_FullMethodName = "/ledger.v1.LedgerService/UpdateLedger" LedgerService_SearchAccounts_FullMethodName = "/ledger.v1.LedgerService/SearchAccounts" LedgerService_CreateAccount_FullMethodName = "/ledger.v1.LedgerService/CreateAccount" LedgerService_UpdateAccount_FullMethodName = "/ledger.v1.LedgerService/UpdateAccount" LedgerService_SearchTransactions_FullMethodName = "/ledger.v1.LedgerService/SearchTransactions" LedgerService_CreateTransaction_FullMethodName = "/ledger.v1.LedgerService/CreateTransaction" LedgerService_ReverseTransaction_FullMethodName = "/ledger.v1.LedgerService/ReverseTransaction" LedgerService_UpdateTransaction_FullMethodName = "/ledger.v1.LedgerService/UpdateTransaction" LedgerService_SearchTransactionEntries_FullMethodName = "/ledger.v1.LedgerService/SearchTransactionEntries" )
Variables ¶
var ( LedgerType_name = map[int32]string{ 0: "ASSET", 1: "LIABILITY", 2: "INCOME", 3: "EXPENSE", 4: "CAPITAL", } LedgerType_value = map[string]int32{ "ASSET": 0, "LIABILITY": 1, "INCOME": 2, "EXPENSE": 3, "CAPITAL": 4, } )
Enum value maps for LedgerType.
var ( TransactionType_name = map[int32]string{ 0: "NORMAL", 1: "REVERSAL", 2: "RESERVATION", } TransactionType_value = map[string]int32{ "NORMAL": 0, "REVERSAL": 1, "RESERVATION": 2, } )
Enum value maps for TransactionType.
var File_ledger_v1_ledger_proto protoreflect.FileDescriptor
var LedgerService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "ledger.v1.LedgerService", HandlerType: (*LedgerServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "CreateLedger", Handler: _LedgerService_CreateLedger_Handler, }, { MethodName: "UpdateLedger", Handler: _LedgerService_UpdateLedger_Handler, }, { MethodName: "CreateAccount", Handler: _LedgerService_CreateAccount_Handler, }, { MethodName: "UpdateAccount", Handler: _LedgerService_UpdateAccount_Handler, }, { MethodName: "CreateTransaction", Handler: _LedgerService_CreateTransaction_Handler, }, { MethodName: "ReverseTransaction", Handler: _LedgerService_ReverseTransaction_Handler, }, { MethodName: "UpdateTransaction", Handler: _LedgerService_UpdateTransaction_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "SearchLedgers", Handler: _LedgerService_SearchLedgers_Handler, ServerStreams: true, }, { StreamName: "SearchAccounts", Handler: _LedgerService_SearchAccounts_Handler, ServerStreams: true, }, { StreamName: "SearchTransactions", Handler: _LedgerService_SearchTransactions_Handler, ServerStreams: true, }, { StreamName: "SearchTransactionEntries", Handler: _LedgerService_SearchTransactionEntries_Handler, ServerStreams: true, }, }, Metadata: "ledger/v1/ledger.proto", }
LedgerService_ServiceDesc is the grpc.ServiceDesc for LedgerService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func CreateProxyHandler ¶ added in v1.28.4
func RegisterLedgerServiceHandler ¶ added in v1.28.0
func RegisterLedgerServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterLedgerServiceHandler registers the http handlers for service LedgerService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterLedgerServiceHandlerClient ¶ added in v1.28.0
func RegisterLedgerServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client LedgerServiceClient) error
RegisterLedgerServiceHandlerClient registers the http handlers for service LedgerService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "LedgerServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "LedgerServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "LedgerServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares.
func RegisterLedgerServiceHandlerFromEndpoint ¶ added in v1.28.0
func RegisterLedgerServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterLedgerServiceHandlerFromEndpoint is same as RegisterLedgerServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterLedgerServiceHandlerServer ¶ added in v1.28.0
func RegisterLedgerServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server LedgerServiceServer) error
RegisterLedgerServiceHandlerServer registers the http handlers for service LedgerService to "mux". UnaryRPC :call LedgerServiceServer 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 RegisterLedgerServiceHandlerFromEndpoint instead. GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call.
func RegisterLedgerServiceServer ¶
func RegisterLedgerServiceServer(s grpc.ServiceRegistrar, srv LedgerServiceServer)
Types ¶
type Account ¶
type Account struct { Reference string `protobuf:"bytes,1,opt,name=reference,proto3" json:"reference,omitempty"` Ledger string `protobuf:"bytes,3,opt,name=ledger,proto3" json:"ledger,omitempty"` Balance *money.Money `protobuf:"bytes,4,opt,name=balance,proto3" json:"balance,omitempty"` Data map[string]string `` /* 149-byte string literal not displayed */ UnclearedBalance *money.Money `protobuf:"bytes,6,opt,name=uncleared_balance,json=unclearedBalance,proto3" json:"uncleared_balance,omitempty"` ReservedBalance *money.Money `protobuf:"bytes,7,opt,name=reserved_balance,json=reservedBalance,proto3" json:"reserved_balance,omitempty"` // contains filtered or unexported fields }
func (*Account) Descriptor
deprecated
func (*Account) GetBalance ¶
func (*Account) GetReference ¶
func (*Account) GetReservedBalance ¶ added in v1.20.5
func (*Account) GetUnclearedBalance ¶ added in v1.20.5
func (*Account) ProtoMessage ¶
func (*Account) ProtoMessage()
func (*Account) ProtoReflect ¶
func (x *Account) ProtoReflect() protoreflect.Message
type Ledger ¶
type Ledger struct { Reference string `protobuf:"bytes,1,opt,name=reference,proto3" json:"reference,omitempty"` Type LedgerType `protobuf:"varint,2,opt,name=type,proto3,enum=ledger.v1.LedgerType" json:"type,omitempty"` Parent string `protobuf:"bytes,3,opt,name=parent,proto3" json:"parent,omitempty"` Data map[string]string `` /* 149-byte string literal not displayed */ // contains filtered or unexported fields }
func (*Ledger) Descriptor
deprecated
func (*Ledger) GetReference ¶
func (*Ledger) GetType ¶
func (x *Ledger) GetType() LedgerType
func (*Ledger) ProtoMessage ¶
func (*Ledger) ProtoMessage()
func (*Ledger) ProtoReflect ¶
func (x *Ledger) ProtoReflect() protoreflect.Message
type LedgerClient ¶
type LedgerClient struct { *common.GrpcClientBase // The gRPC API Client. Client LedgerServiceClient }
LedgerClient is a Client for interacting with the notification service API.
Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
func FromContext ¶
func FromContext(ctx context.Context) *LedgerClient
func Init ¶ added in v1.9.1
func Init(cBase *common.GrpcClientBase, service LedgerServiceClient) *LedgerClient
func NewLedgerClient ¶
func NewLedgerClient(ctx context.Context, opts ...common.ClientOption) (*LedgerClient, error)
NewLedgerClient creates a new notification Client.
The service that an application uses to send and access received messages
type LedgerServiceClient ¶
type LedgerServiceClient interface { // Searches for an ledger based on details SearchLedgers(ctx context.Context, in *v1.SearchRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[Ledger], error) // Creates a new ledger based on supplied data CreateLedger(ctx context.Context, in *Ledger, opts ...grpc.CallOption) (*Ledger, error) // Updates the data component of the ledger. UpdateLedger(ctx context.Context, in *Ledger, opts ...grpc.CallOption) (*Ledger, error) // Searches for an account based on details SearchAccounts(ctx context.Context, in *v1.SearchRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[Account], error) // Creates a new account based on supplied data CreateAccount(ctx context.Context, in *Account, opts ...grpc.CallOption) (*Account, error) // Updates the data component of the account. UpdateAccount(ctx context.Context, in *Account, opts ...grpc.CallOption) (*Account, error) // Searches for a transaction based on details SearchTransactions(ctx context.Context, in *v1.SearchRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[Transaction], error) // Creates a new transaction CreateTransaction(ctx context.Context, in *Transaction, opts ...grpc.CallOption) (*Transaction, error) // Reverses a transaction by creating a new one with inverted entries ReverseTransaction(ctx context.Context, in *Transaction, opts ...grpc.CallOption) (*Transaction, error) // Updates a transaction's details UpdateTransaction(ctx context.Context, in *Transaction, opts ...grpc.CallOption) (*Transaction, error) // Searches for entries matching the search details SearchTransactionEntries(ctx context.Context, in *v1.SearchRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[TransactionEntry], error) }
LedgerServiceClient is the client API for LedgerService 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.
The ledger service definition.
func NewLedgerServiceClient ¶
func NewLedgerServiceClient(cc grpc.ClientConnInterface) LedgerServiceClient
type LedgerServiceServer ¶
type LedgerServiceServer interface { // Searches for an ledger based on details SearchLedgers(*v1.SearchRequest, grpc.ServerStreamingServer[Ledger]) error // Creates a new ledger based on supplied data CreateLedger(context.Context, *Ledger) (*Ledger, error) // Updates the data component of the ledger. UpdateLedger(context.Context, *Ledger) (*Ledger, error) // Searches for an account based on details SearchAccounts(*v1.SearchRequest, grpc.ServerStreamingServer[Account]) error // Creates a new account based on supplied data CreateAccount(context.Context, *Account) (*Account, error) // Updates the data component of the account. UpdateAccount(context.Context, *Account) (*Account, error) // Searches for a transaction based on details SearchTransactions(*v1.SearchRequest, grpc.ServerStreamingServer[Transaction]) error // Creates a new transaction CreateTransaction(context.Context, *Transaction) (*Transaction, error) // Reverses a transaction by creating a new one with inverted entries ReverseTransaction(context.Context, *Transaction) (*Transaction, error) // Updates a transaction's details UpdateTransaction(context.Context, *Transaction) (*Transaction, error) // Searches for entries matching the search details SearchTransactionEntries(*v1.SearchRequest, grpc.ServerStreamingServer[TransactionEntry]) error // contains filtered or unexported methods }
LedgerServiceServer is the server API for LedgerService service. All implementations must embed UnimplementedLedgerServiceServer for forward compatibility.
The ledger service definition.
type LedgerService_SearchAccountsClient ¶
type LedgerService_SearchAccountsClient = grpc.ServerStreamingClient[Account]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type LedgerService_SearchAccountsServer ¶
type LedgerService_SearchAccountsServer = grpc.ServerStreamingServer[Account]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type LedgerService_SearchLedgersClient ¶
type LedgerService_SearchLedgersClient = grpc.ServerStreamingClient[Ledger]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type LedgerService_SearchLedgersServer ¶
type LedgerService_SearchLedgersServer = grpc.ServerStreamingServer[Ledger]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type LedgerService_SearchTransactionEntriesClient ¶
type LedgerService_SearchTransactionEntriesClient = grpc.ServerStreamingClient[TransactionEntry]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type LedgerService_SearchTransactionEntriesServer ¶
type LedgerService_SearchTransactionEntriesServer = grpc.ServerStreamingServer[TransactionEntry]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type LedgerService_SearchTransactionsClient ¶
type LedgerService_SearchTransactionsClient = grpc.ServerStreamingClient[Transaction]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type LedgerService_SearchTransactionsServer ¶
type LedgerService_SearchTransactionsServer = grpc.ServerStreamingServer[Transaction]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type LedgerType ¶
type LedgerType int32
buf:lint:ignore ENUM_VALUE_PREFIX
const ( // buf:lint:ignore ENUM_ZERO_VALUE_SUFFIX LedgerType_ASSET LedgerType = 0 LedgerType_LIABILITY LedgerType = 1 LedgerType_INCOME LedgerType = 2 LedgerType_EXPENSE LedgerType = 3 LedgerType_CAPITAL LedgerType = 4 )
func (LedgerType) Descriptor ¶
func (LedgerType) Descriptor() protoreflect.EnumDescriptor
func (LedgerType) Enum ¶
func (x LedgerType) Enum() *LedgerType
func (LedgerType) EnumDescriptor
deprecated
func (LedgerType) EnumDescriptor() ([]byte, []int)
Deprecated: Use LedgerType.Descriptor instead.
func (LedgerType) Number ¶
func (x LedgerType) Number() protoreflect.EnumNumber
func (LedgerType) String ¶
func (x LedgerType) String() string
func (LedgerType) Type ¶
func (LedgerType) Type() protoreflect.EnumType
type MockLedgerServiceClient ¶
type MockLedgerServiceClient struct {
// contains filtered or unexported fields
}
MockLedgerServiceClient is a mock of LedgerServiceClient interface.
func NewMockLedgerServiceClient ¶
func NewMockLedgerServiceClient(ctrl *gomock.Controller) *MockLedgerServiceClient
NewMockLedgerServiceClient creates a new mock instance.
func (*MockLedgerServiceClient) CreateAccount ¶
func (m *MockLedgerServiceClient) CreateAccount(ctx context.Context, in *Account, opts ...grpc.CallOption) (*Account, error)
CreateAccount mocks base method.
func (*MockLedgerServiceClient) CreateLedger ¶
func (m *MockLedgerServiceClient) CreateLedger(ctx context.Context, in *Ledger, opts ...grpc.CallOption) (*Ledger, error)
CreateLedger mocks base method.
func (*MockLedgerServiceClient) CreateTransaction ¶
func (m *MockLedgerServiceClient) CreateTransaction(ctx context.Context, in *Transaction, opts ...grpc.CallOption) (*Transaction, error)
CreateTransaction mocks base method.
func (*MockLedgerServiceClient) EXPECT ¶
func (m *MockLedgerServiceClient) EXPECT() *MockLedgerServiceClientMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockLedgerServiceClient) ReverseTransaction ¶
func (m *MockLedgerServiceClient) ReverseTransaction(ctx context.Context, in *Transaction, opts ...grpc.CallOption) (*Transaction, error)
ReverseTransaction mocks base method.
func (*MockLedgerServiceClient) SearchAccounts ¶
func (m *MockLedgerServiceClient) SearchAccounts(ctx context.Context, in *commonv1.SearchRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[Account], error)
SearchAccounts mocks base method.
func (*MockLedgerServiceClient) SearchLedgers ¶
func (m *MockLedgerServiceClient) SearchLedgers(ctx context.Context, in *commonv1.SearchRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[Ledger], error)
SearchLedgers mocks base method.
func (*MockLedgerServiceClient) SearchTransactionEntries ¶
func (m *MockLedgerServiceClient) SearchTransactionEntries(ctx context.Context, in *commonv1.SearchRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[TransactionEntry], error)
SearchTransactionEntries mocks base method.
func (*MockLedgerServiceClient) SearchTransactions ¶
func (m *MockLedgerServiceClient) SearchTransactions(ctx context.Context, in *commonv1.SearchRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[Transaction], error)
SearchTransactions mocks base method.
func (*MockLedgerServiceClient) UpdateAccount ¶
func (m *MockLedgerServiceClient) UpdateAccount(ctx context.Context, in *Account, opts ...grpc.CallOption) (*Account, error)
UpdateAccount mocks base method.
func (*MockLedgerServiceClient) UpdateLedger ¶
func (m *MockLedgerServiceClient) UpdateLedger(ctx context.Context, in *Ledger, opts ...grpc.CallOption) (*Ledger, error)
UpdateLedger mocks base method.
func (*MockLedgerServiceClient) UpdateTransaction ¶
func (m *MockLedgerServiceClient) UpdateTransaction(ctx context.Context, in *Transaction, opts ...grpc.CallOption) (*Transaction, error)
UpdateTransaction mocks base method.
type MockLedgerServiceClientMockRecorder ¶
type MockLedgerServiceClientMockRecorder struct {
// contains filtered or unexported fields
}
MockLedgerServiceClientMockRecorder is the mock recorder for MockLedgerServiceClient.
func (*MockLedgerServiceClientMockRecorder) CreateAccount ¶
func (mr *MockLedgerServiceClientMockRecorder) CreateAccount(ctx, in any, opts ...any) *gomock.Call
CreateAccount indicates an expected call of CreateAccount.
func (*MockLedgerServiceClientMockRecorder) CreateLedger ¶
func (mr *MockLedgerServiceClientMockRecorder) CreateLedger(ctx, in any, opts ...any) *gomock.Call
CreateLedger indicates an expected call of CreateLedger.
func (*MockLedgerServiceClientMockRecorder) CreateTransaction ¶
func (mr *MockLedgerServiceClientMockRecorder) CreateTransaction(ctx, in any, opts ...any) *gomock.Call
CreateTransaction indicates an expected call of CreateTransaction.
func (*MockLedgerServiceClientMockRecorder) ReverseTransaction ¶
func (mr *MockLedgerServiceClientMockRecorder) ReverseTransaction(ctx, in any, opts ...any) *gomock.Call
ReverseTransaction indicates an expected call of ReverseTransaction.
func (*MockLedgerServiceClientMockRecorder) SearchAccounts ¶
func (mr *MockLedgerServiceClientMockRecorder) SearchAccounts(ctx, in any, opts ...any) *gomock.Call
SearchAccounts indicates an expected call of SearchAccounts.
func (*MockLedgerServiceClientMockRecorder) SearchLedgers ¶
func (mr *MockLedgerServiceClientMockRecorder) SearchLedgers(ctx, in any, opts ...any) *gomock.Call
SearchLedgers indicates an expected call of SearchLedgers.
func (*MockLedgerServiceClientMockRecorder) SearchTransactionEntries ¶
func (mr *MockLedgerServiceClientMockRecorder) SearchTransactionEntries(ctx, in any, opts ...any) *gomock.Call
SearchTransactionEntries indicates an expected call of SearchTransactionEntries.
func (*MockLedgerServiceClientMockRecorder) SearchTransactions ¶
func (mr *MockLedgerServiceClientMockRecorder) SearchTransactions(ctx, in any, opts ...any) *gomock.Call
SearchTransactions indicates an expected call of SearchTransactions.
func (*MockLedgerServiceClientMockRecorder) UpdateAccount ¶
func (mr *MockLedgerServiceClientMockRecorder) UpdateAccount(ctx, in any, opts ...any) *gomock.Call
UpdateAccount indicates an expected call of UpdateAccount.
func (*MockLedgerServiceClientMockRecorder) UpdateLedger ¶
func (mr *MockLedgerServiceClientMockRecorder) UpdateLedger(ctx, in any, opts ...any) *gomock.Call
UpdateLedger indicates an expected call of UpdateLedger.
func (*MockLedgerServiceClientMockRecorder) UpdateTransaction ¶
func (mr *MockLedgerServiceClientMockRecorder) UpdateTransaction(ctx, in any, opts ...any) *gomock.Call
UpdateTransaction indicates an expected call of UpdateTransaction.
type MockLedgerServiceServer ¶
type MockLedgerServiceServer struct {
// contains filtered or unexported fields
}
MockLedgerServiceServer is a mock of LedgerServiceServer interface.
func NewMockLedgerServiceServer ¶
func NewMockLedgerServiceServer(ctrl *gomock.Controller) *MockLedgerServiceServer
NewMockLedgerServiceServer creates a new mock instance.
func (*MockLedgerServiceServer) CreateAccount ¶
func (m *MockLedgerServiceServer) CreateAccount(arg0 context.Context, arg1 *Account) (*Account, error)
CreateAccount mocks base method.
func (*MockLedgerServiceServer) CreateLedger ¶
CreateLedger mocks base method.
func (*MockLedgerServiceServer) CreateTransaction ¶
func (m *MockLedgerServiceServer) CreateTransaction(arg0 context.Context, arg1 *Transaction) (*Transaction, error)
CreateTransaction mocks base method.
func (*MockLedgerServiceServer) EXPECT ¶
func (m *MockLedgerServiceServer) EXPECT() *MockLedgerServiceServerMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockLedgerServiceServer) ReverseTransaction ¶
func (m *MockLedgerServiceServer) ReverseTransaction(arg0 context.Context, arg1 *Transaction) (*Transaction, error)
ReverseTransaction mocks base method.
func (*MockLedgerServiceServer) SearchAccounts ¶
func (m *MockLedgerServiceServer) SearchAccounts(arg0 *commonv1.SearchRequest, arg1 grpc.ServerStreamingServer[Account]) error
SearchAccounts mocks base method.
func (*MockLedgerServiceServer) SearchLedgers ¶
func (m *MockLedgerServiceServer) SearchLedgers(arg0 *commonv1.SearchRequest, arg1 grpc.ServerStreamingServer[Ledger]) error
SearchLedgers mocks base method.
func (*MockLedgerServiceServer) SearchTransactionEntries ¶
func (m *MockLedgerServiceServer) SearchTransactionEntries(arg0 *commonv1.SearchRequest, arg1 grpc.ServerStreamingServer[TransactionEntry]) error
SearchTransactionEntries mocks base method.
func (*MockLedgerServiceServer) SearchTransactions ¶
func (m *MockLedgerServiceServer) SearchTransactions(arg0 *commonv1.SearchRequest, arg1 grpc.ServerStreamingServer[Transaction]) error
SearchTransactions mocks base method.
func (*MockLedgerServiceServer) UpdateAccount ¶
func (m *MockLedgerServiceServer) UpdateAccount(arg0 context.Context, arg1 *Account) (*Account, error)
UpdateAccount mocks base method.
func (*MockLedgerServiceServer) UpdateLedger ¶
UpdateLedger mocks base method.
func (*MockLedgerServiceServer) UpdateTransaction ¶
func (m *MockLedgerServiceServer) UpdateTransaction(arg0 context.Context, arg1 *Transaction) (*Transaction, error)
UpdateTransaction mocks base method.
type MockLedgerServiceServerMockRecorder ¶
type MockLedgerServiceServerMockRecorder struct {
// contains filtered or unexported fields
}
MockLedgerServiceServerMockRecorder is the mock recorder for MockLedgerServiceServer.
func (*MockLedgerServiceServerMockRecorder) CreateAccount ¶
func (mr *MockLedgerServiceServerMockRecorder) CreateAccount(arg0, arg1 any) *gomock.Call
CreateAccount indicates an expected call of CreateAccount.
func (*MockLedgerServiceServerMockRecorder) CreateLedger ¶
func (mr *MockLedgerServiceServerMockRecorder) CreateLedger(arg0, arg1 any) *gomock.Call
CreateLedger indicates an expected call of CreateLedger.
func (*MockLedgerServiceServerMockRecorder) CreateTransaction ¶
func (mr *MockLedgerServiceServerMockRecorder) CreateTransaction(arg0, arg1 any) *gomock.Call
CreateTransaction indicates an expected call of CreateTransaction.
func (*MockLedgerServiceServerMockRecorder) ReverseTransaction ¶
func (mr *MockLedgerServiceServerMockRecorder) ReverseTransaction(arg0, arg1 any) *gomock.Call
ReverseTransaction indicates an expected call of ReverseTransaction.
func (*MockLedgerServiceServerMockRecorder) SearchAccounts ¶
func (mr *MockLedgerServiceServerMockRecorder) SearchAccounts(arg0, arg1 any) *gomock.Call
SearchAccounts indicates an expected call of SearchAccounts.
func (*MockLedgerServiceServerMockRecorder) SearchLedgers ¶
func (mr *MockLedgerServiceServerMockRecorder) SearchLedgers(arg0, arg1 any) *gomock.Call
SearchLedgers indicates an expected call of SearchLedgers.
func (*MockLedgerServiceServerMockRecorder) SearchTransactionEntries ¶
func (mr *MockLedgerServiceServerMockRecorder) SearchTransactionEntries(arg0, arg1 any) *gomock.Call
SearchTransactionEntries indicates an expected call of SearchTransactionEntries.
func (*MockLedgerServiceServerMockRecorder) SearchTransactions ¶
func (mr *MockLedgerServiceServerMockRecorder) SearchTransactions(arg0, arg1 any) *gomock.Call
SearchTransactions indicates an expected call of SearchTransactions.
func (*MockLedgerServiceServerMockRecorder) UpdateAccount ¶
func (mr *MockLedgerServiceServerMockRecorder) UpdateAccount(arg0, arg1 any) *gomock.Call
UpdateAccount indicates an expected call of UpdateAccount.
func (*MockLedgerServiceServerMockRecorder) UpdateLedger ¶
func (mr *MockLedgerServiceServerMockRecorder) UpdateLedger(arg0, arg1 any) *gomock.Call
UpdateLedger indicates an expected call of UpdateLedger.
func (*MockLedgerServiceServerMockRecorder) UpdateTransaction ¶
func (mr *MockLedgerServiceServerMockRecorder) UpdateTransaction(arg0, arg1 any) *gomock.Call
UpdateTransaction indicates an expected call of UpdateTransaction.
type MockUnsafeLedgerServiceServer ¶
type MockUnsafeLedgerServiceServer struct {
// contains filtered or unexported fields
}
MockUnsafeLedgerServiceServer is a mock of UnsafeLedgerServiceServer interface.
func NewMockUnsafeLedgerServiceServer ¶
func NewMockUnsafeLedgerServiceServer(ctrl *gomock.Controller) *MockUnsafeLedgerServiceServer
NewMockUnsafeLedgerServiceServer creates a new mock instance.
func (*MockUnsafeLedgerServiceServer) EXPECT ¶
func (m *MockUnsafeLedgerServiceServer) EXPECT() *MockUnsafeLedgerServiceServerMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockUnsafeLedgerServiceServerMockRecorder ¶
type MockUnsafeLedgerServiceServerMockRecorder struct {
// contains filtered or unexported fields
}
MockUnsafeLedgerServiceServerMockRecorder is the mock recorder for MockUnsafeLedgerServiceServer.
type SearchRequest ¶
type SearchRequest struct { Query string `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty"` // contains filtered or unexported fields }
func (*SearchRequest) Descriptor
deprecated
func (*SearchRequest) Descriptor() ([]byte, []int)
Deprecated: Use SearchRequest.ProtoReflect.Descriptor instead.
func (*SearchRequest) GetQuery ¶
func (x *SearchRequest) GetQuery() string
func (*SearchRequest) ProtoMessage ¶
func (*SearchRequest) ProtoMessage()
func (*SearchRequest) ProtoReflect ¶
func (x *SearchRequest) ProtoReflect() protoreflect.Message
func (*SearchRequest) Reset ¶
func (x *SearchRequest) Reset()
func (*SearchRequest) String ¶
func (x *SearchRequest) String() string
type Transaction ¶
type Transaction struct { Reference string `protobuf:"bytes,1,opt,name=reference,proto3" json:"reference,omitempty"` Currency string `protobuf:"bytes,2,opt,name=currency,proto3" json:"currency,omitempty"` TransactedAt string `protobuf:"bytes,3,opt,name=transacted_at,json=transactedAt,proto3" json:"transacted_at,omitempty"` Data map[string]string `` /* 149-byte string literal not displayed */ Entries []*TransactionEntry `protobuf:"bytes,5,rep,name=entries,proto3" json:"entries,omitempty"` Cleared bool `protobuf:"varint,6,opt,name=cleared,proto3" json:"cleared,omitempty"` Type TransactionType `protobuf:"varint,7,opt,name=type,proto3,enum=ledger.v1.TransactionType" json:"type,omitempty"` // contains filtered or unexported fields }
func (*Transaction) Descriptor
deprecated
func (*Transaction) Descriptor() ([]byte, []int)
Deprecated: Use Transaction.ProtoReflect.Descriptor instead.
func (*Transaction) GetCleared ¶ added in v1.20.5
func (x *Transaction) GetCleared() bool
func (*Transaction) GetCurrency ¶
func (x *Transaction) GetCurrency() string
func (*Transaction) GetData ¶
func (x *Transaction) GetData() map[string]string
func (*Transaction) GetEntries ¶
func (x *Transaction) GetEntries() []*TransactionEntry
func (*Transaction) GetReference ¶
func (x *Transaction) GetReference() string
func (*Transaction) GetTransactedAt ¶
func (x *Transaction) GetTransactedAt() string
func (*Transaction) GetType ¶ added in v1.20.5
func (x *Transaction) GetType() 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 TransactionEntry ¶
type TransactionEntry struct { Account string `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"` Transaction string `protobuf:"bytes,2,opt,name=transaction,proto3" json:"transaction,omitempty"` TransactedAt string `protobuf:"bytes,3,opt,name=transacted_at,json=transactedAt,proto3" json:"transacted_at,omitempty"` Amount *money.Money `protobuf:"bytes,4,opt,name=amount,proto3" json:"amount,omitempty"` Credit bool `protobuf:"varint,5,opt,name=credit,proto3" json:"credit,omitempty"` AccBalance *money.Money `protobuf:"bytes,6,opt,name=acc_balance,json=accBalance,proto3" json:"acc_balance,omitempty"` ClearedAt string `protobuf:"bytes,7,opt,name=cleared_at,json=clearedAt,proto3" json:"cleared_at,omitempty"` // contains filtered or unexported fields }
func (*TransactionEntry) Descriptor
deprecated
func (*TransactionEntry) Descriptor() ([]byte, []int)
Deprecated: Use TransactionEntry.ProtoReflect.Descriptor instead.
func (*TransactionEntry) GetAccBalance ¶
func (x *TransactionEntry) GetAccBalance() *money.Money
func (*TransactionEntry) GetAccount ¶
func (x *TransactionEntry) GetAccount() string
func (*TransactionEntry) GetAmount ¶
func (x *TransactionEntry) GetAmount() *money.Money
func (*TransactionEntry) GetClearedAt ¶ added in v1.20.5
func (x *TransactionEntry) GetClearedAt() string
func (*TransactionEntry) GetCredit ¶
func (x *TransactionEntry) GetCredit() bool
func (*TransactionEntry) GetTransactedAt ¶
func (x *TransactionEntry) GetTransactedAt() string
func (*TransactionEntry) GetTransaction ¶
func (x *TransactionEntry) GetTransaction() string
func (*TransactionEntry) ProtoMessage ¶
func (*TransactionEntry) ProtoMessage()
func (*TransactionEntry) ProtoReflect ¶
func (x *TransactionEntry) ProtoReflect() protoreflect.Message
func (*TransactionEntry) Reset ¶
func (x *TransactionEntry) Reset()
func (*TransactionEntry) String ¶
func (x *TransactionEntry) String() string
type TransactionType ¶ added in v1.20.5
type TransactionType int32
buf:lint:ignore ENUM_VALUE_PREFIX
const ( // buf:lint:ignore ENUM_ZERO_VALUE_SUFFIX TransactionType_NORMAL TransactionType = 0 TransactionType_REVERSAL TransactionType = 1 TransactionType_RESERVATION TransactionType = 2 )
func (TransactionType) Descriptor ¶ added in v1.20.5
func (TransactionType) Descriptor() protoreflect.EnumDescriptor
func (TransactionType) Enum ¶ added in v1.20.5
func (x TransactionType) Enum() *TransactionType
func (TransactionType) EnumDescriptor
deprecated
added in
v1.20.5
func (TransactionType) EnumDescriptor() ([]byte, []int)
Deprecated: Use TransactionType.Descriptor instead.
func (TransactionType) Number ¶ added in v1.20.5
func (x TransactionType) Number() protoreflect.EnumNumber
func (TransactionType) String ¶ added in v1.20.5
func (x TransactionType) String() string
func (TransactionType) Type ¶ added in v1.20.5
func (TransactionType) Type() protoreflect.EnumType
type UnimplementedLedgerServiceServer ¶
type UnimplementedLedgerServiceServer struct{}
UnimplementedLedgerServiceServer must be embedded to have forward compatible implementations.
NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.
func (UnimplementedLedgerServiceServer) CreateAccount ¶
func (UnimplementedLedgerServiceServer) CreateLedger ¶
func (UnimplementedLedgerServiceServer) CreateTransaction ¶
func (UnimplementedLedgerServiceServer) CreateTransaction(context.Context, *Transaction) (*Transaction, error)
func (UnimplementedLedgerServiceServer) ReverseTransaction ¶
func (UnimplementedLedgerServiceServer) ReverseTransaction(context.Context, *Transaction) (*Transaction, error)
func (UnimplementedLedgerServiceServer) SearchAccounts ¶
func (UnimplementedLedgerServiceServer) SearchAccounts(*v1.SearchRequest, grpc.ServerStreamingServer[Account]) error
func (UnimplementedLedgerServiceServer) SearchLedgers ¶
func (UnimplementedLedgerServiceServer) SearchLedgers(*v1.SearchRequest, grpc.ServerStreamingServer[Ledger]) error
func (UnimplementedLedgerServiceServer) SearchTransactionEntries ¶
func (UnimplementedLedgerServiceServer) SearchTransactionEntries(*v1.SearchRequest, grpc.ServerStreamingServer[TransactionEntry]) error
func (UnimplementedLedgerServiceServer) SearchTransactions ¶
func (UnimplementedLedgerServiceServer) SearchTransactions(*v1.SearchRequest, grpc.ServerStreamingServer[Transaction]) error
func (UnimplementedLedgerServiceServer) UpdateAccount ¶
func (UnimplementedLedgerServiceServer) UpdateLedger ¶
func (UnimplementedLedgerServiceServer) UpdateTransaction ¶
func (UnimplementedLedgerServiceServer) UpdateTransaction(context.Context, *Transaction) (*Transaction, error)
type UnsafeLedgerServiceServer ¶
type UnsafeLedgerServiceServer interface {
// contains filtered or unexported methods
}
UnsafeLedgerServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to LedgerServiceServer will result in compilation errors.