v1

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2022 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const OperationDictGetDict = "/api.dict.v1.Dict/GetDict"

Variables

View Source
var Dict_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "api.dict.v1.Dict",
	HandlerType: (*DictServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetDict",
			Handler:    _Dict_GetDict_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "api/dict/v1/dict.proto",
}

Dict_ServiceDesc is the grpc.ServiceDesc for Dict 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_api_dict_v1_dict_proto protoreflect.FileDescriptor

Functions

func RegisterDictHTTPServer

func RegisterDictHTTPServer(s *http.Server, srv DictHTTPServer)

func RegisterDictServer

func RegisterDictServer(s grpc.ServiceRegistrar, srv DictServer)

Types

type DictClient

type DictClient interface {
	GetDict(ctx context.Context, in *DictRequest, opts ...grpc.CallOption) (*DictResponse, error)
}

DictClient is the client API for Dict 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 NewDictClient

func NewDictClient(cc grpc.ClientConnInterface) DictClient

type DictHTTPClient

type DictHTTPClient interface {
	GetDict(ctx context.Context, req *DictRequest, opts ...http.CallOption) (rsp *DictResponse, err error)
}

func NewDictHTTPClient

func NewDictHTTPClient(client *http.Client) DictHTTPClient

type DictHTTPClientImpl

type DictHTTPClientImpl struct {
	// contains filtered or unexported fields
}

func (*DictHTTPClientImpl) GetDict

func (c *DictHTTPClientImpl) GetDict(ctx context.Context, in *DictRequest, opts ...http.CallOption) (*DictResponse, error)

type DictHTTPServer

type DictHTTPServer interface {
	GetDict(context.Context, *DictRequest) (*DictResponse, error)
}

type DictRequest

type DictRequest struct {
	Tag string `protobuf:"bytes,1,opt,name=tag,proto3" json:"tag,omitempty"`
	// contains filtered or unexported fields
}

func (*DictRequest) Descriptor deprecated

func (*DictRequest) Descriptor() ([]byte, []int)

Deprecated: Use DictRequest.ProtoReflect.Descriptor instead.

func (*DictRequest) GetTag

func (x *DictRequest) GetTag() string

func (*DictRequest) ProtoMessage

func (*DictRequest) ProtoMessage()

func (*DictRequest) ProtoReflect

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

func (*DictRequest) Reset

func (x *DictRequest) Reset()

func (*DictRequest) String

func (x *DictRequest) String() string

func (*DictRequest) Validate

func (m *DictRequest) Validate() error

Validate checks the field values on DictRequest 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 (*DictRequest) ValidateAll

func (m *DictRequest) ValidateAll() error

ValidateAll checks the field values on DictRequest 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 DictRequestMultiError, or nil if none found.

type DictRequestMultiError

type DictRequestMultiError []error

DictRequestMultiError is an error wrapping multiple validation errors returned by DictRequest.ValidateAll() if the designated constraints aren't met.

func (DictRequestMultiError) AllErrors

func (m DictRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (DictRequestMultiError) Error

func (m DictRequestMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type DictRequestValidationError

type DictRequestValidationError struct {
	// contains filtered or unexported fields
}

DictRequestValidationError is the validation error returned by DictRequest.Validate if the designated constraints aren't met.

func (DictRequestValidationError) Cause

Cause function returns cause value.

func (DictRequestValidationError) Error

Error satisfies the builtin error interface

func (DictRequestValidationError) ErrorName

func (e DictRequestValidationError) ErrorName() string

ErrorName returns error name.

func (DictRequestValidationError) Field

Field function returns field value.

func (DictRequestValidationError) Key

Key function returns key value.

func (DictRequestValidationError) Reason

Reason function returns reason value.

type DictResponse

type DictResponse struct {
	Dict map[string]string `` /* 149-byte string literal not displayed */
	// contains filtered or unexported fields
}

The response message containing the greetings

func (*DictResponse) Descriptor deprecated

func (*DictResponse) Descriptor() ([]byte, []int)

Deprecated: Use DictResponse.ProtoReflect.Descriptor instead.

func (*DictResponse) GetDict

func (x *DictResponse) GetDict() map[string]string

func (*DictResponse) ProtoMessage

func (*DictResponse) ProtoMessage()

func (*DictResponse) ProtoReflect

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

func (*DictResponse) Reset

func (x *DictResponse) Reset()

func (*DictResponse) String

func (x *DictResponse) String() string

func (*DictResponse) Validate

func (m *DictResponse) Validate() error

Validate checks the field values on DictResponse 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 (*DictResponse) ValidateAll

func (m *DictResponse) ValidateAll() error

ValidateAll checks the field values on DictResponse 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 DictResponseMultiError, or nil if none found.

type DictResponseMultiError

type DictResponseMultiError []error

DictResponseMultiError is an error wrapping multiple validation errors returned by DictResponse.ValidateAll() if the designated constraints aren't met.

func (DictResponseMultiError) AllErrors

func (m DictResponseMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (DictResponseMultiError) Error

func (m DictResponseMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type DictResponseValidationError

type DictResponseValidationError struct {
	// contains filtered or unexported fields
}

DictResponseValidationError is the validation error returned by DictResponse.Validate if the designated constraints aren't met.

func (DictResponseValidationError) Cause

Cause function returns cause value.

func (DictResponseValidationError) Error

Error satisfies the builtin error interface

func (DictResponseValidationError) ErrorName

func (e DictResponseValidationError) ErrorName() string

ErrorName returns error name.

func (DictResponseValidationError) Field

Field function returns field value.

func (DictResponseValidationError) Key

Key function returns key value.

func (DictResponseValidationError) Reason

Reason function returns reason value.

type DictServer

type DictServer interface {
	GetDict(context.Context, *DictRequest) (*DictResponse, error)
	// contains filtered or unexported methods
}

DictServer is the server API for Dict service. All implementations must embed UnimplementedDictServer for forward compatibility

type UnimplementedDictServer

type UnimplementedDictServer struct {
}

UnimplementedDictServer must be embedded to have forward compatible implementations.

func (UnimplementedDictServer) GetDict

type UnsafeDictServer

type UnsafeDictServer interface {
	// contains filtered or unexported methods
}

UnsafeDictServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to DictServer will result in compilation errors.

Jump to

Keyboard shortcuts

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