infov1

package
v2.15.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2023 License: Apache-2.0 Imports: 34 Imported by: 0

Documentation

Overview

Package infov1 is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
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

View Source
var (
	ErrInvalidLength        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflow          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroup = fmt.Errorf("proto: unexpected end of group")
)
View Source
var File_aperture_info_v1_info_proto protoreflect.FileDescriptor
View Source
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) Descriptor() ([]byte, []int)

Deprecated: Use HostInfo.ProtoReflect.Descriptor instead.

func (*HostInfo) GetHostname

func (x *HostInfo) GetHostname() string

func (*HostInfo) GetLocalIp

func (x *HostInfo) GetLocalIp() string

func (*HostInfo) GetUuid

func (x *HostInfo) GetUuid() string

func (*HostInfo) MarshalJSON

func (msg *HostInfo) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler

func (*HostInfo) MarshalToSizedBufferVT added in v2.7.0

func (m *HostInfo) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*HostInfo) MarshalToVT added in v2.7.0

func (m *HostInfo) MarshalToVT(dAtA []byte) (int, error)

func (*HostInfo) MarshalVT added in v2.7.0

func (m *HostInfo) MarshalVT() (dAtA []byte, err error)

func (*HostInfo) ProtoMessage

func (*HostInfo) ProtoMessage()

func (*HostInfo) ProtoReflect

func (x *HostInfo) ProtoReflect() protoreflect.Message

func (*HostInfo) Reset

func (x *HostInfo) Reset()

func (*HostInfo) SizeVT added in v2.7.0

func (m *HostInfo) SizeVT() (n int)

func (*HostInfo) String

func (x *HostInfo) String() string

func (*HostInfo) UnmarshalJSON

func (msg *HostInfo) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler

func (*HostInfo) UnmarshalVT added in v2.7.0

func (m *HostInfo) UnmarshalVT(dAtA []byte) error

func (*HostInfo) Validate

func (m *HostInfo) Validate() error

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

func (m *HostInfo) ValidateAll() error

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.

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

Cause function returns cause value.

func (ProcessInfoValidationError) Error

Error satisfies the builtin error interface

func (ProcessInfoValidationError) ErrorName

func (e ProcessInfoValidationError) ErrorName() string

ErrorName returns error name.

func (ProcessInfoValidationError) Field

Field function returns field value.

func (ProcessInfoValidationError) Key

Key function returns key value.

func (ProcessInfoValidationError) Reason

Reason function returns reason value.

type UnimplementedInfoServiceServer

type UnimplementedInfoServiceServer struct {
}

UnimplementedInfoServiceServer should be embedded to have forward compatible implementations.

func (UnimplementedInfoServiceServer) Host

func (UnimplementedInfoServiceServer) Process

func (UnimplementedInfoServiceServer) Version

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

Cause function returns cause value.

func (VersionInfoValidationError) Error

Error satisfies the builtin error interface

func (VersionInfoValidationError) ErrorName

func (e VersionInfoValidationError) ErrorName() string

ErrorName returns error name.

func (VersionInfoValidationError) Field

Field function returns field value.

func (VersionInfoValidationError) Key

Key function returns key value.

func (VersionInfoValidationError) Reason

Reason function returns reason value.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL