Documentation ¶
Index ¶
- Variables
- func RegisterWebHandlerServer(s grpc.ServiceRegistrar, srv WebHandlerServer)
- type Empty
- type StringList
- type UnimplementedWebHandlerServer
- type UnsafeWebHandlerServer
- type WebEndpoint
- func (*WebEndpoint) Descriptor() ([]byte, []int)deprecated
- func (x *WebEndpoint) GetMethods() []string
- func (x *WebEndpoint) GetName() string
- func (x *WebEndpoint) GetPath() string
- func (*WebEndpoint) ProtoMessage()
- func (x *WebEndpoint) ProtoReflect() protoreflect.Message
- func (x *WebEndpoint) Reset()
- func (x *WebEndpoint) String() string
- type WebEndpointList
- type WebHandlerClient
- type WebHandlerServer
- type WebRequest
- func (*WebRequest) Descriptor() ([]byte, []int)deprecated
- func (x *WebRequest) GetBody() []byte
- func (x *WebRequest) GetEndpointName() string
- func (x *WebRequest) GetHeaders() map[string]*StringList
- func (x *WebRequest) GetQueryParams() map[string]*StringList
- func (x *WebRequest) GetUriParams() map[string]string
- func (*WebRequest) ProtoMessage()
- func (x *WebRequest) ProtoReflect() protoreflect.Message
- func (x *WebRequest) Reset()
- func (x *WebRequest) String() string
- type WebResponse
- func (*WebResponse) Descriptor() ([]byte, []int)deprecated
- func (x *WebResponse) GetBody() []byte
- func (x *WebResponse) GetCode() int32
- func (x *WebResponse) GetHeaders() map[string]*StringList
- func (*WebResponse) ProtoMessage()
- func (x *WebResponse) ProtoReflect() protoreflect.Message
- func (x *WebResponse) Reset()
- func (x *WebResponse) String() string
Constants ¶
This section is empty.
Variables ¶
var File_proto_common_proto protoreflect.FileDescriptor
var File_proto_webhandler_proto protoreflect.FileDescriptor
var WebHandler_ServiceDesc = grpc.ServiceDesc{ ServiceName: "interfaces.WebHandler", HandlerType: (*WebHandlerServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetEndpoints", Handler: _WebHandler_GetEndpoints_Handler, }, { MethodName: "HandleRequest", Handler: _WebHandler_HandleRequest_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "proto/webhandler.proto", }
WebHandler_ServiceDesc is the grpc.ServiceDesc for WebHandler service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterWebHandlerServer ¶
func RegisterWebHandlerServer(s grpc.ServiceRegistrar, srv WebHandlerServer)
Types ¶
type Empty ¶
type Empty struct {
// contains filtered or unexported fields
}
func (*Empty) Descriptor
deprecated
func (*Empty) ProtoMessage ¶
func (*Empty) ProtoMessage()
func (*Empty) ProtoReflect ¶
func (x *Empty) ProtoReflect() protoreflect.Message
type StringList ¶
type StringList struct { Values []string `protobuf:"bytes,1,rep,name=values,proto3" json:"values,omitempty"` // contains filtered or unexported fields }
func (*StringList) Descriptor
deprecated
func (*StringList) Descriptor() ([]byte, []int)
Deprecated: Use StringList.ProtoReflect.Descriptor instead.
func (*StringList) GetValues ¶
func (x *StringList) GetValues() []string
func (*StringList) ProtoMessage ¶
func (*StringList) ProtoMessage()
func (*StringList) ProtoReflect ¶
func (x *StringList) ProtoReflect() protoreflect.Message
func (*StringList) Reset ¶
func (x *StringList) Reset()
func (*StringList) String ¶
func (x *StringList) String() string
type UnimplementedWebHandlerServer ¶
type UnimplementedWebHandlerServer struct { }
UnimplementedWebHandlerServer must be embedded to have forward compatible implementations.
func (UnimplementedWebHandlerServer) GetEndpoints ¶
func (UnimplementedWebHandlerServer) GetEndpoints(context.Context, *Empty) (*WebEndpointList, error)
func (UnimplementedWebHandlerServer) HandleRequest ¶
func (UnimplementedWebHandlerServer) HandleRequest(context.Context, *WebRequest) (*WebResponse, error)
type UnsafeWebHandlerServer ¶
type UnsafeWebHandlerServer interface {
// contains filtered or unexported methods
}
UnsafeWebHandlerServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to WebHandlerServer will result in compilation errors.
type WebEndpoint ¶
type WebEndpoint struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Methods []string `protobuf:"bytes,2,rep,name=methods,proto3" json:"methods,omitempty"` Path string `protobuf:"bytes,3,opt,name=path,proto3" json:"path,omitempty"` // contains filtered or unexported fields }
Define a message for a WebEndpoint.
func (*WebEndpoint) Descriptor
deprecated
func (*WebEndpoint) Descriptor() ([]byte, []int)
Deprecated: Use WebEndpoint.ProtoReflect.Descriptor instead.
func (*WebEndpoint) GetMethods ¶
func (x *WebEndpoint) GetMethods() []string
func (*WebEndpoint) GetName ¶
func (x *WebEndpoint) GetName() string
func (*WebEndpoint) GetPath ¶
func (x *WebEndpoint) GetPath() string
func (*WebEndpoint) ProtoMessage ¶
func (*WebEndpoint) ProtoMessage()
func (*WebEndpoint) ProtoReflect ¶
func (x *WebEndpoint) ProtoReflect() protoreflect.Message
func (*WebEndpoint) Reset ¶
func (x *WebEndpoint) Reset()
func (*WebEndpoint) String ¶
func (x *WebEndpoint) String() string
type WebEndpointList ¶
type WebEndpointList struct { Endpoints []*WebEndpoint `protobuf:"bytes,1,rep,name=endpoints,proto3" json:"endpoints,omitempty"` // contains filtered or unexported fields }
Define a message for a list of WebEndpoints.
func (*WebEndpointList) Descriptor
deprecated
func (*WebEndpointList) Descriptor() ([]byte, []int)
Deprecated: Use WebEndpointList.ProtoReflect.Descriptor instead.
func (*WebEndpointList) GetEndpoints ¶
func (x *WebEndpointList) GetEndpoints() []*WebEndpoint
func (*WebEndpointList) ProtoMessage ¶
func (*WebEndpointList) ProtoMessage()
func (*WebEndpointList) ProtoReflect ¶
func (x *WebEndpointList) ProtoReflect() protoreflect.Message
func (*WebEndpointList) Reset ¶
func (x *WebEndpointList) Reset()
func (*WebEndpointList) String ¶
func (x *WebEndpointList) String() string
type WebHandlerClient ¶
type WebHandlerClient interface { GetEndpoints(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*WebEndpointList, error) HandleRequest(ctx context.Context, in *WebRequest, opts ...grpc.CallOption) (*WebResponse, error) }
WebHandlerClient is the client API for WebHandler 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 NewWebHandlerClient ¶
func NewWebHandlerClient(cc grpc.ClientConnInterface) WebHandlerClient
type WebHandlerServer ¶
type WebHandlerServer interface { GetEndpoints(context.Context, *Empty) (*WebEndpointList, error) HandleRequest(context.Context, *WebRequest) (*WebResponse, error) // contains filtered or unexported methods }
WebHandlerServer is the server API for WebHandler service. All implementations must embed UnimplementedWebHandlerServer for forward compatibility
type WebRequest ¶
type WebRequest struct { EndpointName string `protobuf:"bytes,1,opt,name=endpoint_name,json=endpointName,proto3" json:"endpoint_name,omitempty"` Headers map[string]*StringList `` /* 155-byte string literal not displayed */ UriParams map[string]string `` /* 176-byte string literal not displayed */ QueryParams map[string]*StringList `` /* 182-byte string literal not displayed */ Body []byte `protobuf:"bytes,5,opt,name=body,proto3" json:"body,omitempty"` // contains filtered or unexported fields }
Define a message for WebRequest.
func (*WebRequest) Descriptor
deprecated
func (*WebRequest) Descriptor() ([]byte, []int)
Deprecated: Use WebRequest.ProtoReflect.Descriptor instead.
func (*WebRequest) GetBody ¶
func (x *WebRequest) GetBody() []byte
func (*WebRequest) GetEndpointName ¶
func (x *WebRequest) GetEndpointName() string
func (*WebRequest) GetHeaders ¶
func (x *WebRequest) GetHeaders() map[string]*StringList
func (*WebRequest) GetQueryParams ¶
func (x *WebRequest) GetQueryParams() map[string]*StringList
func (*WebRequest) GetUriParams ¶
func (x *WebRequest) GetUriParams() map[string]string
func (*WebRequest) ProtoMessage ¶
func (*WebRequest) ProtoMessage()
func (*WebRequest) ProtoReflect ¶
func (x *WebRequest) ProtoReflect() protoreflect.Message
func (*WebRequest) Reset ¶
func (x *WebRequest) Reset()
func (*WebRequest) String ¶
func (x *WebRequest) String() string
type WebResponse ¶
type WebResponse struct { Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` Headers map[string]*StringList `` /* 155-byte string literal not displayed */ Body []byte `protobuf:"bytes,3,opt,name=body,proto3" json:"body,omitempty"` // contains filtered or unexported fields }
Define a message for WebResponse.
func (*WebResponse) Descriptor
deprecated
func (*WebResponse) Descriptor() ([]byte, []int)
Deprecated: Use WebResponse.ProtoReflect.Descriptor instead.
func (*WebResponse) GetBody ¶
func (x *WebResponse) GetBody() []byte
func (*WebResponse) GetCode ¶
func (x *WebResponse) GetCode() int32
func (*WebResponse) GetHeaders ¶
func (x *WebResponse) GetHeaders() map[string]*StringList
func (*WebResponse) ProtoMessage ¶
func (*WebResponse) ProtoMessage()
func (*WebResponse) ProtoReflect ¶
func (x *WebResponse) ProtoReflect() protoreflect.Message
func (*WebResponse) Reset ¶
func (x *WebResponse) Reset()
func (*WebResponse) String ¶
func (x *WebResponse) String() string