adocv1

package
v0.0.0-...-8e4247c Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2021 License: MIT Imports: 17 Imported by: 0

Documentation

Overview

Package adocv1 is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

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

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

Deprecated: Use Adoc.ProtoReflect.Descriptor instead.

func (*Adoc) GetCode

func (x *Adoc) GetCode() int64

func (*Adoc) GetName

func (x *Adoc) GetName() string

func (*Adoc) GetParent

func (x *Adoc) GetParent() int64

func (*Adoc) ProtoMessage

func (*Adoc) ProtoMessage()

func (*Adoc) ProtoReflect

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

func (*Adoc) Reset

func (x *Adoc) Reset()

func (*Adoc) String

func (x *Adoc) String() string

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.

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

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.

Jump to

Keyboard shortcuts

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