Documentation ¶
Index ¶
- Variables
- func RegisterVaultServiceServer(s grpc.ServiceRegistrar, srv VaultServiceServer)
- type AddTransactionRequest
- func (*AddTransactionRequest) Descriptor() ([]byte, []int)deprecated
- func (x *AddTransactionRequest) GetAsset() *v1.Asset
- func (x *AddTransactionRequest) GetExecutedAt() int64
- func (x *AddTransactionRequest) GetPrice() float64
- func (x *AddTransactionRequest) GetQuantity() float64
- func (x *AddTransactionRequest) GetUserId() string
- func (*AddTransactionRequest) ProtoMessage()
- func (x *AddTransactionRequest) ProtoReflect() protoreflect.Message
- func (x *AddTransactionRequest) Reset()
- func (x *AddTransactionRequest) String() string
- type AddTransactionResponse
- func (*AddTransactionResponse) Descriptor() ([]byte, []int)deprecated
- func (x *AddTransactionResponse) GetId() string
- func (*AddTransactionResponse) ProtoMessage()
- func (x *AddTransactionResponse) ProtoReflect() protoreflect.Message
- func (x *AddTransactionResponse) Reset()
- func (x *AddTransactionResponse) String() string
- type DeleteTransactionRequest
- func (*DeleteTransactionRequest) Descriptor() ([]byte, []int)deprecated
- func (x *DeleteTransactionRequest) GetTransactionId() string
- func (x *DeleteTransactionRequest) GetUserId() string
- func (*DeleteTransactionRequest) ProtoMessage()
- func (x *DeleteTransactionRequest) ProtoReflect() protoreflect.Message
- func (x *DeleteTransactionRequest) Reset()
- func (x *DeleteTransactionRequest) String() string
- type DeleteTransactionResponse
- type GetTransactionsRequest
- func (*GetTransactionsRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetTransactionsRequest) GetUserId() string
- func (*GetTransactionsRequest) ProtoMessage()
- func (x *GetTransactionsRequest) ProtoReflect() protoreflect.Message
- func (x *GetTransactionsRequest) Reset()
- func (x *GetTransactionsRequest) String() string
- type GetTransactionsResponse
- func (*GetTransactionsResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetTransactionsResponse) GetTransactions() []*v1.Transaction
- func (*GetTransactionsResponse) ProtoMessage()
- func (x *GetTransactionsResponse) ProtoReflect() protoreflect.Message
- func (x *GetTransactionsResponse) Reset()
- func (x *GetTransactionsResponse) String() string
- type UnimplementedVaultServiceServer
- func (UnimplementedVaultServiceServer) AddTransaction(context.Context, *AddTransactionRequest) (*AddTransactionResponse, error)
- func (UnimplementedVaultServiceServer) DeleteTransaction(context.Context, *DeleteTransactionRequest) (*DeleteTransactionResponse, error)
- func (UnimplementedVaultServiceServer) GetTransactions(context.Context, *GetTransactionsRequest) (*GetTransactionsResponse, error)
- type UnsafeVaultServiceServer
- type VaultServiceClient
- type VaultServiceServer
Constants ¶
This section is empty.
Variables ¶
var File_services_vault_pb_v1_vault_proto protoreflect.FileDescriptor
Functions ¶
func RegisterVaultServiceServer ¶
func RegisterVaultServiceServer(s grpc.ServiceRegistrar, srv VaultServiceServer)
Types ¶
type AddTransactionRequest ¶
type AddTransactionRequest struct { UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` Asset *v1.Asset `protobuf:"bytes,2,opt,name=asset,proto3" json:"asset,omitempty"` Quantity float64 `protobuf:"fixed64,3,opt,name=quantity,proto3" json:"quantity,omitempty"` Price float64 `protobuf:"fixed64,4,opt,name=price,proto3" json:"price,omitempty"` // in US Dollar ExecutedAt int64 `protobuf:"varint,5,opt,name=executed_at,json=executedAt,proto3" json:"executed_at,omitempty"` // contains filtered or unexported fields }
func (*AddTransactionRequest) Descriptor
deprecated
func (*AddTransactionRequest) Descriptor() ([]byte, []int)
Deprecated: Use AddTransactionRequest.ProtoReflect.Descriptor instead.
func (*AddTransactionRequest) GetAsset ¶
func (x *AddTransactionRequest) GetAsset() *v1.Asset
func (*AddTransactionRequest) GetExecutedAt ¶
func (x *AddTransactionRequest) GetExecutedAt() int64
func (*AddTransactionRequest) GetPrice ¶
func (x *AddTransactionRequest) GetPrice() float64
func (*AddTransactionRequest) GetQuantity ¶
func (x *AddTransactionRequest) GetQuantity() float64
func (*AddTransactionRequest) GetUserId ¶
func (x *AddTransactionRequest) GetUserId() string
func (*AddTransactionRequest) ProtoMessage ¶
func (*AddTransactionRequest) ProtoMessage()
func (*AddTransactionRequest) ProtoReflect ¶
func (x *AddTransactionRequest) ProtoReflect() protoreflect.Message
func (*AddTransactionRequest) Reset ¶
func (x *AddTransactionRequest) Reset()
func (*AddTransactionRequest) String ¶
func (x *AddTransactionRequest) String() string
type AddTransactionResponse ¶
type AddTransactionResponse struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*AddTransactionResponse) Descriptor
deprecated
func (*AddTransactionResponse) Descriptor() ([]byte, []int)
Deprecated: Use AddTransactionResponse.ProtoReflect.Descriptor instead.
func (*AddTransactionResponse) GetId ¶
func (x *AddTransactionResponse) GetId() string
func (*AddTransactionResponse) ProtoMessage ¶
func (*AddTransactionResponse) ProtoMessage()
func (*AddTransactionResponse) ProtoReflect ¶
func (x *AddTransactionResponse) ProtoReflect() protoreflect.Message
func (*AddTransactionResponse) Reset ¶
func (x *AddTransactionResponse) Reset()
func (*AddTransactionResponse) String ¶
func (x *AddTransactionResponse) String() string
type DeleteTransactionRequest ¶
type DeleteTransactionRequest struct { UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` TransactionId string `protobuf:"bytes,2,opt,name=transaction_id,json=transactionId,proto3" json:"transaction_id,omitempty"` // contains filtered or unexported fields }
func (*DeleteTransactionRequest) Descriptor
deprecated
func (*DeleteTransactionRequest) Descriptor() ([]byte, []int)
Deprecated: Use DeleteTransactionRequest.ProtoReflect.Descriptor instead.
func (*DeleteTransactionRequest) GetTransactionId ¶
func (x *DeleteTransactionRequest) GetTransactionId() string
func (*DeleteTransactionRequest) GetUserId ¶
func (x *DeleteTransactionRequest) GetUserId() string
func (*DeleteTransactionRequest) ProtoMessage ¶
func (*DeleteTransactionRequest) ProtoMessage()
func (*DeleteTransactionRequest) ProtoReflect ¶
func (x *DeleteTransactionRequest) ProtoReflect() protoreflect.Message
func (*DeleteTransactionRequest) Reset ¶
func (x *DeleteTransactionRequest) Reset()
func (*DeleteTransactionRequest) String ¶
func (x *DeleteTransactionRequest) String() string
type DeleteTransactionResponse ¶
type DeleteTransactionResponse struct {
// contains filtered or unexported fields
}
func (*DeleteTransactionResponse) Descriptor
deprecated
func (*DeleteTransactionResponse) Descriptor() ([]byte, []int)
Deprecated: Use DeleteTransactionResponse.ProtoReflect.Descriptor instead.
func (*DeleteTransactionResponse) ProtoMessage ¶
func (*DeleteTransactionResponse) ProtoMessage()
func (*DeleteTransactionResponse) ProtoReflect ¶
func (x *DeleteTransactionResponse) ProtoReflect() protoreflect.Message
func (*DeleteTransactionResponse) Reset ¶
func (x *DeleteTransactionResponse) Reset()
func (*DeleteTransactionResponse) String ¶
func (x *DeleteTransactionResponse) String() string
type GetTransactionsRequest ¶
type GetTransactionsRequest struct { UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` // contains filtered or unexported fields }
func (*GetTransactionsRequest) Descriptor
deprecated
func (*GetTransactionsRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetTransactionsRequest.ProtoReflect.Descriptor instead.
func (*GetTransactionsRequest) GetUserId ¶
func (x *GetTransactionsRequest) GetUserId() string
func (*GetTransactionsRequest) ProtoMessage ¶
func (*GetTransactionsRequest) ProtoMessage()
func (*GetTransactionsRequest) ProtoReflect ¶
func (x *GetTransactionsRequest) ProtoReflect() protoreflect.Message
func (*GetTransactionsRequest) Reset ¶
func (x *GetTransactionsRequest) Reset()
func (*GetTransactionsRequest) String ¶
func (x *GetTransactionsRequest) String() string
type GetTransactionsResponse ¶
type GetTransactionsResponse struct { Transactions []*v1.Transaction `protobuf:"bytes,1,rep,name=transactions,proto3" json:"transactions,omitempty"` // contains filtered or unexported fields }
func (*GetTransactionsResponse) Descriptor
deprecated
func (*GetTransactionsResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetTransactionsResponse.ProtoReflect.Descriptor instead.
func (*GetTransactionsResponse) GetTransactions ¶
func (x *GetTransactionsResponse) GetTransactions() []*v1.Transaction
func (*GetTransactionsResponse) ProtoMessage ¶
func (*GetTransactionsResponse) ProtoMessage()
func (*GetTransactionsResponse) ProtoReflect ¶
func (x *GetTransactionsResponse) ProtoReflect() protoreflect.Message
func (*GetTransactionsResponse) Reset ¶
func (x *GetTransactionsResponse) Reset()
func (*GetTransactionsResponse) String ¶
func (x *GetTransactionsResponse) String() string
type UnimplementedVaultServiceServer ¶
type UnimplementedVaultServiceServer struct { }
UnimplementedVaultServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedVaultServiceServer) AddTransaction ¶
func (UnimplementedVaultServiceServer) AddTransaction(context.Context, *AddTransactionRequest) (*AddTransactionResponse, error)
func (UnimplementedVaultServiceServer) DeleteTransaction ¶
func (UnimplementedVaultServiceServer) DeleteTransaction(context.Context, *DeleteTransactionRequest) (*DeleteTransactionResponse, error)
func (UnimplementedVaultServiceServer) GetTransactions ¶
func (UnimplementedVaultServiceServer) GetTransactions(context.Context, *GetTransactionsRequest) (*GetTransactionsResponse, error)
type UnsafeVaultServiceServer ¶
type UnsafeVaultServiceServer interface {
// contains filtered or unexported methods
}
UnsafeVaultServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to VaultServiceServer will result in compilation errors.
type VaultServiceClient ¶
type VaultServiceClient interface { // AddTransaction inserts a new transaction into the vault. AddTransaction(ctx context.Context, in *AddTransactionRequest, opts ...grpc.CallOption) (*AddTransactionResponse, error) // GetTransaction returns all transactions from a user. GetTransactions(ctx context.Context, in *GetTransactionsRequest, opts ...grpc.CallOption) (*GetTransactionsResponse, error) // DeleteTransaction removes a single transaction. DeleteTransaction(ctx context.Context, in *DeleteTransactionRequest, opts ...grpc.CallOption) (*DeleteTransactionResponse, error) }
VaultServiceClient is the client API for VaultService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewVaultServiceClient ¶
func NewVaultServiceClient(cc grpc.ClientConnInterface) VaultServiceClient
type VaultServiceServer ¶
type VaultServiceServer interface { // AddTransaction inserts a new transaction into the vault. AddTransaction(context.Context, *AddTransactionRequest) (*AddTransactionResponse, error) // GetTransaction returns all transactions from a user. GetTransactions(context.Context, *GetTransactionsRequest) (*GetTransactionsResponse, error) // DeleteTransaction removes a single transaction. DeleteTransaction(context.Context, *DeleteTransactionRequest) (*DeleteTransactionResponse, error) // contains filtered or unexported methods }
VaultServiceServer is the server API for VaultService service. All implementations must embed UnimplementedVaultServiceServer for forward compatibility