Documentation
¶
Overview ¶
Package trxv1 is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterTrxServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterTrxServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client TrxServiceClient) error
- func RegisterTrxServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterTrxServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server TrxServiceServer) error
- func RegisterTrxServiceServer(s grpc.ServiceRegistrar, srv TrxServiceServer)
- type Error
- type GetTRC20TokenBalanceReply
- func (*GetTRC20TokenBalanceReply) Descriptor() ([]byte, []int)deprecated
- func (x *GetTRC20TokenBalanceReply) GetBalance() string
- func (x *GetTRC20TokenBalanceReply) GetToken() string
- func (*GetTRC20TokenBalanceReply) ProtoMessage()
- func (x *GetTRC20TokenBalanceReply) ProtoReflect() protoreflect.Message
- func (x *GetTRC20TokenBalanceReply) Reset()
- func (x *GetTRC20TokenBalanceReply) String() string
- type GetTRC20TokenBalanceRequest
- func (*GetTRC20TokenBalanceRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetTRC20TokenBalanceRequest) GetAddress() string
- func (x *GetTRC20TokenBalanceRequest) GetToken() string
- func (*GetTRC20TokenBalanceRequest) ProtoMessage()
- func (x *GetTRC20TokenBalanceRequest) ProtoReflect() protoreflect.Message
- func (x *GetTRC20TokenBalanceRequest) Reset()
- func (x *GetTRC20TokenBalanceRequest) String() string
- type GetTrxBalanceReply
- func (*GetTrxBalanceReply) Descriptor() ([]byte, []int)deprecated
- func (x *GetTrxBalanceReply) GetBalance() string
- func (*GetTrxBalanceReply) ProtoMessage()
- func (x *GetTrxBalanceReply) ProtoReflect() protoreflect.Message
- func (x *GetTrxBalanceReply) Reset()
- func (x *GetTrxBalanceReply) String() string
- type GetTrxBalanceRequest
- func (*GetTrxBalanceRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetTrxBalanceRequest) GetAddress() string
- func (*GetTrxBalanceRequest) ProtoMessage()
- func (x *GetTrxBalanceRequest) ProtoReflect() protoreflect.Message
- func (x *GetTrxBalanceRequest) Reset()
- func (x *GetTrxBalanceRequest) String() string
- type Pager
- type TrxServiceClient
- type TrxServiceServer
- type UnimplementedTrxServiceServer
- type UnsafeTrxServiceServer
Constants ¶
This section is empty.
Variables ¶
var File_common_proto protoreflect.FileDescriptor
var File_trx_proto protoreflect.FileDescriptor
var TrxService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "trxv1.TrxService", HandlerType: (*TrxServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetTrxBalance", Handler: _TrxService_GetTrxBalance_Handler, }, { MethodName: "GetTRC20TokenBalance", Handler: _TrxService_GetTRC20TokenBalance_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "trx.proto", }
TrxService_ServiceDesc is the grpc.ServiceDesc for TrxService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterTrxServiceHandler ¶
func RegisterTrxServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterTrxServiceHandler registers the http handlers for service TrxService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterTrxServiceHandlerClient ¶
func RegisterTrxServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client TrxServiceClient) error
RegisterTrxServiceHandlerClient registers the http handlers for service TrxService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "TrxServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "TrxServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "TrxServiceClient" to call the correct interceptors.
func RegisterTrxServiceHandlerFromEndpoint ¶
func RegisterTrxServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterTrxServiceHandlerFromEndpoint is same as RegisterTrxServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterTrxServiceHandlerServer ¶
func RegisterTrxServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server TrxServiceServer) error
RegisterTrxServiceHandlerServer registers the http handlers for service TrxService to "mux". UnaryRPC :call TrxServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
func RegisterTrxServiceServer ¶
func RegisterTrxServiceServer(s grpc.ServiceRegistrar, srv TrxServiceServer)
Types ¶
type Error ¶
type Error struct { Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` Detail *anypb.Any `protobuf:"bytes,3,opt,name=detail,proto3" json:"detail,omitempty"` // contains filtered or unexported fields }
func (*Error) Descriptor
deprecated
func (*Error) GetMessage ¶
func (*Error) ProtoMessage ¶
func (*Error) ProtoMessage()
func (*Error) ProtoReflect ¶
func (x *Error) ProtoReflect() protoreflect.Message
type GetTRC20TokenBalanceReply ¶
type GetTRC20TokenBalanceReply struct { Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` Balance string `protobuf:"bytes,2,opt,name=balance,proto3" json:"balance,omitempty"` // contains filtered or unexported fields }
func (*GetTRC20TokenBalanceReply) Descriptor
deprecated
func (*GetTRC20TokenBalanceReply) Descriptor() ([]byte, []int)
Deprecated: Use GetTRC20TokenBalanceReply.ProtoReflect.Descriptor instead.
func (*GetTRC20TokenBalanceReply) GetBalance ¶
func (x *GetTRC20TokenBalanceReply) GetBalance() string
func (*GetTRC20TokenBalanceReply) GetToken ¶
func (x *GetTRC20TokenBalanceReply) GetToken() string
func (*GetTRC20TokenBalanceReply) ProtoMessage ¶
func (*GetTRC20TokenBalanceReply) ProtoMessage()
func (*GetTRC20TokenBalanceReply) ProtoReflect ¶
func (x *GetTRC20TokenBalanceReply) ProtoReflect() protoreflect.Message
func (*GetTRC20TokenBalanceReply) Reset ¶
func (x *GetTRC20TokenBalanceReply) Reset()
func (*GetTRC20TokenBalanceReply) String ¶
func (x *GetTRC20TokenBalanceReply) String() string
type GetTRC20TokenBalanceRequest ¶
type GetTRC20TokenBalanceRequest struct { Token string `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"` Address string `protobuf:"bytes,3,opt,name=address,proto3" json:"address,omitempty"` // contains filtered or unexported fields }
func (*GetTRC20TokenBalanceRequest) Descriptor
deprecated
func (*GetTRC20TokenBalanceRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetTRC20TokenBalanceRequest.ProtoReflect.Descriptor instead.
func (*GetTRC20TokenBalanceRequest) GetAddress ¶
func (x *GetTRC20TokenBalanceRequest) GetAddress() string
func (*GetTRC20TokenBalanceRequest) GetToken ¶
func (x *GetTRC20TokenBalanceRequest) GetToken() string
func (*GetTRC20TokenBalanceRequest) ProtoMessage ¶
func (*GetTRC20TokenBalanceRequest) ProtoMessage()
func (*GetTRC20TokenBalanceRequest) ProtoReflect ¶
func (x *GetTRC20TokenBalanceRequest) ProtoReflect() protoreflect.Message
func (*GetTRC20TokenBalanceRequest) Reset ¶
func (x *GetTRC20TokenBalanceRequest) Reset()
func (*GetTRC20TokenBalanceRequest) String ¶
func (x *GetTRC20TokenBalanceRequest) String() string
type GetTrxBalanceReply ¶
type GetTrxBalanceReply struct { Balance string `protobuf:"bytes,1,opt,name=balance,proto3" json:"balance,omitempty"` // contains filtered or unexported fields }
func (*GetTrxBalanceReply) Descriptor
deprecated
func (*GetTrxBalanceReply) Descriptor() ([]byte, []int)
Deprecated: Use GetTrxBalanceReply.ProtoReflect.Descriptor instead.
func (*GetTrxBalanceReply) GetBalance ¶
func (x *GetTrxBalanceReply) GetBalance() string
func (*GetTrxBalanceReply) ProtoMessage ¶
func (*GetTrxBalanceReply) ProtoMessage()
func (*GetTrxBalanceReply) ProtoReflect ¶
func (x *GetTrxBalanceReply) ProtoReflect() protoreflect.Message
func (*GetTrxBalanceReply) Reset ¶
func (x *GetTrxBalanceReply) Reset()
func (*GetTrxBalanceReply) String ¶
func (x *GetTrxBalanceReply) String() string
type GetTrxBalanceRequest ¶
type GetTrxBalanceRequest struct { Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` // contains filtered or unexported fields }
func (*GetTrxBalanceRequest) Descriptor
deprecated
func (*GetTrxBalanceRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetTrxBalanceRequest.ProtoReflect.Descriptor instead.
func (*GetTrxBalanceRequest) GetAddress ¶
func (x *GetTrxBalanceRequest) GetAddress() string
func (*GetTrxBalanceRequest) ProtoMessage ¶
func (*GetTrxBalanceRequest) ProtoMessage()
func (*GetTrxBalanceRequest) ProtoReflect ¶
func (x *GetTrxBalanceRequest) ProtoReflect() protoreflect.Message
func (*GetTrxBalanceRequest) Reset ¶
func (x *GetTrxBalanceRequest) Reset()
func (*GetTrxBalanceRequest) String ¶
func (x *GetTrxBalanceRequest) String() string
type Pager ¶
type Pager struct { Page int64 `protobuf:"varint,1,opt,name=page,proto3" json:"page,omitempty"` PageSize int64 `protobuf:"varint,2,opt,name=pageSize,proto3" json:"pageSize,omitempty"` TotalRows int64 `protobuf:"varint,3,opt,name=totalRows,proto3" json:"totalRows,omitempty"` // contains filtered or unexported fields }
func (*Pager) Descriptor
deprecated
func (*Pager) GetPageSize ¶
func (*Pager) GetTotalRows ¶
func (*Pager) ProtoMessage ¶
func (*Pager) ProtoMessage()
func (*Pager) ProtoReflect ¶
func (x *Pager) ProtoReflect() protoreflect.Message
type TrxServiceClient ¶
type TrxServiceClient interface { GetTrxBalance(ctx context.Context, in *GetTrxBalanceRequest, opts ...grpc.CallOption) (*GetTrxBalanceReply, error) GetTRC20TokenBalance(ctx context.Context, in *GetTRC20TokenBalanceRequest, opts ...grpc.CallOption) (*GetTRC20TokenBalanceReply, error) }
TrxServiceClient is the client API for TrxService 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 NewTrxServiceClient ¶
func NewTrxServiceClient(cc grpc.ClientConnInterface) TrxServiceClient
type TrxServiceServer ¶
type TrxServiceServer interface { GetTrxBalance(context.Context, *GetTrxBalanceRequest) (*GetTrxBalanceReply, error) GetTRC20TokenBalance(context.Context, *GetTRC20TokenBalanceRequest) (*GetTRC20TokenBalanceReply, error) // contains filtered or unexported methods }
TrxServiceServer is the server API for TrxService service. All implementations must embed UnimplementedTrxServiceServer for forward compatibility
type UnimplementedTrxServiceServer ¶
type UnimplementedTrxServiceServer struct { }
UnimplementedTrxServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedTrxServiceServer) GetTRC20TokenBalance ¶
func (UnimplementedTrxServiceServer) GetTRC20TokenBalance(context.Context, *GetTRC20TokenBalanceRequest) (*GetTRC20TokenBalanceReply, error)
func (UnimplementedTrxServiceServer) GetTrxBalance ¶
func (UnimplementedTrxServiceServer) GetTrxBalance(context.Context, *GetTrxBalanceRequest) (*GetTrxBalanceReply, error)
type UnsafeTrxServiceServer ¶
type UnsafeTrxServiceServer interface {
// contains filtered or unexported methods
}
UnsafeTrxServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to TrxServiceServer will result in compilation errors.