Documentation ¶
Overview ¶
Package adocv1 is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterAdocServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterAdocServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AdocServiceClient) error
- func RegisterAdocServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterAdocServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server AdocServiceServer) error
- func RegisterAdocServiceServer(s grpc.ServiceRegistrar, srv AdocServiceServer)
- type Adoc
- type AdocServiceClient
- type AdocServiceServer
- type IndexRequest
- type IndexResponse
- type UnimplementedAdocServiceServer
- type UnsafeAdocServiceServer
Constants ¶
This section is empty.
Variables ¶
var AdocService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "adoc.v1.AdocService", HandlerType: (*AdocServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Index", Handler: _AdocService_Index_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "adoc/v1/adoc.proto", }
AdocService_ServiceDesc is the grpc.ServiceDesc for AdocService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_adoc_v1_adoc_proto protoreflect.FileDescriptor
Functions ¶
func RegisterAdocServiceHandler ¶
func RegisterAdocServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterAdocServiceHandler registers the http handlers for service AdocService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterAdocServiceHandlerClient ¶
func RegisterAdocServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AdocServiceClient) error
RegisterAdocServiceHandlerClient registers the http handlers for service AdocService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "AdocServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "AdocServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "AdocServiceClient" to call the correct interceptors.
func RegisterAdocServiceHandlerFromEndpoint ¶
func RegisterAdocServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterAdocServiceHandlerFromEndpoint is same as RegisterAdocServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterAdocServiceHandlerServer ¶
func RegisterAdocServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server AdocServiceServer) error
RegisterAdocServiceHandlerServer registers the http handlers for service AdocService to "mux". UnaryRPC :call AdocServiceServer 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 RegisterAdocServiceHandlerFromEndpoint instead.
func RegisterAdocServiceServer ¶
func RegisterAdocServiceServer(s grpc.ServiceRegistrar, srv AdocServiceServer)
Types ¶
type Adoc ¶
type Adoc struct { Code int64 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` Parent int64 `protobuf:"varint,2,opt,name=parent,proto3" json:"parent,omitempty"` Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` // contains filtered or unexported fields }
func (*Adoc) Descriptor
deprecated
func (*Adoc) ProtoMessage ¶
func (*Adoc) ProtoMessage()
func (*Adoc) ProtoReflect ¶
func (x *Adoc) ProtoReflect() protoreflect.Message
type AdocServiceClient ¶
type AdocServiceClient interface {
Index(ctx context.Context, in *IndexRequest, opts ...grpc.CallOption) (*IndexResponse, error)
}
AdocServiceClient is the client API for AdocService 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 NewAdocServiceClient ¶
func NewAdocServiceClient(cc grpc.ClientConnInterface) AdocServiceClient
type AdocServiceServer ¶
type AdocServiceServer interface { Index(context.Context, *IndexRequest) (*IndexResponse, error) // contains filtered or unexported methods }
AdocServiceServer is the server API for AdocService service. All implementations must embed UnimplementedAdocServiceServer for forward compatibility
type IndexRequest ¶
type IndexRequest struct { Adoc *Adoc `protobuf:"bytes,1,opt,name=adoc,proto3" json:"adoc,omitempty"` // contains filtered or unexported fields }
func (*IndexRequest) Descriptor
deprecated
func (*IndexRequest) Descriptor() ([]byte, []int)
Deprecated: Use IndexRequest.ProtoReflect.Descriptor instead.
func (*IndexRequest) GetAdoc ¶
func (x *IndexRequest) GetAdoc() *Adoc
func (*IndexRequest) ProtoMessage ¶
func (*IndexRequest) ProtoMessage()
func (*IndexRequest) ProtoReflect ¶
func (x *IndexRequest) ProtoReflect() protoreflect.Message
func (*IndexRequest) Reset ¶
func (x *IndexRequest) Reset()
func (*IndexRequest) String ¶
func (x *IndexRequest) String() string
type IndexResponse ¶
type IndexResponse struct { Adocs []*Adoc `protobuf:"bytes,1,rep,name=adocs,proto3" json:"adocs,omitempty"` // contains filtered or unexported fields }
func (*IndexResponse) Descriptor
deprecated
func (*IndexResponse) Descriptor() ([]byte, []int)
Deprecated: Use IndexResponse.ProtoReflect.Descriptor instead.
func (*IndexResponse) GetAdocs ¶
func (x *IndexResponse) GetAdocs() []*Adoc
func (*IndexResponse) ProtoMessage ¶
func (*IndexResponse) ProtoMessage()
func (*IndexResponse) ProtoReflect ¶
func (x *IndexResponse) ProtoReflect() protoreflect.Message
func (*IndexResponse) Reset ¶
func (x *IndexResponse) Reset()
func (*IndexResponse) String ¶
func (x *IndexResponse) String() string
type UnimplementedAdocServiceServer ¶
type UnimplementedAdocServiceServer struct { }
UnimplementedAdocServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedAdocServiceServer) Index ¶
func (UnimplementedAdocServiceServer) Index(context.Context, *IndexRequest) (*IndexResponse, error)
type UnsafeAdocServiceServer ¶
type UnsafeAdocServiceServer interface {
// contains filtered or unexported methods
}
UnsafeAdocServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to AdocServiceServer will result in compilation errors.