core

package
v0.0.0-...-e517c40 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2021 License: MIT Imports: 16 Imported by: 0

README

/api

Protobuf files and artifacts

  • protobuf definitions *.proto
  • gRPC server and client interfaces *.pb.go
  • Swagger *.swagger.json
  • grpc-gateway *.pb.gw.go

Documentation

Overview

Package core is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

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

View Source
var File_api_core_proto protoreflect.FileDescriptor

Functions

func RegisterCoreHandler

func RegisterCoreHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterCoreHandler registers the http handlers for service Core to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterCoreHandlerClient

func RegisterCoreHandlerClient(ctx context.Context, mux *runtime.ServeMux, client CoreClient) error

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

func RegisterCoreHandlerServer(ctx context.Context, mux *runtime.ServeMux, server CoreServer) error

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

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.

Jump to

Keyboard shortcuts

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