Documentation ¶
Overview ¶
Code generated by protoc-gen-cdd. DO NOT EDIT. source: server.proto
Package server is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterServerApiGrstServer(grpcRestServer *grst.Server, hndl ServerApiServer)
- func RegisterServerApiHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterServerApiHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ServerApiClient) error
- func RegisterServerApiHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterServerApiHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ServerApiServer) error
- func RegisterServerApiServer(s *grpc.Server, srv ServerApiServer)
- func ValidateRequest(req interface{}) error
- type AuthConfig
- type ServerApiClient
- type ServerApiServer
- type StatusResp
- type UnimplementedServerApiServer
- type UnsafeServerApiServer
Constants ¶
This section is empty.
Variables ¶
var AuthConfigFullMethods = map[string]AuthConfig{ "/server.ServerApi/Status": AuthConfig{NeedAuth: false, Roles: []string{"*"}}, }
var File_server_proto protoreflect.FileDescriptor
var FullMethods = fullMethods{
ServerApi_Status: "/server.ServerApi/Status",
}
var NeedApiKeyFullMethods = []string{}
var NeedAuthFullMethods = []string{}
Functions ¶
func RegisterServerApiGrstServer ¶
func RegisterServerApiGrstServer(grpcRestServer *grst.Server, hndl ServerApiServer)
func RegisterServerApiHandler ¶
func RegisterServerApiHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterServerApiHandler registers the http handlers for service ServerApi to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterServerApiHandlerClient ¶
func RegisterServerApiHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ServerApiClient) error
RegisterServerApiHandlerClient registers the http handlers for service ServerApi to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "ServerApiClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "ServerApiClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "ServerApiClient" to call the correct interceptors.
func RegisterServerApiHandlerFromEndpoint ¶
func RegisterServerApiHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterServerApiHandlerFromEndpoint is same as RegisterServerApiHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterServerApiHandlerServer ¶
func RegisterServerApiHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ServerApiServer) error
RegisterServerApiHandlerServer registers the http handlers for service ServerApi to "mux". UnaryRPC :call ServerApiServer 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 RegisterServerApiHandlerFromEndpoint instead.
func RegisterServerApiServer ¶
func RegisterServerApiServer(s *grpc.Server, srv ServerApiServer)
func ValidateRequest ¶
func ValidateRequest(req interface{}) error
Types ¶
type AuthConfig ¶
type ServerApiClient ¶
type ServerApiClient interface {
Status(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*StatusResp, error)
}
ServerApiClient is the client API for ServerApi 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 NewServerApiClient ¶
func NewServerApiClient(cc grpc.ClientConnInterface) ServerApiClient
func NewServerApiGrstClient ¶
func NewServerApiGrstClient(serverHost string, creds *credentials.TransportCredentials, dialOpts ...grpc.DialOption) (ServerApiClient, error)
type ServerApiServer ¶
type ServerApiServer interface { Status(context.Context, *empty.Empty) (*StatusResp, error) // contains filtered or unexported methods }
ServerApiServer is the server API for ServerApi service. All implementations must embed UnimplementedServerApiServer for forward compatibility
type StatusResp ¶
type StatusResp struct { Status string `protobuf:"bytes,1,opt,name=Status,json=status,proto3" json:"status,omitempty"` // contains filtered or unexported fields }
func (*StatusResp) Descriptor
deprecated
func (*StatusResp) Descriptor() ([]byte, []int)
Deprecated: Use StatusResp.ProtoReflect.Descriptor instead.
func (*StatusResp) GetStatus ¶
func (x *StatusResp) GetStatus() string
func (*StatusResp) ProtoMessage ¶
func (*StatusResp) ProtoMessage()
func (*StatusResp) ProtoReflect ¶
func (x *StatusResp) ProtoReflect() protoreflect.Message
func (*StatusResp) Reset ¶
func (x *StatusResp) Reset()
func (*StatusResp) String ¶
func (x *StatusResp) String() string
type UnimplementedServerApiServer ¶
type UnimplementedServerApiServer struct { }
UnimplementedServerApiServer must be embedded to have forward compatible implementations.
func (UnimplementedServerApiServer) Status ¶
func (UnimplementedServerApiServer) Status(context.Context, *empty.Empty) (*StatusResp, error)
type UnsafeServerApiServer ¶
type UnsafeServerApiServer interface {
// contains filtered or unexported methods
}
UnsafeServerApiServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ServerApiServer will result in compilation errors.