burnable

package
v0.10.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 28, 2022 License: MIT Imports: 21 Imported by: 0

Documentation

Overview

Package burnable is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
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.

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) Descriptor() ([]byte, []int)

Deprecated: Use Burned.ProtoReflect.Descriptor instead.

func (*Burned) GetAmount

func (x *Burned) GetAmount() uint64

func (*Burned) GetRecipientAddress

func (x *Burned) GetRecipientAddress() string

func (*Burned) GetSenderAddress

func (x *Burned) GetSenderAddress() string

func (*Burned) ProtoMessage

func (*Burned) ProtoMessage()

func (*Burned) ProtoReflect

func (x *Burned) ProtoReflect() protoreflect.Message

func (*Burned) Reset

func (x *Burned) Reset()

func (*Burned) String

func (x *Burned) String() string

func (*Burned) Validate

func (this *Burned) Validate() error

type UnimplementedBurnableServiceServer

type UnimplementedBurnableServiceServer struct {
}

UnimplementedBurnableServiceServer can be embedded to have forward compatible implementations.

func (*UnimplementedBurnableServiceServer) Burn

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL