Documentation
¶
Overview ¶
Package core is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterCoreHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterCoreHandlerClient(ctx context.Context, mux *runtime.ServeMux, client CoreClient) error
- func RegisterCoreHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterCoreHandlerServer(ctx context.Context, mux *runtime.ServeMux, server CoreServer) error
- func RegisterCoreServer(s grpc.ServiceRegistrar, srv CoreServer)
- type CoreClient
- type CoreServer
- type InitializeReply
- type InitializeRequest
- type UnimplementedCoreServer
- type UnsafeCoreServer
Constants ¶
This section is empty.
Variables ¶
var Core_ServiceDesc = grpc.ServiceDesc{ ServiceName: "core.Core", HandlerType: (*CoreServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Initialize", Handler: _Core_Initialize_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "api/core.proto", }
Core_ServiceDesc is the grpc.ServiceDesc for Core service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_api_core_proto protoreflect.FileDescriptor
Functions ¶
func RegisterCoreHandler ¶
RegisterCoreHandler registers the http handlers for service Core to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterCoreHandlerClient ¶
RegisterCoreHandlerClient registers the http handlers for service Core to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "CoreClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "CoreClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "CoreClient" to call the correct interceptors.
func RegisterCoreHandlerFromEndpoint ¶
func RegisterCoreHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterCoreHandlerFromEndpoint is same as RegisterCoreHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterCoreHandlerServer ¶
RegisterCoreHandlerServer registers the http handlers for service Core to "mux". UnaryRPC :call CoreServer 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 RegisterCoreHandlerFromEndpoint instead.
func RegisterCoreServer ¶
func RegisterCoreServer(s grpc.ServiceRegistrar, srv CoreServer)
Types ¶
type CoreClient ¶
type CoreClient interface {
Initialize(ctx context.Context, in *InitializeRequest, opts ...grpc.CallOption) (*InitializeReply, error)
}
CoreClient is the client API for Core 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 NewCoreClient ¶
func NewCoreClient(cc grpc.ClientConnInterface) CoreClient
type CoreServer ¶
type CoreServer interface { Initialize(context.Context, *InitializeRequest) (*InitializeReply, error) // contains filtered or unexported methods }
CoreServer is the server API for Core service. All implementations must embed UnimplementedCoreServer for forward compatibility
type InitializeReply ¶
type InitializeReply struct { Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
func (*InitializeReply) Descriptor
deprecated
func (*InitializeReply) Descriptor() ([]byte, []int)
Deprecated: Use InitializeReply.ProtoReflect.Descriptor instead.
func (*InitializeReply) GetMessage ¶
func (x *InitializeReply) GetMessage() string
func (*InitializeReply) ProtoMessage ¶
func (*InitializeReply) ProtoMessage()
func (*InitializeReply) ProtoReflect ¶
func (x *InitializeReply) ProtoReflect() protoreflect.Message
func (*InitializeReply) Reset ¶
func (x *InitializeReply) Reset()
func (*InitializeReply) String ¶
func (x *InitializeReply) String() string
type InitializeRequest ¶
type InitializeRequest struct { Timezone string `protobuf:"bytes,1,opt,name=timezone,proto3" json:"timezone,omitempty"` // contains filtered or unexported fields }
func (*InitializeRequest) Descriptor
deprecated
func (*InitializeRequest) Descriptor() ([]byte, []int)
Deprecated: Use InitializeRequest.ProtoReflect.Descriptor instead.
func (*InitializeRequest) GetTimezone ¶
func (x *InitializeRequest) GetTimezone() string
func (*InitializeRequest) ProtoMessage ¶
func (*InitializeRequest) ProtoMessage()
func (*InitializeRequest) ProtoReflect ¶
func (x *InitializeRequest) ProtoReflect() protoreflect.Message
func (*InitializeRequest) Reset ¶
func (x *InitializeRequest) Reset()
func (*InitializeRequest) String ¶
func (x *InitializeRequest) String() string
type UnimplementedCoreServer ¶
type UnimplementedCoreServer struct { }
UnimplementedCoreServer must be embedded to have forward compatible implementations.
func (UnimplementedCoreServer) Initialize ¶
func (UnimplementedCoreServer) Initialize(context.Context, *InitializeRequest) (*InitializeReply, error)
type UnsafeCoreServer ¶
type UnsafeCoreServer interface {
// contains filtered or unexported methods
}
UnsafeCoreServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to CoreServer will result in compilation errors.