Documentation ¶
Overview ¶
Package version is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterVersionHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterVersionHandlerClient(ctx context.Context, mux *runtime.ServeMux, client VersionClient) error
- func RegisterVersionHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterVersionHandlerServer(ctx context.Context, mux *runtime.ServeMux, server VersionServer) error
- func RegisterVersionServer(s grpc.ServiceRegistrar, srv VersionServer)
- type UnimplementedVersionServer
- type UnsafeVersionServer
- type VersionClient
- type VersionRequest
- func (*VersionRequest) Descriptor() ([]byte, []int)deprecated
- func (*VersionRequest) ProtoMessage()
- func (x *VersionRequest) ProtoReflect() protoreflect.Message
- func (x *VersionRequest) Reset()
- func (x *VersionRequest) String() string
- func (m *VersionRequest) Validate() error
- func (m *VersionRequest) ValidateAll() error
- type VersionRequestMultiError
- type VersionRequestValidationError
- func (e VersionRequestValidationError) Cause() error
- func (e VersionRequestValidationError) Error() string
- func (e VersionRequestValidationError) ErrorName() string
- func (e VersionRequestValidationError) Field() string
- func (e VersionRequestValidationError) Key() bool
- func (e VersionRequestValidationError) Reason() string
- type VersionResponse
- func (*VersionResponse) Descriptor() ([]byte, []int)deprecated
- func (x *VersionResponse) GetBuildDate() string
- func (x *VersionResponse) GetCompiler() string
- func (x *VersionResponse) GetGitBranch() string
- func (x *VersionResponse) GetGitCommit() string
- func (x *VersionResponse) GetGitRepo() string
- func (x *VersionResponse) GetGitTag() string
- func (x *VersionResponse) GetGoVersion() string
- func (x *VersionResponse) GetHelmVersion() string
- func (x *VersionResponse) GetKubectlVersion() string
- func (x *VersionResponse) GetPlatform() string
- func (x *VersionResponse) GetVersion() string
- func (*VersionResponse) ProtoMessage()
- func (x *VersionResponse) ProtoReflect() protoreflect.Message
- func (x *VersionResponse) Reset()
- func (x *VersionResponse) String() string
- func (m *VersionResponse) Validate() error
- func (m *VersionResponse) ValidateAll() error
- type VersionResponseMultiError
- type VersionResponseValidationError
- func (e VersionResponseValidationError) Cause() error
- func (e VersionResponseValidationError) Error() string
- func (e VersionResponseValidationError) ErrorName() string
- func (e VersionResponseValidationError) Field() string
- func (e VersionResponseValidationError) Key() bool
- func (e VersionResponseValidationError) Reason() string
- type VersionServer
Constants ¶
This section is empty.
Variables ¶
var File_version_version_proto protoreflect.FileDescriptor
var Version_ServiceDesc = grpc.ServiceDesc{ ServiceName: "Version", HandlerType: (*VersionServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Version", Handler: _Version_Version_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "version/version.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 UnimplementedVersionServer ¶
type UnimplementedVersionServer struct { }
UnimplementedVersionServer must be embedded to have forward compatible implementations.
func (UnimplementedVersionServer) Version ¶
func (UnimplementedVersionServer) Version(context.Context, *VersionRequest) (*VersionResponse, error)
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 { // Version 获取当前版本信息 Version(ctx context.Context, in *VersionRequest, opts ...grpc.CallOption) (*VersionResponse, 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 VersionRequest ¶
type VersionRequest struct {
// contains filtered or unexported fields
}
func (*VersionRequest) Descriptor
deprecated
func (*VersionRequest) Descriptor() ([]byte, []int)
Deprecated: Use VersionRequest.ProtoReflect.Descriptor instead.
func (*VersionRequest) ProtoMessage ¶
func (*VersionRequest) ProtoMessage()
func (*VersionRequest) ProtoReflect ¶
func (x *VersionRequest) ProtoReflect() protoreflect.Message
func (*VersionRequest) Reset ¶
func (x *VersionRequest) Reset()
func (*VersionRequest) String ¶
func (x *VersionRequest) String() string
func (*VersionRequest) Validate ¶
func (m *VersionRequest) Validate() error
Validate checks the field values on VersionRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*VersionRequest) ValidateAll ¶
func (m *VersionRequest) ValidateAll() error
ValidateAll checks the field values on VersionRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in VersionRequestMultiError, or nil if none found.
type VersionRequestMultiError ¶
type VersionRequestMultiError []error
VersionRequestMultiError is an error wrapping multiple validation errors returned by VersionRequest.ValidateAll() if the designated constraints aren't met.
func (VersionRequestMultiError) AllErrors ¶
func (m VersionRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (VersionRequestMultiError) Error ¶
func (m VersionRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type VersionRequestValidationError ¶
type VersionRequestValidationError struct {
// contains filtered or unexported fields
}
VersionRequestValidationError is the validation error returned by VersionRequest.Validate if the designated constraints aren't met.
func (VersionRequestValidationError) Cause ¶
func (e VersionRequestValidationError) Cause() error
Cause function returns cause value.
func (VersionRequestValidationError) Error ¶
func (e VersionRequestValidationError) Error() string
Error satisfies the builtin error interface
func (VersionRequestValidationError) ErrorName ¶
func (e VersionRequestValidationError) ErrorName() string
ErrorName returns error name.
func (VersionRequestValidationError) Field ¶
func (e VersionRequestValidationError) Field() string
Field function returns field value.
func (VersionRequestValidationError) Key ¶
func (e VersionRequestValidationError) Key() bool
Key function returns key value.
func (VersionRequestValidationError) Reason ¶
func (e VersionRequestValidationError) Reason() string
Reason function returns reason value.
type VersionResponse ¶
type VersionResponse struct { Version string `protobuf:"bytes,1,opt,name=Version,proto3" json:"Version,omitempty"` BuildDate string `protobuf:"bytes,2,opt,name=BuildDate,proto3" json:"BuildDate,omitempty"` GitBranch string `protobuf:"bytes,3,opt,name=gitBranch,proto3" json:"gitBranch,omitempty"` GitCommit string `protobuf:"bytes,4,opt,name=GitCommit,proto3" json:"GitCommit,omitempty"` GitTag string `protobuf:"bytes,5,opt,name=GitTag,proto3" json:"GitTag,omitempty"` GoVersion string `protobuf:"bytes,6,opt,name=GoVersion,proto3" json:"GoVersion,omitempty"` Compiler string `protobuf:"bytes,7,opt,name=Compiler,proto3" json:"Compiler,omitempty"` Platform string `protobuf:"bytes,8,opt,name=Platform,proto3" json:"Platform,omitempty"` KubectlVersion string `protobuf:"bytes,9,opt,name=KubectlVersion,proto3" json:"KubectlVersion,omitempty"` HelmVersion string `protobuf:"bytes,10,opt,name=HelmVersion,proto3" json:"HelmVersion,omitempty"` GitRepo string `protobuf:"bytes,11,opt,name=GitRepo,proto3" json:"GitRepo,omitempty"` // contains filtered or unexported fields }
func (*VersionResponse) Descriptor
deprecated
func (*VersionResponse) Descriptor() ([]byte, []int)
Deprecated: Use VersionResponse.ProtoReflect.Descriptor instead.
func (*VersionResponse) GetBuildDate ¶
func (x *VersionResponse) GetBuildDate() string
func (*VersionResponse) GetCompiler ¶
func (x *VersionResponse) GetCompiler() string
func (*VersionResponse) GetGitBranch ¶
func (x *VersionResponse) GetGitBranch() string
func (*VersionResponse) GetGitCommit ¶
func (x *VersionResponse) GetGitCommit() string
func (*VersionResponse) GetGitRepo ¶
func (x *VersionResponse) GetGitRepo() string
func (*VersionResponse) GetGitTag ¶
func (x *VersionResponse) GetGitTag() string
func (*VersionResponse) GetGoVersion ¶
func (x *VersionResponse) GetGoVersion() string
func (*VersionResponse) GetHelmVersion ¶
func (x *VersionResponse) GetHelmVersion() string
func (*VersionResponse) GetKubectlVersion ¶
func (x *VersionResponse) GetKubectlVersion() string
func (*VersionResponse) GetPlatform ¶
func (x *VersionResponse) GetPlatform() string
func (*VersionResponse) GetVersion ¶
func (x *VersionResponse) GetVersion() string
func (*VersionResponse) ProtoMessage ¶
func (*VersionResponse) ProtoMessage()
func (*VersionResponse) ProtoReflect ¶
func (x *VersionResponse) ProtoReflect() protoreflect.Message
func (*VersionResponse) Reset ¶
func (x *VersionResponse) Reset()
func (*VersionResponse) String ¶
func (x *VersionResponse) String() string
func (*VersionResponse) Validate ¶
func (m *VersionResponse) Validate() error
Validate checks the field values on VersionResponse with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*VersionResponse) ValidateAll ¶
func (m *VersionResponse) ValidateAll() error
ValidateAll checks the field values on VersionResponse with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in VersionResponseMultiError, or nil if none found.
type VersionResponseMultiError ¶
type VersionResponseMultiError []error
VersionResponseMultiError is an error wrapping multiple validation errors returned by VersionResponse.ValidateAll() if the designated constraints aren't met.
func (VersionResponseMultiError) AllErrors ¶
func (m VersionResponseMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (VersionResponseMultiError) Error ¶
func (m VersionResponseMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type VersionResponseValidationError ¶
type VersionResponseValidationError struct {
// contains filtered or unexported fields
}
VersionResponseValidationError is the validation error returned by VersionResponse.Validate if the designated constraints aren't met.
func (VersionResponseValidationError) Cause ¶
func (e VersionResponseValidationError) Cause() error
Cause function returns cause value.
func (VersionResponseValidationError) Error ¶
func (e VersionResponseValidationError) Error() string
Error satisfies the builtin error interface
func (VersionResponseValidationError) ErrorName ¶
func (e VersionResponseValidationError) ErrorName() string
ErrorName returns error name.
func (VersionResponseValidationError) Field ¶
func (e VersionResponseValidationError) Field() string
Field function returns field value.
func (VersionResponseValidationError) Key ¶
func (e VersionResponseValidationError) Key() bool
Key function returns key value.
func (VersionResponseValidationError) Reason ¶
func (e VersionResponseValidationError) Reason() string
Reason function returns reason value.
type VersionServer ¶
type VersionServer interface { // Version 获取当前版本信息 Version(context.Context, *VersionRequest) (*VersionResponse, error) // contains filtered or unexported methods }
VersionServer is the server API for Version service. All implementations must embed UnimplementedVersionServer for forward compatibility