v1

package
v0.3.6 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Overview

Package v1 is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
var CommonService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "gotocompany.common.v1.CommonService",
	HandlerType: (*CommonServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetVersion",
			Handler:    _CommonService_GetVersion_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "gotocompany/common/v1/service.proto",
}

CommonService_ServiceDesc is the grpc.ServiceDesc for CommonService 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_gotocompany_common_v1_service_proto protoreflect.FileDescriptor

Functions

func RegisterCommonServiceHandler

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

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

func RegisterCommonServiceHandlerClient

func RegisterCommonServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client CommonServiceClient) error

RegisterCommonServiceHandlerClient registers the http handlers for service CommonService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "CommonServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "CommonServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "CommonServiceClient" to call the correct interceptors.

func RegisterCommonServiceHandlerFromEndpoint

func RegisterCommonServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterCommonServiceHandlerFromEndpoint is same as RegisterCommonServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterCommonServiceHandlerServer

func RegisterCommonServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server CommonServiceServer) error

RegisterCommonServiceHandlerServer registers the http handlers for service CommonService to "mux". UnaryRPC :call CommonServiceServer 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 RegisterCommonServiceHandlerFromEndpoint instead.

func RegisterCommonServiceServer

func RegisterCommonServiceServer(s grpc.ServiceRegistrar, srv CommonServiceServer)

Types

type CommonServiceClient

type CommonServiceClient interface {
	GetVersion(ctx context.Context, in *GetVersionRequest, opts ...grpc.CallOption) (*GetVersionResponse, error)
}

CommonServiceClient is the client API for CommonService 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.

type CommonServiceServer

type CommonServiceServer interface {
	GetVersion(context.Context, *GetVersionRequest) (*GetVersionResponse, error)
	// contains filtered or unexported methods
}

CommonServiceServer is the server API for CommonService service. All implementations must embed UnimplementedCommonServiceServer for forward compatibility

type GetVersionRequest

type GetVersionRequest struct {
	Client *Version `protobuf:"bytes,1,opt,name=client,proto3" json:"client,omitempty"`
	// contains filtered or unexported fields
}

func (*GetVersionRequest) Descriptor deprecated

func (*GetVersionRequest) Descriptor() ([]byte, []int)

Deprecated: Use GetVersionRequest.ProtoReflect.Descriptor instead.

func (*GetVersionRequest) GetClient

func (x *GetVersionRequest) GetClient() *Version

func (*GetVersionRequest) ProtoMessage

func (*GetVersionRequest) ProtoMessage()

func (*GetVersionRequest) ProtoReflect

func (x *GetVersionRequest) ProtoReflect() protoreflect.Message

func (*GetVersionRequest) Reset

func (x *GetVersionRequest) Reset()

func (*GetVersionRequest) String

func (x *GetVersionRequest) String() string

type GetVersionResponse

type GetVersionResponse struct {
	Server *Version `protobuf:"bytes,1,opt,name=server,proto3" json:"server,omitempty"`
	// contains filtered or unexported fields
}

func (*GetVersionResponse) Descriptor deprecated

func (*GetVersionResponse) Descriptor() ([]byte, []int)

Deprecated: Use GetVersionResponse.ProtoReflect.Descriptor instead.

func (*GetVersionResponse) GetServer

func (x *GetVersionResponse) GetServer() *Version

func (*GetVersionResponse) ProtoMessage

func (*GetVersionResponse) ProtoMessage()

func (*GetVersionResponse) ProtoReflect

func (x *GetVersionResponse) ProtoReflect() protoreflect.Message

func (*GetVersionResponse) Reset

func (x *GetVersionResponse) Reset()

func (*GetVersionResponse) String

func (x *GetVersionResponse) String() string

type UnimplementedCommonServiceServer

type UnimplementedCommonServiceServer struct {
}

UnimplementedCommonServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedCommonServiceServer) GetVersion

type UnsafeCommonServiceServer

type UnsafeCommonServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeCommonServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to CommonServiceServer will result in compilation errors.

type Version

type Version struct {
	Version      string                 `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"`
	Commit       string                 `protobuf:"bytes,2,opt,name=commit,proto3" json:"commit,omitempty"`
	BuildTime    *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=build_time,json=buildTime,proto3" json:"build_time,omitempty"`
	LangVersion  string                 `protobuf:"bytes,4,opt,name=lang_version,json=langVersion,proto3" json:"lang_version,omitempty"`
	Os           string                 `protobuf:"bytes,5,opt,name=os,proto3" json:"os,omitempty"`
	Architecture string                 `protobuf:"bytes,6,opt,name=architecture,proto3" json:"architecture,omitempty"`
	// contains filtered or unexported fields
}

func (*Version) Descriptor deprecated

func (*Version) Descriptor() ([]byte, []int)

Deprecated: Use Version.ProtoReflect.Descriptor instead.

func (*Version) GetArchitecture

func (x *Version) GetArchitecture() string

func (*Version) GetBuildTime

func (x *Version) GetBuildTime() *timestamppb.Timestamp

func (*Version) GetCommit

func (x *Version) GetCommit() string

func (*Version) GetLangVersion

func (x *Version) GetLangVersion() string

func (*Version) GetOs

func (x *Version) GetOs() string

func (*Version) GetVersion

func (x *Version) GetVersion() string

func (*Version) ProtoMessage

func (*Version) ProtoMessage()

func (*Version) ProtoReflect

func (x *Version) ProtoReflect() protoreflect.Message

func (*Version) Reset

func (x *Version) Reset()

func (*Version) String

func (x *Version) String() string

Jump to

Keyboard shortcuts

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