v1

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2022 License: MIT Imports: 24 Imported by: 1

Documentation

Index

Constants

View Source
const OperationDictGet = "/api.dict.v1.Dict/Get"

Variables

View Source
var Dict_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "api.dict.v1.Dict",
	HandlerType: (*DictServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Get",
			Handler:    _Dict_Get_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 {
	Get(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 {
	Get(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) Get

type DictHTTPServer

type DictHTTPServer interface {
	Get(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 {
	Woker  string `protobuf:"bytes,1,opt,name=woker,proto3" json:"woker,omitempty"`
	Guide  string `protobuf:"bytes,2,opt,name=guide,proto3" json:"guide,omitempty"`
	Actor  string `protobuf:"bytes,3,opt,name=actor,proto3" json:"actor,omitempty"`
	Lawyer string `protobuf:"bytes,4,opt,name=lawyer,proto3" json:"lawyer,omitempty"`
	// 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) GetActor

func (x *DictResponse) GetActor() string

func (*DictResponse) GetGuide

func (x *DictResponse) GetGuide() string

func (*DictResponse) GetLawyer

func (x *DictResponse) GetLawyer() string

func (*DictResponse) GetWoker

func (x *DictResponse) GetWoker() 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 {
	Get(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) Get

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