Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterDictHTTPServer(s *http.Server, srv DictHTTPServer)
- func RegisterDictServer(s grpc.ServiceRegistrar, srv DictServer)
- type DictClient
- type DictHTTPClient
- type DictHTTPClientImpl
- type DictHTTPServer
- type DictRequest
- func (*DictRequest) Descriptor() ([]byte, []int)deprecated
- func (x *DictRequest) GetTag() string
- func (*DictRequest) ProtoMessage()
- func (x *DictRequest) ProtoReflect() protoreflect.Message
- func (x *DictRequest) Reset()
- func (x *DictRequest) String() string
- func (m *DictRequest) Validate() error
- func (m *DictRequest) ValidateAll() error
- type DictRequestMultiError
- type DictRequestValidationError
- func (e DictRequestValidationError) Cause() error
- func (e DictRequestValidationError) Error() string
- func (e DictRequestValidationError) ErrorName() string
- func (e DictRequestValidationError) Field() string
- func (e DictRequestValidationError) Key() bool
- func (e DictRequestValidationError) Reason() string
- type DictResponse
- func (*DictResponse) Descriptor() ([]byte, []int)deprecated
- func (x *DictResponse) GetDict() map[string]string
- func (*DictResponse) ProtoMessage()
- func (x *DictResponse) ProtoReflect() protoreflect.Message
- func (x *DictResponse) Reset()
- func (x *DictResponse) String() string
- func (m *DictResponse) Validate() error
- func (m *DictResponse) ValidateAll() error
- type DictResponseMultiError
- type DictResponseValidationError
- func (e DictResponseValidationError) Cause() error
- func (e DictResponseValidationError) Error() string
- func (e DictResponseValidationError) ErrorName() string
- func (e DictResponseValidationError) Field() string
- func (e DictResponseValidationError) Key() bool
- func (e DictResponseValidationError) Reason() string
- type DictServer
- type UnimplementedDictServer
- type UnsafeDictServer
Constants ¶
const OperationDictGetDict = "/api.dict.v1.Dict/GetDict"
Variables ¶
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)
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 ¶
func (e DictRequestValidationError) Cause() error
Cause function returns cause value.
func (DictRequestValidationError) Error ¶
func (e DictRequestValidationError) Error() string
Error satisfies the builtin error interface
func (DictRequestValidationError) ErrorName ¶
func (e DictRequestValidationError) ErrorName() string
ErrorName returns error name.
func (DictRequestValidationError) Field ¶
func (e DictRequestValidationError) Field() string
Field function returns field value.
func (DictRequestValidationError) Key ¶
func (e DictRequestValidationError) Key() bool
Key function returns key value.
func (DictRequestValidationError) Reason ¶
func (e DictRequestValidationError) Reason() string
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 ¶
func (e DictResponseValidationError) Cause() error
Cause function returns cause value.
func (DictResponseValidationError) Error ¶
func (e DictResponseValidationError) Error() string
Error satisfies the builtin error interface
func (DictResponseValidationError) ErrorName ¶
func (e DictResponseValidationError) ErrorName() string
ErrorName returns error name.
func (DictResponseValidationError) Field ¶
func (e DictResponseValidationError) Field() string
Field function returns field value.
func (DictResponseValidationError) Key ¶
func (e DictResponseValidationError) Key() bool
Key function returns key value.
func (DictResponseValidationError) Reason ¶
func (e DictResponseValidationError) Reason() string
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 ¶
func (UnimplementedDictServer) GetDict(context.Context, *DictRequest) (*DictResponse, error)
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.