server

package
v0.0.0-...-3439342 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2023 License: Apache-2.0 Imports: 26 Imported by: 0

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

Constants

This section is empty.

Variables

View Source
var AuthConfigFullMethods = map[string]AuthConfig{
	"/server.ServerApi/Status": AuthConfig{NeedAuth: false, Roles: []string{"*"}},
}
View Source
var File_server_proto protoreflect.FileDescriptor
View Source
var FullMethods = fullMethods{
	ServerApi_Status: "/server.ServerApi/Status",
}
View Source
var NeedApiKeyFullMethods = []string{}
View Source
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 AuthConfig struct {
	NeedAuth bool
	Roles    []string
}

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

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.

Jump to

Keyboard shortcuts

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