versionpb

package
v2.8.0-nightly.20230824 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	API_GetVersion_FullMethodName = "/versionpb_v2.API/GetVersion"
)

Variables

View Source
var (
	ErrClientIsNil         = errors.New("client version is missing")
	ErrServerIsNil         = errors.New("server version is nil")
	ErrClientTooOld        = errors.New("client is outdated")
	ErrServerTooOld        = errors.New("server is outdated")
	ErrIncompatiblePreview = errors.New("client and server versions must match exactly")
)
View Source
var API_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "versionpb_v2.API",
	HandlerType: (*APIServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetVersion",
			Handler:    _API_GetVersion_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "version/versionpb/version.proto",
}

API_ServiceDesc is the grpc.ServiceDesc for API 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_version_versionpb_version_proto protoreflect.FileDescriptor

Functions

func IsCompatible

func IsCompatible(rawClient, rawServer *Version) error

IsCompatible determines if two versions are compatible. Versions are compatible if the versions are identical or one version is a development build, or if either the server or client are not prereleases, then the major and minor numbers are identical.

func RegisterAPIServer

func RegisterAPIServer(s grpc.ServiceRegistrar, srv APIServer)

Types

type APIClient

type APIClient interface {
	GetVersion(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*Version, error)
}

APIClient is the client API for API 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 NewAPIClient

func NewAPIClient(cc grpc.ClientConnInterface) APIClient

type APIServer

type APIServer interface {
	GetVersion(context.Context, *emptypb.Empty) (*Version, error)
	// contains filtered or unexported methods
}

APIServer is the server API for API service. All implementations must embed UnimplementedAPIServer for forward compatibility

type UnimplementedAPIServer

type UnimplementedAPIServer struct {
}

UnimplementedAPIServer must be embedded to have forward compatible implementations.

func (UnimplementedAPIServer) GetVersion

type UnsafeAPIServer added in v2.7.0

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

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

type Version

type Version struct {
	Major           uint32 `protobuf:"varint,1,opt,name=major,proto3" json:"major,omitempty"`
	Minor           uint32 `protobuf:"varint,2,opt,name=minor,proto3" json:"minor,omitempty"`
	Micro           uint32 `protobuf:"varint,3,opt,name=micro,proto3" json:"micro,omitempty"`
	Additional      string `protobuf:"bytes,4,opt,name=additional,proto3" json:"additional,omitempty"`
	GitCommit       string `protobuf:"bytes,5,opt,name=git_commit,json=gitCommit,proto3" json:"git_commit,omitempty"`
	GitTreeModified string `protobuf:"bytes,6,opt,name=git_tree_modified,json=gitTreeModified,proto3" json:"git_tree_modified,omitempty"`
	BuildDate       string `protobuf:"bytes,7,opt,name=build_date,json=buildDate,proto3" json:"build_date,omitempty"`
	GoVersion       string `protobuf:"bytes,8,opt,name=go_version,json=goVersion,proto3" json:"go_version,omitempty"`
	Platform        string `protobuf:"bytes,9,opt,name=platform,proto3" json:"platform,omitempty"`
	// contains filtered or unexported fields
}

func (*Version) Canonical

func (v *Version) Canonical() string

Canonical returns the version in canonical semver form, according to golang.org/x/mod/semver.

func (*Version) Descriptor deprecated

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

Deprecated: Use Version.ProtoReflect.Descriptor instead.

func (*Version) GetAdditional

func (x *Version) GetAdditional() string

func (*Version) GetBuildDate

func (x *Version) GetBuildDate() string

func (*Version) GetGitCommit

func (x *Version) GetGitCommit() string

func (*Version) GetGitTreeModified

func (x *Version) GetGitTreeModified() string

func (*Version) GetGoVersion

func (x *Version) GetGoVersion() string

func (*Version) GetMajor

func (x *Version) GetMajor() uint32

func (*Version) GetMicro

func (x *Version) GetMicro() uint32

func (*Version) GetMinor

func (x *Version) GetMinor() uint32

func (*Version) GetPlatform

func (x *Version) GetPlatform() string

func (*Version) IsDevelopment

func (v *Version) IsDevelopment() bool

IsDevelopment returns true if the version is from a local unreleased build.

func (*Version) MarshalLogObject

func (x *Version) MarshalLogObject(enc zapcore.ObjectEncoder) error

func (*Version) ProtoMessage

func (*Version) ProtoMessage()

func (*Version) ProtoReflect added in v2.7.0

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