Documentation ¶
Overview ¶
Package infov1 is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Constants
- Variables
- func RegisterInfoServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterInfoServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client InfoServiceClient) error
- func RegisterInfoServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterInfoServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server InfoServiceServer) error
- func RegisterInfoServiceServer(s grpc.ServiceRegistrar, srv InfoServiceServer)
- type HostInfo
- func (*HostInfo) Descriptor() ([]byte, []int)deprecated
- func (x *HostInfo) GetHostname() string
- func (x *HostInfo) GetLocalIp() string
- func (x *HostInfo) GetUuid() string
- func (msg *HostInfo) MarshalJSON() ([]byte, error)
- func (m *HostInfo) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *HostInfo) MarshalToVT(dAtA []byte) (int, error)
- func (m *HostInfo) MarshalVT() (dAtA []byte, err error)
- func (*HostInfo) ProtoMessage()
- func (x *HostInfo) ProtoReflect() protoreflect.Message
- func (x *HostInfo) Reset()
- func (m *HostInfo) SizeVT() (n int)
- func (x *HostInfo) String() string
- func (msg *HostInfo) UnmarshalJSON(b []byte) error
- func (m *HostInfo) UnmarshalVT(dAtA []byte) error
- func (m *HostInfo) Validate() error
- func (m *HostInfo) ValidateAll() error
- type HostInfoMultiError
- type HostInfoValidationError
- type InfoServiceClient
- type InfoServiceServer
- type ProcessInfo
- func (*ProcessInfo) Descriptor() ([]byte, []int)deprecated
- func (x *ProcessInfo) GetExtensions() []string
- func (x *ProcessInfo) GetStartTime() *timestamppb.Timestamp
- func (x *ProcessInfo) GetUptime() *durationpb.Duration
- func (msg *ProcessInfo) MarshalJSON() ([]byte, error)
- func (m *ProcessInfo) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *ProcessInfo) MarshalToVT(dAtA []byte) (int, error)
- func (m *ProcessInfo) MarshalVT() (dAtA []byte, err error)
- func (*ProcessInfo) ProtoMessage()
- func (x *ProcessInfo) ProtoReflect() protoreflect.Message
- func (x *ProcessInfo) Reset()
- func (m *ProcessInfo) SizeVT() (n int)
- func (x *ProcessInfo) String() string
- func (msg *ProcessInfo) UnmarshalJSON(b []byte) error
- func (m *ProcessInfo) UnmarshalVT(dAtA []byte) error
- func (m *ProcessInfo) Validate() error
- func (m *ProcessInfo) ValidateAll() error
- type ProcessInfoMultiError
- type ProcessInfoValidationError
- func (e ProcessInfoValidationError) Cause() error
- func (e ProcessInfoValidationError) Error() string
- func (e ProcessInfoValidationError) ErrorName() string
- func (e ProcessInfoValidationError) Field() string
- func (e ProcessInfoValidationError) Key() bool
- func (e ProcessInfoValidationError) Reason() string
- type UnimplementedInfoServiceServer
- type UnsafeInfoServiceServer
- type VersionInfo
- func (*VersionInfo) Descriptor() ([]byte, []int)deprecated
- func (x *VersionInfo) GetBuildHost() string
- func (x *VersionInfo) GetBuildOs() string
- func (x *VersionInfo) GetBuildTime() string
- func (x *VersionInfo) GetGitBranch() string
- func (x *VersionInfo) GetGitCommitHash() string
- func (x *VersionInfo) GetService() string
- func (x *VersionInfo) GetVersion() string
- func (msg *VersionInfo) MarshalJSON() ([]byte, error)
- func (m *VersionInfo) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *VersionInfo) MarshalToVT(dAtA []byte) (int, error)
- func (m *VersionInfo) MarshalVT() (dAtA []byte, err error)
- func (*VersionInfo) ProtoMessage()
- func (x *VersionInfo) ProtoReflect() protoreflect.Message
- func (x *VersionInfo) Reset()
- func (m *VersionInfo) SizeVT() (n int)
- func (x *VersionInfo) String() string
- func (msg *VersionInfo) UnmarshalJSON(b []byte) error
- func (m *VersionInfo) UnmarshalVT(dAtA []byte) error
- func (m *VersionInfo) Validate() error
- func (m *VersionInfo) ValidateAll() error
- type VersionInfoMultiError
- type VersionInfoValidationError
- func (e VersionInfoValidationError) Cause() error
- func (e VersionInfoValidationError) Error() string
- func (e VersionInfoValidationError) ErrorName() string
- func (e VersionInfoValidationError) Field() string
- func (e VersionInfoValidationError) Key() bool
- func (e VersionInfoValidationError) Reason() string
Constants ¶
const ( InfoService_Version_FullMethodName = "/aperture.info.v1.InfoService/Version" InfoService_Process_FullMethodName = "/aperture.info.v1.InfoService/Process" InfoService_Host_FullMethodName = "/aperture.info.v1.InfoService/Host" )
Variables ¶
var ( ErrInvalidLength = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflow = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroup = fmt.Errorf("proto: unexpected end of group") )
var File_aperture_info_v1_info_proto protoreflect.FileDescriptor
var InfoService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "aperture.info.v1.InfoService", HandlerType: (*InfoServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Version", Handler: _InfoService_Version_Handler, }, { MethodName: "Process", Handler: _InfoService_Process_Handler, }, { MethodName: "Host", Handler: _InfoService_Host_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "aperture/info/v1/info.proto", }
InfoService_ServiceDesc is the grpc.ServiceDesc for InfoService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterInfoServiceHandler ¶
func RegisterInfoServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterInfoServiceHandler registers the http handlers for service InfoService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterInfoServiceHandlerClient ¶
func RegisterInfoServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client InfoServiceClient) error
RegisterInfoServiceHandlerClient registers the http handlers for service InfoService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "InfoServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "InfoServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "InfoServiceClient" to call the correct interceptors.
func RegisterInfoServiceHandlerFromEndpoint ¶
func RegisterInfoServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterInfoServiceHandlerFromEndpoint is same as RegisterInfoServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterInfoServiceHandlerServer ¶
func RegisterInfoServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server InfoServiceServer) error
RegisterInfoServiceHandlerServer registers the http handlers for service InfoService to "mux". UnaryRPC :call InfoServiceServer 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 RegisterInfoServiceHandlerFromEndpoint instead.
func RegisterInfoServiceServer ¶
func RegisterInfoServiceServer(s grpc.ServiceRegistrar, srv InfoServiceServer)
Types ¶
type HostInfo ¶
type HostInfo struct { Uuid string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"` Hostname string `protobuf:"bytes,2,opt,name=hostname,proto3" json:"hostname,omitempty"` LocalIp string `protobuf:"bytes,3,opt,name=local_ip,json=localIp,proto3" json:"local_ip,omitempty"` // contains filtered or unexported fields }
func (*HostInfo) Descriptor
deprecated
func (*HostInfo) GetHostname ¶
func (*HostInfo) GetLocalIp ¶
func (*HostInfo) MarshalJSON ¶
MarshalJSON implements json.Marshaler
func (*HostInfo) MarshalToSizedBufferVT ¶ added in v2.7.0
func (*HostInfo) MarshalToVT ¶ added in v2.7.0
func (*HostInfo) ProtoMessage ¶
func (*HostInfo) ProtoMessage()
func (*HostInfo) ProtoReflect ¶
func (x *HostInfo) ProtoReflect() protoreflect.Message
func (*HostInfo) UnmarshalJSON ¶
UnmarshalJSON implements json.Unmarshaler
func (*HostInfo) UnmarshalVT ¶ added in v2.7.0
func (*HostInfo) Validate ¶
Validate checks the field values on HostInfo 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 (*HostInfo) ValidateAll ¶
ValidateAll checks the field values on HostInfo 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 HostInfoMultiError, or nil if none found.
type HostInfoMultiError ¶
type HostInfoMultiError []error
HostInfoMultiError is an error wrapping multiple validation errors returned by HostInfo.ValidateAll() if the designated constraints aren't met.
func (HostInfoMultiError) AllErrors ¶
func (m HostInfoMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (HostInfoMultiError) Error ¶
func (m HostInfoMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type HostInfoValidationError ¶
type HostInfoValidationError struct {
// contains filtered or unexported fields
}
HostInfoValidationError is the validation error returned by HostInfo.Validate if the designated constraints aren't met.
func (HostInfoValidationError) Cause ¶
func (e HostInfoValidationError) Cause() error
Cause function returns cause value.
func (HostInfoValidationError) Error ¶
func (e HostInfoValidationError) Error() string
Error satisfies the builtin error interface
func (HostInfoValidationError) ErrorName ¶
func (e HostInfoValidationError) ErrorName() string
ErrorName returns error name.
func (HostInfoValidationError) Field ¶
func (e HostInfoValidationError) Field() string
Field function returns field value.
func (HostInfoValidationError) Key ¶
func (e HostInfoValidationError) Key() bool
Key function returns key value.
func (HostInfoValidationError) Reason ¶
func (e HostInfoValidationError) Reason() string
Reason function returns reason value.
type InfoServiceClient ¶
type InfoServiceClient interface { Version(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*VersionInfo, error) Process(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*ProcessInfo, error) Host(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*HostInfo, error) }
InfoServiceClient is the client API for InfoService 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 NewInfoServiceClient ¶
func NewInfoServiceClient(cc grpc.ClientConnInterface) InfoServiceClient
type InfoServiceServer ¶
type InfoServiceServer interface { Version(context.Context, *emptypb.Empty) (*VersionInfo, error) Process(context.Context, *emptypb.Empty) (*ProcessInfo, error) Host(context.Context, *emptypb.Empty) (*HostInfo, error) }
InfoServiceServer is the server API for InfoService service. All implementations should embed UnimplementedInfoServiceServer for forward compatibility
type ProcessInfo ¶
type ProcessInfo struct { StartTime *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` Uptime *durationpb.Duration `protobuf:"bytes,2,opt,name=uptime,proto3" json:"uptime,omitempty"` Extensions []string `protobuf:"bytes,3,rep,name=extensions,proto3" json:"extensions,omitempty"` // contains filtered or unexported fields }
func (*ProcessInfo) Descriptor
deprecated
func (*ProcessInfo) Descriptor() ([]byte, []int)
Deprecated: Use ProcessInfo.ProtoReflect.Descriptor instead.
func (*ProcessInfo) GetExtensions ¶
func (x *ProcessInfo) GetExtensions() []string
func (*ProcessInfo) GetStartTime ¶
func (x *ProcessInfo) GetStartTime() *timestamppb.Timestamp
func (*ProcessInfo) GetUptime ¶
func (x *ProcessInfo) GetUptime() *durationpb.Duration
func (*ProcessInfo) MarshalJSON ¶
func (msg *ProcessInfo) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler
func (*ProcessInfo) MarshalToSizedBufferVT ¶ added in v2.7.0
func (m *ProcessInfo) MarshalToSizedBufferVT(dAtA []byte) (int, error)
func (*ProcessInfo) MarshalToVT ¶ added in v2.7.0
func (m *ProcessInfo) MarshalToVT(dAtA []byte) (int, error)
func (*ProcessInfo) MarshalVT ¶ added in v2.7.0
func (m *ProcessInfo) MarshalVT() (dAtA []byte, err error)
func (*ProcessInfo) ProtoMessage ¶
func (*ProcessInfo) ProtoMessage()
func (*ProcessInfo) ProtoReflect ¶
func (x *ProcessInfo) ProtoReflect() protoreflect.Message
func (*ProcessInfo) Reset ¶
func (x *ProcessInfo) Reset()
func (*ProcessInfo) SizeVT ¶ added in v2.7.0
func (m *ProcessInfo) SizeVT() (n int)
func (*ProcessInfo) String ¶
func (x *ProcessInfo) String() string
func (*ProcessInfo) UnmarshalJSON ¶
func (msg *ProcessInfo) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler
func (*ProcessInfo) UnmarshalVT ¶ added in v2.7.0
func (m *ProcessInfo) UnmarshalVT(dAtA []byte) error
func (*ProcessInfo) Validate ¶
func (m *ProcessInfo) Validate() error
Validate checks the field values on ProcessInfo 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 (*ProcessInfo) ValidateAll ¶
func (m *ProcessInfo) ValidateAll() error
ValidateAll checks the field values on ProcessInfo 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 ProcessInfoMultiError, or nil if none found.
type ProcessInfoMultiError ¶
type ProcessInfoMultiError []error
ProcessInfoMultiError is an error wrapping multiple validation errors returned by ProcessInfo.ValidateAll() if the designated constraints aren't met.
func (ProcessInfoMultiError) AllErrors ¶
func (m ProcessInfoMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (ProcessInfoMultiError) Error ¶
func (m ProcessInfoMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type ProcessInfoValidationError ¶
type ProcessInfoValidationError struct {
// contains filtered or unexported fields
}
ProcessInfoValidationError is the validation error returned by ProcessInfo.Validate if the designated constraints aren't met.
func (ProcessInfoValidationError) Cause ¶
func (e ProcessInfoValidationError) Cause() error
Cause function returns cause value.
func (ProcessInfoValidationError) Error ¶
func (e ProcessInfoValidationError) Error() string
Error satisfies the builtin error interface
func (ProcessInfoValidationError) ErrorName ¶
func (e ProcessInfoValidationError) ErrorName() string
ErrorName returns error name.
func (ProcessInfoValidationError) Field ¶
func (e ProcessInfoValidationError) Field() string
Field function returns field value.
func (ProcessInfoValidationError) Key ¶
func (e ProcessInfoValidationError) Key() bool
Key function returns key value.
func (ProcessInfoValidationError) Reason ¶
func (e ProcessInfoValidationError) Reason() string
Reason function returns reason value.
type UnimplementedInfoServiceServer ¶
type UnimplementedInfoServiceServer struct { }
UnimplementedInfoServiceServer should be embedded to have forward compatible implementations.
func (UnimplementedInfoServiceServer) Process ¶
func (UnimplementedInfoServiceServer) Process(context.Context, *emptypb.Empty) (*ProcessInfo, error)
func (UnimplementedInfoServiceServer) Version ¶
func (UnimplementedInfoServiceServer) Version(context.Context, *emptypb.Empty) (*VersionInfo, error)
type UnsafeInfoServiceServer ¶
type UnsafeInfoServiceServer interface {
// contains filtered or unexported methods
}
UnsafeInfoServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to InfoServiceServer will result in compilation errors.
type VersionInfo ¶
type VersionInfo struct { Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` Service string `protobuf:"bytes,2,opt,name=service,proto3" json:"service,omitempty"` BuildHost string `protobuf:"bytes,3,opt,name=build_host,json=buildHost,proto3" json:"build_host,omitempty"` BuildOs string `protobuf:"bytes,4,opt,name=build_os,json=buildOs,proto3" json:"build_os,omitempty"` BuildTime string `protobuf:"bytes,5,opt,name=build_time,json=buildTime,proto3" json:"build_time,omitempty"` GitBranch string `protobuf:"bytes,6,opt,name=git_branch,json=gitBranch,proto3" json:"git_branch,omitempty"` GitCommitHash string `protobuf:"bytes,7,opt,name=git_commit_hash,json=gitCommitHash,proto3" json:"git_commit_hash,omitempty"` // contains filtered or unexported fields }
func (*VersionInfo) Descriptor
deprecated
func (*VersionInfo) Descriptor() ([]byte, []int)
Deprecated: Use VersionInfo.ProtoReflect.Descriptor instead.
func (*VersionInfo) GetBuildHost ¶
func (x *VersionInfo) GetBuildHost() string
func (*VersionInfo) GetBuildOs ¶
func (x *VersionInfo) GetBuildOs() string
func (*VersionInfo) GetBuildTime ¶
func (x *VersionInfo) GetBuildTime() string
func (*VersionInfo) GetGitBranch ¶
func (x *VersionInfo) GetGitBranch() string
func (*VersionInfo) GetGitCommitHash ¶
func (x *VersionInfo) GetGitCommitHash() string
func (*VersionInfo) GetService ¶
func (x *VersionInfo) GetService() string
func (*VersionInfo) GetVersion ¶
func (x *VersionInfo) GetVersion() string
func (*VersionInfo) MarshalJSON ¶
func (msg *VersionInfo) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler
func (*VersionInfo) MarshalToSizedBufferVT ¶ added in v2.7.0
func (m *VersionInfo) MarshalToSizedBufferVT(dAtA []byte) (int, error)
func (*VersionInfo) MarshalToVT ¶ added in v2.7.0
func (m *VersionInfo) MarshalToVT(dAtA []byte) (int, error)
func (*VersionInfo) MarshalVT ¶ added in v2.7.0
func (m *VersionInfo) MarshalVT() (dAtA []byte, err error)
func (*VersionInfo) ProtoMessage ¶
func (*VersionInfo) ProtoMessage()
func (*VersionInfo) ProtoReflect ¶
func (x *VersionInfo) ProtoReflect() protoreflect.Message
func (*VersionInfo) Reset ¶
func (x *VersionInfo) Reset()
func (*VersionInfo) SizeVT ¶ added in v2.7.0
func (m *VersionInfo) SizeVT() (n int)
func (*VersionInfo) String ¶
func (x *VersionInfo) String() string
func (*VersionInfo) UnmarshalJSON ¶
func (msg *VersionInfo) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler
func (*VersionInfo) UnmarshalVT ¶ added in v2.7.0
func (m *VersionInfo) UnmarshalVT(dAtA []byte) error
func (*VersionInfo) Validate ¶
func (m *VersionInfo) Validate() error
Validate checks the field values on VersionInfo 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 (*VersionInfo) ValidateAll ¶
func (m *VersionInfo) ValidateAll() error
ValidateAll checks the field values on VersionInfo 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 VersionInfoMultiError, or nil if none found.
type VersionInfoMultiError ¶
type VersionInfoMultiError []error
VersionInfoMultiError is an error wrapping multiple validation errors returned by VersionInfo.ValidateAll() if the designated constraints aren't met.
func (VersionInfoMultiError) AllErrors ¶
func (m VersionInfoMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (VersionInfoMultiError) Error ¶
func (m VersionInfoMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type VersionInfoValidationError ¶
type VersionInfoValidationError struct {
// contains filtered or unexported fields
}
VersionInfoValidationError is the validation error returned by VersionInfo.Validate if the designated constraints aren't met.
func (VersionInfoValidationError) Cause ¶
func (e VersionInfoValidationError) Cause() error
Cause function returns cause value.
func (VersionInfoValidationError) Error ¶
func (e VersionInfoValidationError) Error() string
Error satisfies the builtin error interface
func (VersionInfoValidationError) ErrorName ¶
func (e VersionInfoValidationError) ErrorName() string
ErrorName returns error name.
func (VersionInfoValidationError) Field ¶
func (e VersionInfoValidationError) Field() string
Field function returns field value.
func (VersionInfoValidationError) Key ¶
func (e VersionInfoValidationError) Key() bool
Key function returns key value.
func (VersionInfoValidationError) Reason ¶
func (e VersionInfoValidationError) Reason() string
Reason function returns reason value.