Documentation ¶
Overview ¶
Package v1 is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterVersionServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterVersionServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client VersionServiceClient) error
- func RegisterVersionServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterVersionServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server VersionServiceServer) error
- func RegisterVersionServiceServer(s grpc.ServiceRegistrar, srv VersionServiceServer)
- type UnimplementedVersionServiceServer
- type UnsafeVersionServiceServer
- type Version
- func (*Version) Descriptor() ([]byte, []int)deprecated
- func (x *Version) GetBranch() string
- func (x *Version) GetBuildTime() *timestamppb.Timestamp
- func (x *Version) GetCommit() string
- func (x *Version) GetGoVersion() string
- func (x *Version) GetPlatform() string
- func (x *Version) GetVersion() string
- func (*Version) ProtoMessage()
- func (x *Version) ProtoReflect() protoreflect.Message
- func (x *Version) Reset()
- func (x *Version) String() string
- type VersionServiceClient
- type VersionServiceServer
Constants ¶
This section is empty.
Variables ¶
var File_api_v1_version_proto protoreflect.FileDescriptor
var VersionService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "v1.VersionService", HandlerType: (*VersionServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Get", Handler: _VersionService_Get_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "api/v1/version.proto", }
VersionService_ServiceDesc is the grpc.ServiceDesc for VersionService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterVersionServiceHandler ¶
func RegisterVersionServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterVersionServiceHandler registers the http handlers for service VersionService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterVersionServiceHandlerClient ¶
func RegisterVersionServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client VersionServiceClient) error
RegisterVersionServiceHandlerClient registers the http handlers for service VersionService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "VersionServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "VersionServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "VersionServiceClient" to call the correct interceptors.
func RegisterVersionServiceHandlerFromEndpoint ¶
func RegisterVersionServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterVersionServiceHandlerFromEndpoint is same as RegisterVersionServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterVersionServiceHandlerServer ¶
func RegisterVersionServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server VersionServiceServer) error
RegisterVersionServiceHandlerServer registers the http handlers for service VersionService to "mux". UnaryRPC :call VersionServiceServer 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 RegisterVersionServiceHandlerFromEndpoint instead.
func RegisterVersionServiceServer ¶
func RegisterVersionServiceServer(s grpc.ServiceRegistrar, srv VersionServiceServer)
Types ¶
type UnimplementedVersionServiceServer ¶
type UnimplementedVersionServiceServer struct { }
UnimplementedVersionServiceServer should be embedded to have forward compatible implementations.
type UnsafeVersionServiceServer ¶
type UnsafeVersionServiceServer interface {
// contains filtered or unexported methods
}
UnsafeVersionServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to VersionServiceServer will result in compilation errors.
type Version ¶
type Version struct { Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` Branch string `protobuf:"bytes,2,opt,name=branch,proto3" json:"branch,omitempty"` Commit string `protobuf:"bytes,3,opt,name=commit,proto3" json:"commit,omitempty"` GoVersion string `protobuf:"bytes,4,opt,name=go_version,json=goVersion,proto3" json:"go_version,omitempty"` Platform string `protobuf:"bytes,5,opt,name=platform,proto3" json:"platform,omitempty"` BuildTime *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=build_time,json=buildTime,proto3" json:"build_time,omitempty"` // contains filtered or unexported fields }
func (*Version) Descriptor
deprecated
func (*Version) GetBuildTime ¶
func (x *Version) GetBuildTime() *timestamppb.Timestamp
func (*Version) GetGoVersion ¶
func (*Version) GetPlatform ¶
func (*Version) GetVersion ¶
func (*Version) ProtoMessage ¶
func (*Version) ProtoMessage()
func (*Version) ProtoReflect ¶
func (x *Version) ProtoReflect() protoreflect.Message
type VersionServiceClient ¶
type VersionServiceClient interface {
Get(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*Version, error)
}
VersionServiceClient is the client API for VersionService 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 NewVersionServiceClient ¶
func NewVersionServiceClient(cc grpc.ClientConnInterface) VersionServiceClient