v1

package
v0.0.0-...-1658330 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2023 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Overview

Package v1 is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	Version_GetInformation_FullMethodName = "/com.gitlab.mvenezia.version_info.v1.Version/GetInformation"
)

Variables

View Source
var File_gitlab_com_mvenezia_versionv1_proto protoreflect.FileDescriptor
View Source
var Version_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "com.gitlab.mvenezia.version_info.v1.Version",
	HandlerType: (*VersionServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetInformation",
			Handler:    _Version_GetInformation_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "gitlab_com_mvenezia_versionv1.proto",
}

Version_ServiceDesc is the grpc.ServiceDesc for Version service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterVersionHandler

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

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

func RegisterVersionHandlerClient

func RegisterVersionHandlerClient(ctx context.Context, mux *runtime.ServeMux, client VersionClient) error

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

func RegisterVersionHandlerFromEndpoint

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

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

func RegisterVersionHandlerServer

func RegisterVersionHandlerServer(ctx context.Context, mux *runtime.ServeMux, server VersionServer) error

RegisterVersionHandlerServer registers the http handlers for service Version to "mux". UnaryRPC :call VersionServer 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 RegisterVersionHandlerFromEndpoint instead.

func RegisterVersionServer

func RegisterVersionServer(s grpc.ServiceRegistrar, srv VersionServer)

Types

type GetInformationMsg

type GetInformationMsg struct {
	// contains filtered or unexported fields
}

func (*GetInformationMsg) Descriptor deprecated

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

Deprecated: Use GetInformationMsg.ProtoReflect.Descriptor instead.

func (*GetInformationMsg) ProtoMessage

func (*GetInformationMsg) ProtoMessage()

func (*GetInformationMsg) ProtoReflect

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

func (*GetInformationMsg) Reset

func (x *GetInformationMsg) Reset()

func (*GetInformationMsg) String

func (x *GetInformationMsg) String() string

type GetInformationReply

type GetInformationReply struct {

	// The tag on the git repository
	GitVersion string `protobuf:"bytes,1,opt,name=git_version,json=gitVersion,proto3" json:"git_version,omitempty"`
	// The hash of the git commit
	GitCommit string `protobuf:"bytes,2,opt,name=git_commit,json=gitCommit,proto3" json:"git_commit,omitempty"`
	// Whether or not the tree was clean when built
	GitTreeState string `protobuf:"bytes,3,opt,name=git_tree_state,json=gitTreeState,proto3" json:"git_tree_state,omitempty"`
	// Date of build
	BuildDate string `protobuf:"bytes,4,opt,name=build_date,json=buildDate,proto3" json:"build_date,omitempty"`
	// Version of go used to compile
	GoVersion string `protobuf:"bytes,5,opt,name=go_version,json=goVersion,proto3" json:"go_version,omitempty"`
	// Compiler used
	Compiler string `protobuf:"bytes,6,opt,name=compiler,proto3" json:"compiler,omitempty"`
	// Platform it was compiled for / running on
	Platform string `protobuf:"bytes,7,opt,name=platform,proto3" json:"platform,omitempty"`
	// contains filtered or unexported fields
}

func (*GetInformationReply) Descriptor deprecated

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

Deprecated: Use GetInformationReply.ProtoReflect.Descriptor instead.

func (*GetInformationReply) GetBuildDate

func (x *GetInformationReply) GetBuildDate() string

func (*GetInformationReply) GetCompiler

func (x *GetInformationReply) GetCompiler() string

func (*GetInformationReply) GetGitCommit

func (x *GetInformationReply) GetGitCommit() string

func (*GetInformationReply) GetGitTreeState

func (x *GetInformationReply) GetGitTreeState() string

func (*GetInformationReply) GetGitVersion

func (x *GetInformationReply) GetGitVersion() string

func (*GetInformationReply) GetGoVersion

func (x *GetInformationReply) GetGoVersion() string

func (*GetInformationReply) GetPlatform

func (x *GetInformationReply) GetPlatform() string

func (*GetInformationReply) ProtoMessage

func (*GetInformationReply) ProtoMessage()

func (*GetInformationReply) ProtoReflect

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

func (*GetInformationReply) Reset

func (x *GetInformationReply) Reset()

func (*GetInformationReply) String

func (x *GetInformationReply) String() string

type UnimplementedVersionServer

type UnimplementedVersionServer struct {
}

UnimplementedVersionServer must be embedded to have forward compatible implementations.

func (UnimplementedVersionServer) GetInformation

type UnsafeVersionServer

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

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

type VersionClient

type VersionClient interface {
	// Will return version information about api server
	GetInformation(ctx context.Context, in *GetInformationMsg, opts ...grpc.CallOption) (*GetInformationReply, error)
}

VersionClient is the client API for Version 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 NewVersionClient

func NewVersionClient(cc grpc.ClientConnInterface) VersionClient

type VersionServer

type VersionServer interface {
	// Will return version information about api server
	GetInformation(context.Context, *GetInformationMsg) (*GetInformationReply, error)
	// contains filtered or unexported methods
}

VersionServer is the server API for Version service. All implementations must embed UnimplementedVersionServer for forward compatibility

Jump to

Keyboard shortcuts

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