entry

package
v0.7.3-0...-afa7ed7 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2021 License: MIT Imports: 23 Imported by: 0

Documentation

Overview

Package entry is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
var File_entry_proto protoreflect.FileDescriptor

Functions

func NewEntryServiceDesc

func NewEntryServiceDesc(i EntryServer) transport.ServiceDesc

func RegisterEntryHandler

func RegisterEntryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterEntryHandler registers the http handlers for service Entry to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterEntryHandlerClient

func RegisterEntryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client EntryClient) error

RegisterEntryHandlerClient registers the http handlers for service Entry to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "EntryClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "EntryClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "EntryClient" to call the correct interceptors.

func RegisterEntryHandlerFromEndpoint

func RegisterEntryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterEntryHandlerFromEndpoint is same as RegisterEntryHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterEntryHandlerServer

func RegisterEntryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server EntryServer) error

RegisterEntryHandlerServer registers the http handlers for service Entry to "mux". UnaryRPC :call EntryServer 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 RegisterEntryHandlerFromEndpoint instead.

func RegisterEntryServer

func RegisterEntryServer(s *grpc.Server, srv EntryServer)

Types

type EntryClient

type EntryClient interface {
	List(ctx context.Context, in *ListReq, opts ...grpc.CallOption) (*ListResp, error)
}

EntryClient is the client API for Entry 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 NewEntryClient

func NewEntryClient(cc grpc.ClientConnInterface) EntryClient

type EntryServer

type EntryServer interface {
	List(context.Context, *ListReq) (*ListResp, error)
	// contains filtered or unexported methods
}

EntryServer is the server API for Entry service. All implementations must embed UnimplementedEntryServer for forward compatibility

type EntryServiceDesc

type EntryServiceDesc struct {
	// contains filtered or unexported fields
}

EntryServiceDesc is description for the EntryServer.

func (*EntryServiceDesc) RegisterGRPC

func (d *EntryServiceDesc) RegisterGRPC(s *grpc.Server)

func (*EntryServiceDesc) RegisterHTTP

func (d *EntryServiceDesc) RegisterHTTP(mux *runtime.ServeMux)

func (*EntryServiceDesc) SwaggerDef

func (d *EntryServiceDesc) SwaggerDef() []byte

type ListReq

type ListReq struct {
	Params []*QueryParam `protobuf:"bytes,1,rep,name=params,proto3" json:"params,omitempty"`
	Limit  int64         `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"`
	Offset int64         `protobuf:"varint,3,opt,name=offset,proto3" json:"offset,omitempty"`
	// contains filtered or unexported fields
}

func (*ListReq) Descriptor deprecated

func (*ListReq) Descriptor() ([]byte, []int)

Deprecated: Use ListReq.ProtoReflect.Descriptor instead.

func (*ListReq) GetLimit

func (x *ListReq) GetLimit() int64

func (*ListReq) GetOffset

func (x *ListReq) GetOffset() int64

func (*ListReq) GetParams

func (x *ListReq) GetParams() []*QueryParam

func (*ListReq) ProtoMessage

func (*ListReq) ProtoMessage()

func (*ListReq) ProtoReflect

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

func (*ListReq) Reset

func (x *ListReq) Reset()

func (*ListReq) String

func (x *ListReq) String() string

func (*ListReq) Validate

func (m *ListReq) Validate() error

type ListResp

type ListResp struct {
	Data json.RawMessage `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` // tron_option:json
	// contains filtered or unexported fields
}

func (*ListResp) Descriptor deprecated

func (*ListResp) Descriptor() ([]byte, []int)

Deprecated: Use ListResp.ProtoReflect.Descriptor instead.

func (*ListResp) GetData

func (x *ListResp) GetData() []byte

func (*ListResp) ProtoMessage

func (*ListResp) ProtoMessage()

func (*ListResp) ProtoReflect

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

func (*ListResp) Reset

func (x *ListResp) Reset()

func (*ListResp) String

func (x *ListResp) String() string

type ParamValue

type ParamValue struct {
	Item string   `protobuf:"bytes,1,opt,name=item,proto3" json:"item,omitempty"`
	List []string `protobuf:"bytes,2,rep,name=list,proto3" json:"list,omitempty"`
	// contains filtered or unexported fields
}

func (*ParamValue) Descriptor deprecated

func (*ParamValue) Descriptor() ([]byte, []int)

Deprecated: Use ParamValue.ProtoReflect.Descriptor instead.

func (*ParamValue) GetItem

func (x *ParamValue) GetItem() string

func (*ParamValue) GetList

func (x *ParamValue) GetList() []string

func (*ParamValue) IsEmpty

func (m *ParamValue) IsEmpty() bool

func (*ParamValue) ProtoMessage

func (*ParamValue) ProtoMessage()

func (*ParamValue) ProtoReflect

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

func (*ParamValue) Reset

func (x *ParamValue) Reset()

func (*ParamValue) String

func (x *ParamValue) String() string

func (*ParamValue) Validate

func (m *ParamValue) Validate() error

type QueryParam

type QueryParam struct {
	Type     string      `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
	Key      string      `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
	Value    *ParamValue `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"`
	Operator string      `protobuf:"bytes,4,opt,name=operator,proto3" json:"operator,omitempty"`
	// contains filtered or unexported fields
}

func (*QueryParam) Descriptor deprecated

func (*QueryParam) Descriptor() ([]byte, []int)

Deprecated: Use QueryParam.ProtoReflect.Descriptor instead.

func (*QueryParam) GetKey

func (x *QueryParam) GetKey() string

func (*QueryParam) GetOperator

func (x *QueryParam) GetOperator() string

func (*QueryParam) GetType

func (x *QueryParam) GetType() string

func (*QueryParam) GetValue

func (x *QueryParam) GetValue() *ParamValue

func (*QueryParam) ProtoMessage

func (*QueryParam) ProtoMessage()

func (*QueryParam) ProtoReflect

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

func (*QueryParam) Reset

func (x *QueryParam) Reset()

func (*QueryParam) String

func (x *QueryParam) String() string

func (*QueryParam) Validate

func (m *QueryParam) Validate() error

type UnimplementedEntryServer

type UnimplementedEntryServer struct {
}

UnimplementedEntryServer must be embedded to have forward compatible implementations.

func (UnimplementedEntryServer) List

type UnsafeEntryServer

type UnsafeEntryServer interface {
	// contains filtered or unexported methods
}

UnsafeEntryServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to EntryServer will result in compilation errors.

Jump to

Keyboard shortcuts

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