Documentation
¶
Overview ¶
Package proto is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterTagServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterTagServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client TagServiceClient) error
- func RegisterTagServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterTagServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server TagServiceServer) error
- func RegisterTagServiceServer(s grpc.ServiceRegistrar, srv TagServiceServer)
- type Error
- type GetTagListReply
- func (*GetTagListReply) Descriptor() ([]byte, []int)deprecated
- func (x *GetTagListReply) GetList() []*Tag
- func (x *GetTagListReply) GetPager() *Pager
- func (*GetTagListReply) ProtoMessage()
- func (x *GetTagListReply) ProtoReflect() protoreflect.Message
- func (x *GetTagListReply) Reset()
- func (x *GetTagListReply) String() string
- type GetTagListRequest
- func (*GetTagListRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetTagListRequest) GetName() string
- func (x *GetTagListRequest) GetState() uint32
- func (*GetTagListRequest) ProtoMessage()
- func (x *GetTagListRequest) ProtoReflect() protoreflect.Message
- func (x *GetTagListRequest) Reset()
- func (x *GetTagListRequest) String() string
- type Pager
- type Tag
- type TagServiceClient
- type TagServiceServer
- type UnimplementedTagServiceServer
- type UnsafeTagServiceServer
Constants ¶
This section is empty.
Variables ¶
var File_proto_common_proto protoreflect.FileDescriptor
var File_proto_tag_proto protoreflect.FileDescriptor
var TagService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "proto.TagService", HandlerType: (*TagServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetTagList", Handler: _TagService_GetTagList_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "proto/tag.proto", }
TagService_ServiceDesc is the grpc.ServiceDesc for TagService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterTagServiceHandler ¶
func RegisterTagServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterTagServiceHandler registers the http handlers for service TagService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterTagServiceHandlerClient ¶
func RegisterTagServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client TagServiceClient) error
RegisterTagServiceHandlerClient registers the http handlers for service TagService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "TagServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "TagServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "TagServiceClient" to call the correct interceptors.
func RegisterTagServiceHandlerFromEndpoint ¶
func RegisterTagServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterTagServiceHandlerFromEndpoint is same as RegisterTagServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterTagServiceHandlerServer ¶
func RegisterTagServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server TagServiceServer) error
RegisterTagServiceHandlerServer registers the http handlers for service TagService to "mux". UnaryRPC :call TagServiceServer 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 RegisterTagServiceHandlerFromEndpoint instead.
func RegisterTagServiceServer ¶
func RegisterTagServiceServer(s grpc.ServiceRegistrar, srv TagServiceServer)
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 GetTagListReply ¶
type GetTagListReply struct { List []*Tag `protobuf:"bytes,1,rep,name=list,proto3" json:"list,omitempty"` Pager *Pager `protobuf:"bytes,2,opt,name=pager,proto3" json:"pager,omitempty"` // contains filtered or unexported fields }
func (*GetTagListReply) Descriptor
deprecated
func (*GetTagListReply) Descriptor() ([]byte, []int)
Deprecated: Use GetTagListReply.ProtoReflect.Descriptor instead.
func (*GetTagListReply) GetList ¶
func (x *GetTagListReply) GetList() []*Tag
func (*GetTagListReply) GetPager ¶
func (x *GetTagListReply) GetPager() *Pager
func (*GetTagListReply) ProtoMessage ¶
func (*GetTagListReply) ProtoMessage()
func (*GetTagListReply) ProtoReflect ¶
func (x *GetTagListReply) ProtoReflect() protoreflect.Message
func (*GetTagListReply) Reset ¶
func (x *GetTagListReply) Reset()
func (*GetTagListReply) String ¶
func (x *GetTagListReply) String() string
type GetTagListRequest ¶
type GetTagListRequest struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` State uint32 `protobuf:"varint,2,opt,name=state,proto3" json:"state,omitempty"` // contains filtered or unexported fields }
func (*GetTagListRequest) Descriptor
deprecated
func (*GetTagListRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetTagListRequest.ProtoReflect.Descriptor instead.
func (*GetTagListRequest) GetName ¶
func (x *GetTagListRequest) GetName() string
func (*GetTagListRequest) GetState ¶
func (x *GetTagListRequest) GetState() uint32
func (*GetTagListRequest) ProtoMessage ¶
func (*GetTagListRequest) ProtoMessage()
func (*GetTagListRequest) ProtoReflect ¶
func (x *GetTagListRequest) ProtoReflect() protoreflect.Message
func (*GetTagListRequest) Reset ¶
func (x *GetTagListRequest) Reset()
func (*GetTagListRequest) String ¶
func (x *GetTagListRequest) 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=page_size,json=pageSize,proto3" json:"page_size,omitempty"` TotalRows int64 `protobuf:"varint,3,opt,name=total_rows,json=totalRows,proto3" json:"total_rows,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 Tag ¶
type Tag struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` State uint32 `protobuf:"varint,3,opt,name=state,proto3" json:"state,omitempty"` // contains filtered or unexported fields }
func (*Tag) Descriptor
deprecated
func (*Tag) ProtoMessage ¶
func (*Tag) ProtoMessage()
func (*Tag) ProtoReflect ¶
func (x *Tag) ProtoReflect() protoreflect.Message
type TagServiceClient ¶
type TagServiceClient interface { //rpc GetTagList (GetTagListRequest) returns (GetTagListReply) {} GetTagList(ctx context.Context, in *GetTagListRequest, opts ...grpc.CallOption) (*GetTagListReply, error) }
TagServiceClient is the client API for TagService 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 NewTagServiceClient ¶
func NewTagServiceClient(cc grpc.ClientConnInterface) TagServiceClient
type TagServiceServer ¶
type TagServiceServer interface { //rpc GetTagList (GetTagListRequest) returns (GetTagListReply) {} GetTagList(context.Context, *GetTagListRequest) (*GetTagListReply, error) // contains filtered or unexported methods }
TagServiceServer is the server API for TagService service. All implementations must embed UnimplementedTagServiceServer for forward compatibility
type UnimplementedTagServiceServer ¶
type UnimplementedTagServiceServer struct { }
UnimplementedTagServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedTagServiceServer) GetTagList ¶
func (UnimplementedTagServiceServer) GetTagList(context.Context, *GetTagListRequest) (*GetTagListReply, error)
type UnsafeTagServiceServer ¶
type UnsafeTagServiceServer interface {
// contains filtered or unexported methods
}
UnsafeTagServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to TagServiceServer will result in compilation errors.