v1

package
v0.7.11 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2023 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Overview

Package v1 is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	CommonService_GetVersion_FullMethodName = "/gotocompany.common.v1.CommonService/GetVersion"
)

Variables

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

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

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

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

Cause function returns cause value.

func (GetVersionRequestValidationError) Error

Error satisfies the builtin error interface

func (GetVersionRequestValidationError) ErrorName

ErrorName returns error name.

func (GetVersionRequestValidationError) Field

Field function returns field value.

func (GetVersionRequestValidationError) Key

Key function returns key value.

func (GetVersionRequestValidationError) Reason

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

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

Cause function returns cause value.

func (GetVersionResponseValidationError) Error

Error satisfies the builtin error interface

func (GetVersionResponseValidationError) ErrorName

ErrorName returns error name.

func (GetVersionResponseValidationError) Field

Field function returns field value.

func (GetVersionResponseValidationError) Key

Key function returns key value.

func (GetVersionResponseValidationError) Reason

Reason function returns reason value.

type UnimplementedCommonServiceServer

type UnimplementedCommonServiceServer struct {
}

UnimplementedCommonServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedCommonServiceServer) GetVersion

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) Descriptor() ([]byte, []int)

Deprecated: Use Version.ProtoReflect.Descriptor instead.

func (*Version) GetArchitecture

func (x *Version) GetArchitecture() string

func (*Version) GetBuildTime

func (x *Version) GetBuildTime() *timestamppb.Timestamp

func (*Version) GetCommit

func (x *Version) GetCommit() string

func (*Version) GetLangVersion

func (x *Version) GetLangVersion() string

func (*Version) GetOs

func (x *Version) GetOs() string

func (*Version) GetVersion

func (x *Version) GetVersion() string

func (*Version) ProtoMessage

func (*Version) ProtoMessage()

func (*Version) ProtoReflect

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

func (*Version) Reset

func (x *Version) Reset()

func (*Version) String

func (x *Version) String() string

func (*Version) Validate

func (m *Version) Validate() error

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

func (m *Version) ValidateAll() error

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.

Jump to

Keyboard shortcuts

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