Documentation ¶
Overview ¶
Package v1 is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Constants
- Variables
- func RegisterCommonServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterCommonServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client CommonServiceClient) error
- func RegisterCommonServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterCommonServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server CommonServiceServer) error
- func RegisterCommonServiceServer(s grpc.ServiceRegistrar, srv CommonServiceServer)
- type CommonServiceClient
- type CommonServiceServer
- type GetVersionRequest
- func (*GetVersionRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetVersionRequest) GetClient() *Version
- func (*GetVersionRequest) ProtoMessage()
- func (x *GetVersionRequest) ProtoReflect() protoreflect.Message
- func (x *GetVersionRequest) Reset()
- func (x *GetVersionRequest) String() string
- func (m *GetVersionRequest) Validate() error
- func (m *GetVersionRequest) ValidateAll() error
- type GetVersionRequestMultiError
- type GetVersionRequestValidationError
- func (e GetVersionRequestValidationError) Cause() error
- func (e GetVersionRequestValidationError) Error() string
- func (e GetVersionRequestValidationError) ErrorName() string
- func (e GetVersionRequestValidationError) Field() string
- func (e GetVersionRequestValidationError) Key() bool
- func (e GetVersionRequestValidationError) Reason() string
- type GetVersionResponse
- func (*GetVersionResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetVersionResponse) GetServer() *Version
- func (*GetVersionResponse) ProtoMessage()
- func (x *GetVersionResponse) ProtoReflect() protoreflect.Message
- func (x *GetVersionResponse) Reset()
- func (x *GetVersionResponse) String() string
- func (m *GetVersionResponse) Validate() error
- func (m *GetVersionResponse) ValidateAll() error
- type GetVersionResponseMultiError
- type GetVersionResponseValidationError
- func (e GetVersionResponseValidationError) Cause() error
- func (e GetVersionResponseValidationError) Error() string
- func (e GetVersionResponseValidationError) ErrorName() string
- func (e GetVersionResponseValidationError) Field() string
- func (e GetVersionResponseValidationError) Key() bool
- func (e GetVersionResponseValidationError) Reason() string
- type UnimplementedCommonServiceServer
- type UnsafeCommonServiceServer
- type Version
- func (*Version) Descriptor() ([]byte, []int)deprecated
- func (x *Version) GetArchitecture() string
- func (x *Version) GetBuildTime() *timestamppb.Timestamp
- func (x *Version) GetCommit() string
- func (x *Version) GetLangVersion() string
- func (x *Version) GetOs() string
- func (x *Version) GetVersion() string
- func (*Version) ProtoMessage()
- func (x *Version) ProtoReflect() protoreflect.Message
- func (x *Version) Reset()
- func (x *Version) String() string
- func (m *Version) Validate() error
- func (m *Version) ValidateAll() error
- type VersionMultiError
- type VersionValidationError
Constants ¶
const (
CommonService_GetVersion_FullMethodName = "/gotocompany.common.v1.CommonService/GetVersion"
)
Variables ¶
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)
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.
func NewCommonServiceClient ¶
func NewCommonServiceClient(cc grpc.ClientConnInterface) CommonServiceClient
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
func (*GetVersionRequest) Validate ¶
func (m *GetVersionRequest) Validate() error
Validate checks the field values on GetVersionRequest 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 (*GetVersionRequest) ValidateAll ¶
func (m *GetVersionRequest) ValidateAll() error
ValidateAll checks the field values on GetVersionRequest 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 GetVersionRequestMultiError, or nil if none found.
type GetVersionRequestMultiError ¶
type GetVersionRequestMultiError []error
GetVersionRequestMultiError is an error wrapping multiple validation errors returned by GetVersionRequest.ValidateAll() if the designated constraints aren't met.
func (GetVersionRequestMultiError) AllErrors ¶
func (m GetVersionRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (GetVersionRequestMultiError) Error ¶
func (m GetVersionRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type GetVersionRequestValidationError ¶
type GetVersionRequestValidationError struct {
// contains filtered or unexported fields
}
GetVersionRequestValidationError is the validation error returned by GetVersionRequest.Validate if the designated constraints aren't met.
func (GetVersionRequestValidationError) Cause ¶
func (e GetVersionRequestValidationError) Cause() error
Cause function returns cause value.
func (GetVersionRequestValidationError) Error ¶
func (e GetVersionRequestValidationError) Error() string
Error satisfies the builtin error interface
func (GetVersionRequestValidationError) ErrorName ¶
func (e GetVersionRequestValidationError) ErrorName() string
ErrorName returns error name.
func (GetVersionRequestValidationError) Field ¶
func (e GetVersionRequestValidationError) Field() string
Field function returns field value.
func (GetVersionRequestValidationError) Key ¶
func (e GetVersionRequestValidationError) Key() bool
Key function returns key value.
func (GetVersionRequestValidationError) Reason ¶
func (e GetVersionRequestValidationError) Reason() string
Reason function returns reason value.
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
func (*GetVersionResponse) Validate ¶
func (m *GetVersionResponse) Validate() error
Validate checks the field values on GetVersionResponse 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 (*GetVersionResponse) ValidateAll ¶
func (m *GetVersionResponse) ValidateAll() error
ValidateAll checks the field values on GetVersionResponse 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 GetVersionResponseMultiError, or nil if none found.
type GetVersionResponseMultiError ¶
type GetVersionResponseMultiError []error
GetVersionResponseMultiError is an error wrapping multiple validation errors returned by GetVersionResponse.ValidateAll() if the designated constraints aren't met.
func (GetVersionResponseMultiError) AllErrors ¶
func (m GetVersionResponseMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (GetVersionResponseMultiError) Error ¶
func (m GetVersionResponseMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type GetVersionResponseValidationError ¶
type GetVersionResponseValidationError struct {
// contains filtered or unexported fields
}
GetVersionResponseValidationError is the validation error returned by GetVersionResponse.Validate if the designated constraints aren't met.
func (GetVersionResponseValidationError) Cause ¶
func (e GetVersionResponseValidationError) Cause() error
Cause function returns cause value.
func (GetVersionResponseValidationError) Error ¶
func (e GetVersionResponseValidationError) Error() string
Error satisfies the builtin error interface
func (GetVersionResponseValidationError) ErrorName ¶
func (e GetVersionResponseValidationError) ErrorName() string
ErrorName returns error name.
func (GetVersionResponseValidationError) Field ¶
func (e GetVersionResponseValidationError) Field() string
Field function returns field value.
func (GetVersionResponseValidationError) Key ¶
func (e GetVersionResponseValidationError) Key() bool
Key function returns key value.
func (GetVersionResponseValidationError) Reason ¶
func (e GetVersionResponseValidationError) Reason() string
Reason function returns reason value.
type UnimplementedCommonServiceServer ¶
type UnimplementedCommonServiceServer struct { }
UnimplementedCommonServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedCommonServiceServer) GetVersion ¶
func (UnimplementedCommonServiceServer) GetVersion(context.Context, *GetVersionRequest) (*GetVersionResponse, error)
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) GetArchitecture ¶
func (*Version) GetBuildTime ¶
func (x *Version) GetBuildTime() *timestamppb.Timestamp
func (*Version) GetLangVersion ¶
func (*Version) GetVersion ¶
func (*Version) ProtoMessage ¶
func (*Version) ProtoMessage()
func (*Version) ProtoReflect ¶
func (x *Version) ProtoReflect() protoreflect.Message
func (*Version) Validate ¶
Validate checks the field values on Version 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 (*Version) ValidateAll ¶
ValidateAll checks the field values on Version 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 VersionMultiError, or nil if none found.
type VersionMultiError ¶
type VersionMultiError []error
VersionMultiError is an error wrapping multiple validation errors returned by Version.ValidateAll() if the designated constraints aren't met.
func (VersionMultiError) AllErrors ¶
func (m VersionMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (VersionMultiError) Error ¶
func (m VersionMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type VersionValidationError ¶
type VersionValidationError struct {
// contains filtered or unexported fields
}
VersionValidationError is the validation error returned by Version.Validate if the designated constraints aren't met.
func (VersionValidationError) Cause ¶
func (e VersionValidationError) Cause() error
Cause function returns cause value.
func (VersionValidationError) Error ¶
func (e VersionValidationError) Error() string
Error satisfies the builtin error interface
func (VersionValidationError) ErrorName ¶
func (e VersionValidationError) ErrorName() string
ErrorName returns error name.
func (VersionValidationError) Field ¶
func (e VersionValidationError) Field() string
Field function returns field value.
func (VersionValidationError) Key ¶
func (e VersionValidationError) Key() bool
Key function returns key value.
func (VersionValidationError) Reason ¶
func (e VersionValidationError) Reason() string
Reason function returns reason value.