Documentation ¶
Index ¶
- Variables
- func RegisterRPCServiceServer(s *grpc.Server, srv RPCServiceServer)
- type BalanceRequest
- type BalanceResponse
- type ListRequest
- type ListResponse
- type NewAddressRequest
- type NewAddressResponse
- func (*NewAddressResponse) Descriptor() ([]byte, []int)deprecated
- func (x *NewAddressResponse) GetAddress() string
- func (*NewAddressResponse) ProtoMessage()
- func (x *NewAddressResponse) ProtoReflect() protoreflect.Message
- func (x *NewAddressResponse) Reset()
- func (x *NewAddressResponse) String() string
- type RPC
- func (s *RPC) Balance(ctx context.Context, req *BalanceRequest) (*BalanceResponse, error)
- func (s *RPC) List(ctx context.Context, req *ListRequest) (*ListResponse, error)
- func (s *RPC) NewAddress(ctx context.Context, req *NewAddressRequest) (*NewAddressResponse, error)
- func (s *RPC) SendFil(ctx context.Context, req *SendFilRequest) (*SendFilResponse, error)
- type RPCServiceClient
- type RPCServiceServer
- type SendFilRequest
- func (*SendFilRequest) Descriptor() ([]byte, []int)deprecated
- func (x *SendFilRequest) GetAmount() int64
- func (x *SendFilRequest) GetFrom() string
- func (x *SendFilRequest) GetTo() string
- func (*SendFilRequest) ProtoMessage()
- func (x *SendFilRequest) ProtoReflect() protoreflect.Message
- func (x *SendFilRequest) Reset()
- func (x *SendFilRequest) String() string
- type SendFilResponse
- type UnimplementedRPCServiceServer
- func (*UnimplementedRPCServiceServer) Balance(context.Context, *BalanceRequest) (*BalanceResponse, error)
- func (*UnimplementedRPCServiceServer) List(context.Context, *ListRequest) (*ListResponse, error)
- func (*UnimplementedRPCServiceServer) NewAddress(context.Context, *NewAddressRequest) (*NewAddressResponse, error)
- func (*UnimplementedRPCServiceServer) SendFil(context.Context, *SendFilRequest) (*SendFilResponse, error)
Constants ¶
This section is empty.
Variables ¶
var File_wallet_rpc_rpc_proto protoreflect.FileDescriptor
Functions ¶
func RegisterRPCServiceServer ¶
func RegisterRPCServiceServer(s *grpc.Server, srv RPCServiceServer)
Types ¶
type BalanceRequest ¶ added in v0.1.1
type BalanceRequest struct { Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` // contains filtered or unexported fields }
func (*BalanceRequest) Descriptor
deprecated
added in
v0.1.1
func (*BalanceRequest) Descriptor() ([]byte, []int)
Deprecated: Use BalanceRequest.ProtoReflect.Descriptor instead.
func (*BalanceRequest) GetAddress ¶ added in v0.1.1
func (x *BalanceRequest) GetAddress() string
func (*BalanceRequest) ProtoMessage ¶ added in v0.1.1
func (*BalanceRequest) ProtoMessage()
func (*BalanceRequest) ProtoReflect ¶ added in v0.1.1
func (x *BalanceRequest) ProtoReflect() protoreflect.Message
func (*BalanceRequest) Reset ¶ added in v0.1.1
func (x *BalanceRequest) Reset()
func (*BalanceRequest) String ¶ added in v0.1.1
func (x *BalanceRequest) String() string
type BalanceResponse ¶ added in v0.1.1
type BalanceResponse struct { Balance uint64 `protobuf:"varint,1,opt,name=balance,proto3" json:"balance,omitempty"` // contains filtered or unexported fields }
func (*BalanceResponse) Descriptor
deprecated
added in
v0.1.1
func (*BalanceResponse) Descriptor() ([]byte, []int)
Deprecated: Use BalanceResponse.ProtoReflect.Descriptor instead.
func (*BalanceResponse) GetBalance ¶ added in v0.1.1
func (x *BalanceResponse) GetBalance() uint64
func (*BalanceResponse) ProtoMessage ¶ added in v0.1.1
func (*BalanceResponse) ProtoMessage()
func (*BalanceResponse) ProtoReflect ¶ added in v0.1.1
func (x *BalanceResponse) ProtoReflect() protoreflect.Message
func (*BalanceResponse) Reset ¶ added in v0.1.1
func (x *BalanceResponse) Reset()
func (*BalanceResponse) String ¶ added in v0.1.1
func (x *BalanceResponse) String() string
type ListRequest ¶
type ListRequest struct { Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` // contains filtered or unexported fields }
func (*ListRequest) Descriptor
deprecated
func (*ListRequest) Descriptor() ([]byte, []int)
Deprecated: Use ListRequest.ProtoReflect.Descriptor instead.
func (*ListRequest) GetType ¶
func (x *ListRequest) GetType() string
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 { Addresses []string `protobuf:"bytes,1,rep,name=addresses,proto3" json:"addresses,omitempty"` // contains filtered or unexported fields }
func (*ListResponse) Descriptor
deprecated
func (*ListResponse) Descriptor() ([]byte, []int)
Deprecated: Use ListResponse.ProtoReflect.Descriptor instead.
func (*ListResponse) GetAddresses ¶
func (x *ListResponse) GetAddresses() []string
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 NewAddressRequest ¶
type NewAddressRequest struct { Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` // contains filtered or unexported fields }
func (*NewAddressRequest) Descriptor
deprecated
func (*NewAddressRequest) Descriptor() ([]byte, []int)
Deprecated: Use NewAddressRequest.ProtoReflect.Descriptor instead.
func (*NewAddressRequest) GetType ¶
func (x *NewAddressRequest) GetType() string
func (*NewAddressRequest) ProtoMessage ¶
func (*NewAddressRequest) ProtoMessage()
func (*NewAddressRequest) ProtoReflect ¶
func (x *NewAddressRequest) ProtoReflect() protoreflect.Message
func (*NewAddressRequest) Reset ¶
func (x *NewAddressRequest) Reset()
func (*NewAddressRequest) String ¶
func (x *NewAddressRequest) String() string
type NewAddressResponse ¶
type NewAddressResponse struct { Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` // contains filtered or unexported fields }
func (*NewAddressResponse) Descriptor
deprecated
func (*NewAddressResponse) Descriptor() ([]byte, []int)
Deprecated: Use NewAddressResponse.ProtoReflect.Descriptor instead.
func (*NewAddressResponse) GetAddress ¶
func (x *NewAddressResponse) GetAddress() string
func (*NewAddressResponse) ProtoMessage ¶
func (*NewAddressResponse) ProtoMessage()
func (*NewAddressResponse) ProtoReflect ¶
func (x *NewAddressResponse) ProtoReflect() protoreflect.Message
func (*NewAddressResponse) Reset ¶
func (x *NewAddressResponse) Reset()
func (*NewAddressResponse) String ¶
func (x *NewAddressResponse) String() string
type RPC ¶
type RPC struct { UnimplementedRPCServiceServer Module wallet.Module }
RPC implements the gprc service.
func (*RPC) Balance ¶ added in v0.1.1
func (s *RPC) Balance(ctx context.Context, req *BalanceRequest) (*BalanceResponse, error)
Balance checks a wallet balance.
func (*RPC) List ¶
func (s *RPC) List(ctx context.Context, req *ListRequest) (*ListResponse, error)
List returns all wallet addresses.
func (*RPC) NewAddress ¶
func (s *RPC) NewAddress(ctx context.Context, req *NewAddressRequest) (*NewAddressResponse, error)
NewAddress creates a new wallet.
func (*RPC) SendFil ¶ added in v0.1.1
func (s *RPC) SendFil(ctx context.Context, req *SendFilRequest) (*SendFilResponse, error)
SendFil calls wallet.SendFil.
type RPCServiceClient ¶
type RPCServiceClient interface { NewAddress(ctx context.Context, in *NewAddressRequest, opts ...grpc.CallOption) (*NewAddressResponse, error) List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ListResponse, error) Balance(ctx context.Context, in *BalanceRequest, opts ...grpc.CallOption) (*BalanceResponse, error) SendFil(ctx context.Context, in *SendFilRequest, opts ...grpc.CallOption) (*SendFilResponse, error) }
RPCServiceClient is the client API for RPCService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewRPCServiceClient ¶
func NewRPCServiceClient(cc grpc.ClientConnInterface) RPCServiceClient
type RPCServiceServer ¶
type RPCServiceServer interface { NewAddress(context.Context, *NewAddressRequest) (*NewAddressResponse, error) List(context.Context, *ListRequest) (*ListResponse, error) Balance(context.Context, *BalanceRequest) (*BalanceResponse, error) SendFil(context.Context, *SendFilRequest) (*SendFilResponse, error) }
RPCServiceServer is the server API for RPCService service.
type SendFilRequest ¶ added in v0.1.1
type SendFilRequest struct { From string `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"` To string `protobuf:"bytes,2,opt,name=to,proto3" json:"to,omitempty"` Amount int64 `protobuf:"varint,3,opt,name=amount,proto3" json:"amount,omitempty"` // contains filtered or unexported fields }
func (*SendFilRequest) Descriptor
deprecated
added in
v0.1.1
func (*SendFilRequest) Descriptor() ([]byte, []int)
Deprecated: Use SendFilRequest.ProtoReflect.Descriptor instead.
func (*SendFilRequest) GetAmount ¶ added in v0.1.1
func (x *SendFilRequest) GetAmount() int64
func (*SendFilRequest) GetFrom ¶ added in v0.1.1
func (x *SendFilRequest) GetFrom() string
func (*SendFilRequest) GetTo ¶ added in v0.1.1
func (x *SendFilRequest) GetTo() string
func (*SendFilRequest) ProtoMessage ¶ added in v0.1.1
func (*SendFilRequest) ProtoMessage()
func (*SendFilRequest) ProtoReflect ¶ added in v0.1.1
func (x *SendFilRequest) ProtoReflect() protoreflect.Message
func (*SendFilRequest) Reset ¶ added in v0.1.1
func (x *SendFilRequest) Reset()
func (*SendFilRequest) String ¶ added in v0.1.1
func (x *SendFilRequest) String() string
type SendFilResponse ¶ added in v0.1.1
type SendFilResponse struct {
// contains filtered or unexported fields
}
func (*SendFilResponse) Descriptor
deprecated
added in
v0.1.1
func (*SendFilResponse) Descriptor() ([]byte, []int)
Deprecated: Use SendFilResponse.ProtoReflect.Descriptor instead.
func (*SendFilResponse) ProtoMessage ¶ added in v0.1.1
func (*SendFilResponse) ProtoMessage()
func (*SendFilResponse) ProtoReflect ¶ added in v0.1.1
func (x *SendFilResponse) ProtoReflect() protoreflect.Message
func (*SendFilResponse) Reset ¶ added in v0.1.1
func (x *SendFilResponse) Reset()
func (*SendFilResponse) String ¶ added in v0.1.1
func (x *SendFilResponse) String() string
type UnimplementedRPCServiceServer ¶
type UnimplementedRPCServiceServer struct { }
UnimplementedRPCServiceServer can be embedded to have forward compatible implementations.
func (*UnimplementedRPCServiceServer) Balance ¶ added in v0.1.1
func (*UnimplementedRPCServiceServer) Balance(context.Context, *BalanceRequest) (*BalanceResponse, error)
func (*UnimplementedRPCServiceServer) List ¶
func (*UnimplementedRPCServiceServer) List(context.Context, *ListRequest) (*ListResponse, error)
func (*UnimplementedRPCServiceServer) NewAddress ¶
func (*UnimplementedRPCServiceServer) NewAddress(context.Context, *NewAddressRequest) (*NewAddressResponse, error)
func (*UnimplementedRPCServiceServer) SendFil ¶ added in v0.1.1
func (*UnimplementedRPCServiceServer) SendFil(context.Context, *SendFilRequest) (*SendFilResponse, error)