Documentation ¶
Overview ¶
Package burnable is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterBurnableServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterBurnableServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client BurnableServiceClient) error
- func RegisterBurnableServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterBurnableServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server BurnableServiceServer) error
- func RegisterBurnableServiceServer(s *grpc.Server, srv BurnableServiceServer)
- type BurnRequest
- func (*BurnRequest) Descriptor() ([]byte, []int)deprecated
- func (x *BurnRequest) GetAddress() string
- func (x *BurnRequest) GetAmount() uint64
- func (x *BurnRequest) GetToken() string
- func (*BurnRequest) ProtoMessage()
- func (x *BurnRequest) ProtoReflect() protoreflect.Message
- func (x *BurnRequest) Reset()
- func (x *BurnRequest) String() string
- func (this *BurnRequest) Validate() error
- type BurnResponse
- func (*BurnResponse) Descriptor() ([]byte, []int)deprecated
- func (x *BurnResponse) GetAmount() uint64
- func (x *BurnResponse) GetRecipientAddress() string
- func (x *BurnResponse) GetSenderAddress() string
- func (x *BurnResponse) GetToken() string
- func (*BurnResponse) ProtoMessage()
- func (x *BurnResponse) ProtoReflect() protoreflect.Message
- func (x *BurnResponse) Reset()
- func (x *BurnResponse) String() string
- func (this *BurnResponse) Validate() error
- type BurnableServiceClient
- type BurnableServiceServer
- type Burned
- func (*Burned) Descriptor() ([]byte, []int)deprecated
- func (x *Burned) GetAmount() uint64
- func (x *Burned) GetRecipientAddress() string
- func (x *Burned) GetSenderAddress() string
- func (*Burned) ProtoMessage()
- func (x *Burned) ProtoReflect() protoreflect.Message
- func (x *Burned) Reset()
- func (x *Burned) String() string
- func (this *Burned) Validate() error
- type UnimplementedBurnableServiceServer
Constants ¶
This section is empty.
Variables ¶
var File_token_service_burnable_burnable_proto protoreflect.FileDescriptor
Functions ¶
func RegisterBurnableServiceHandler ¶
func RegisterBurnableServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterBurnableServiceHandler registers the http handlers for service BurnableService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterBurnableServiceHandlerClient ¶
func RegisterBurnableServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client BurnableServiceClient) error
RegisterBurnableServiceHandlerClient registers the http handlers for service BurnableService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "BurnableServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "BurnableServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "BurnableServiceClient" to call the correct interceptors.
func RegisterBurnableServiceHandlerFromEndpoint ¶
func RegisterBurnableServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterBurnableServiceHandlerFromEndpoint is same as RegisterBurnableServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterBurnableServiceHandlerServer ¶
func RegisterBurnableServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server BurnableServiceServer) error
RegisterBurnableServiceHandlerServer registers the http handlers for service BurnableService to "mux". UnaryRPC :call BurnableServiceServer 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 RegisterBurnableServiceHandlerFromEndpoint instead.
func RegisterBurnableServiceServer ¶
func RegisterBurnableServiceServer(s *grpc.Server, srv BurnableServiceServer)
Types ¶
type BurnRequest ¶
type BurnRequest struct { Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` Token string `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"` Amount uint64 `protobuf:"varint,3,opt,name=amount,proto3" json:"amount,omitempty"` // contains filtered or unexported fields }
func (*BurnRequest) Descriptor
deprecated
func (*BurnRequest) Descriptor() ([]byte, []int)
Deprecated: Use BurnRequest.ProtoReflect.Descriptor instead.
func (*BurnRequest) GetAddress ¶
func (x *BurnRequest) GetAddress() string
func (*BurnRequest) GetAmount ¶
func (x *BurnRequest) GetAmount() uint64
func (*BurnRequest) GetToken ¶
func (x *BurnRequest) GetToken() string
func (*BurnRequest) ProtoMessage ¶
func (*BurnRequest) ProtoMessage()
func (*BurnRequest) ProtoReflect ¶
func (x *BurnRequest) ProtoReflect() protoreflect.Message
func (*BurnRequest) Reset ¶
func (x *BurnRequest) Reset()
func (*BurnRequest) String ¶
func (x *BurnRequest) String() string
func (*BurnRequest) Validate ¶
func (this *BurnRequest) Validate() error
type BurnResponse ¶
type BurnResponse struct { SenderAddress string `protobuf:"bytes,1,opt,name=sender_address,json=senderAddress,proto3" json:"sender_address,omitempty"` RecipientAddress string `protobuf:"bytes,2,opt,name=recipient_address,json=recipientAddress,proto3" json:"recipient_address,omitempty"` Token string `protobuf:"bytes,3,opt,name=token,proto3" json:"token,omitempty"` Amount uint64 `protobuf:"varint,4,opt,name=amount,proto3" json:"amount,omitempty"` // contains filtered or unexported fields }
func (*BurnResponse) Descriptor
deprecated
func (*BurnResponse) Descriptor() ([]byte, []int)
Deprecated: Use BurnResponse.ProtoReflect.Descriptor instead.
func (*BurnResponse) GetAmount ¶
func (x *BurnResponse) GetAmount() uint64
func (*BurnResponse) GetRecipientAddress ¶
func (x *BurnResponse) GetRecipientAddress() string
func (*BurnResponse) GetSenderAddress ¶
func (x *BurnResponse) GetSenderAddress() string
func (*BurnResponse) GetToken ¶
func (x *BurnResponse) GetToken() string
func (*BurnResponse) ProtoMessage ¶
func (*BurnResponse) ProtoMessage()
func (*BurnResponse) ProtoReflect ¶
func (x *BurnResponse) ProtoReflect() protoreflect.Message
func (*BurnResponse) Reset ¶
func (x *BurnResponse) Reset()
func (*BurnResponse) String ¶
func (x *BurnResponse) String() string
func (*BurnResponse) Validate ¶
func (this *BurnResponse) Validate() error
type BurnableServiceClient ¶
type BurnableServiceClient interface {
Burn(ctx context.Context, in *BurnRequest, opts ...grpc.CallOption) (*BurnResponse, error)
}
BurnableServiceClient is the client API for BurnableService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewBurnableServiceClient ¶
func NewBurnableServiceClient(cc grpc.ClientConnInterface) BurnableServiceClient
type BurnableServiceServer ¶
type BurnableServiceServer interface {
Burn(context.Context, *BurnRequest) (*BurnResponse, error)
}
BurnableServiceServer is the server API for BurnableService service.
type Burned ¶
type Burned struct { SenderAddress string `protobuf:"bytes,1,opt,name=sender_address,json=senderAddress,proto3" json:"sender_address,omitempty"` RecipientAddress string `protobuf:"bytes,2,opt,name=recipient_address,json=recipientAddress,proto3" json:"recipient_address,omitempty"` Amount uint64 `protobuf:"varint,3,opt,name=amount,proto3" json:"amount,omitempty"` // contains filtered or unexported fields }
Burned event is emitted when Transfer method has been invoked
func (*Burned) Descriptor
deprecated
func (*Burned) GetRecipientAddress ¶
func (*Burned) GetSenderAddress ¶
func (*Burned) ProtoMessage ¶
func (*Burned) ProtoMessage()
func (*Burned) ProtoReflect ¶
func (x *Burned) ProtoReflect() protoreflect.Message
type UnimplementedBurnableServiceServer ¶
type UnimplementedBurnableServiceServer struct { }
UnimplementedBurnableServiceServer can be embedded to have forward compatible implementations.
func (*UnimplementedBurnableServiceServer) Burn ¶
func (*UnimplementedBurnableServiceServer) Burn(context.Context, *BurnRequest) (*BurnResponse, error)