Documentation ¶
Index ¶
- Variables
- func ListChildrenHandler(srv DataDictHTTPServer) func(ctx *gin.Context)
- func RegisterDataDictHTTPServer(r *gin.Engine, srv DataDictHTTPServer)
- func RegisterDataDictServer(s grpc.ServiceRegistrar, srv DataDictServer)
- type DataDictClient
- type DataDictHTTPServer
- type DataDictServer
- type ErrorReason
- func (ErrorReason) Descriptor() protoreflect.EnumDescriptor
- func (x ErrorReason) Enum() *ErrorReason
- func (ErrorReason) EnumDescriptor() ([]byte, []int)deprecated
- func (x ErrorReason) Number() protoreflect.EnumNumber
- func (x ErrorReason) String() string
- func (ErrorReason) Type() protoreflect.EnumType
- type ListChildrenReply
- func (*ListChildrenReply) Descriptor() ([]byte, []int)deprecated
- func (x *ListChildrenReply) GetItems() []*ListChildrenReply_Dict
- func (*ListChildrenReply) ProtoMessage()
- func (x *ListChildrenReply) ProtoReflect() protoreflect.Message
- func (x *ListChildrenReply) Reset()
- func (x *ListChildrenReply) String() string
- func (m *ListChildrenReply) Validate() error
- func (m *ListChildrenReply) ValidateAll() error
- type ListChildrenReplyMultiError
- type ListChildrenReplyValidationError
- func (e ListChildrenReplyValidationError) Cause() error
- func (e ListChildrenReplyValidationError) Error() string
- func (e ListChildrenReplyValidationError) ErrorName() string
- func (e ListChildrenReplyValidationError) Field() string
- func (e ListChildrenReplyValidationError) Key() bool
- func (e ListChildrenReplyValidationError) Reason() string
- type ListChildrenReply_Dict
- func (*ListChildrenReply_Dict) Descriptor() ([]byte, []int)deprecated
- func (x *ListChildrenReply_Dict) GetCreatedAt() *timestamppb.Timestamp
- func (x *ListChildrenReply_Dict) GetDictCode() string
- func (x *ListChildrenReply_Dict) GetHasChildren() bool
- func (x *ListChildrenReply_Dict) GetId() uint64
- func (x *ListChildrenReply_Dict) GetName() string
- func (x *ListChildrenReply_Dict) GetParentId() uint64
- func (x *ListChildrenReply_Dict) GetUpdatedAt() *timestamppb.Timestamp
- func (x *ListChildrenReply_Dict) GetValue() string
- func (*ListChildrenReply_Dict) ProtoMessage()
- func (x *ListChildrenReply_Dict) ProtoReflect() protoreflect.Message
- func (x *ListChildrenReply_Dict) Reset()
- func (x *ListChildrenReply_Dict) String() string
- func (m *ListChildrenReply_Dict) Validate() error
- func (m *ListChildrenReply_Dict) ValidateAll() error
- type ListChildrenReply_DictMultiError
- type ListChildrenReply_DictValidationError
- func (e ListChildrenReply_DictValidationError) Cause() error
- func (e ListChildrenReply_DictValidationError) Error() string
- func (e ListChildrenReply_DictValidationError) ErrorName() string
- func (e ListChildrenReply_DictValidationError) Field() string
- func (e ListChildrenReply_DictValidationError) Key() bool
- func (e ListChildrenReply_DictValidationError) Reason() string
- type ListChildrenRequest
- func (*ListChildrenRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ListChildrenRequest) GetId() uint64
- func (*ListChildrenRequest) ProtoMessage()
- func (x *ListChildrenRequest) ProtoReflect() protoreflect.Message
- func (x *ListChildrenRequest) Reset()
- func (x *ListChildrenRequest) String() string
- func (m *ListChildrenRequest) Validate() error
- func (m *ListChildrenRequest) ValidateAll() error
- type ListChildrenRequestMultiError
- type ListChildrenRequestValidationError
- func (e ListChildrenRequestValidationError) Cause() error
- func (e ListChildrenRequestValidationError) Error() string
- func (e ListChildrenRequestValidationError) ErrorName() string
- func (e ListChildrenRequestValidationError) Field() string
- func (e ListChildrenRequestValidationError) Key() bool
- func (e ListChildrenRequestValidationError) Reason() string
- type UnimplementedDataDictServer
- type UnsafeDataDictServer
Constants ¶
This section is empty.
Variables ¶
var ( ErrorReason_name = map[int32]string{ 0: "DICT_INVALID_DATA_FORMAT", 1: "DICT_INVALID_ARGUMENT", 2: "DICT_SYSTEM_ERROR", } ErrorReason_value = map[string]int32{ "DICT_INVALID_DATA_FORMAT": 0, "DICT_INVALID_ARGUMENT": 1, "DICT_SYSTEM_ERROR": 2, } )
Enum value maps for ErrorReason.
var DataDict_ServiceDesc = grpc.ServiceDesc{ ServiceName: "dict.v1.DataDict", HandlerType: (*DataDictServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "ListChildren", Handler: _DataDict_ListChildren_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "v1/dict.proto", }
DataDict_ServiceDesc is the grpc.ServiceDesc for DataDict service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_v1_dict_proto protoreflect.FileDescriptor
var File_v1_error_reason_proto protoreflect.FileDescriptor
Functions ¶
func ListChildrenHandler ¶
func ListChildrenHandler(srv DataDictHTTPServer) func(ctx *gin.Context)
@Tags 获取子级列表 @Summary 子级列表 @Description 获取指定父级 ID 的子级列表 @Accept json @Produce json @Param id path int true "父级 id" Format(uint64) @Success 200 {array} ListChildrenReply @Router /admin/datadict/dicts/{id} [get]
func RegisterDataDictHTTPServer ¶
func RegisterDataDictHTTPServer(r *gin.Engine, srv DataDictHTTPServer)
func RegisterDataDictServer ¶
func RegisterDataDictServer(s grpc.ServiceRegistrar, srv DataDictServer)
Types ¶
type DataDictClient ¶
type DataDictClient interface {
ListChildren(ctx context.Context, in *ListChildrenRequest, opts ...grpc.CallOption) (*ListChildrenReply, error)
}
DataDictClient is the client API for DataDict 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 NewDataDictClient ¶
func NewDataDictClient(cc grpc.ClientConnInterface) DataDictClient
type DataDictHTTPServer ¶
type DataDictHTTPServer interface {
ListChildren(context.Context, *ListChildrenRequest) (*ListChildrenReply, error)
}
type DataDictServer ¶
type DataDictServer interface { ListChildren(context.Context, *ListChildrenRequest) (*ListChildrenReply, error) // contains filtered or unexported methods }
DataDictServer is the server API for DataDict service. All implementations must embed UnimplementedDataDictServer for forward compatibility
type ErrorReason ¶
type ErrorReason int32
const ( ErrorReason_DICT_INVALID_DATA_FORMAT ErrorReason = 0 ErrorReason_DICT_INVALID_ARGUMENT ErrorReason = 1 ErrorReason_DICT_SYSTEM_ERROR ErrorReason = 2 )
func (ErrorReason) Descriptor ¶
func (ErrorReason) Descriptor() protoreflect.EnumDescriptor
func (ErrorReason) Enum ¶
func (x ErrorReason) Enum() *ErrorReason
func (ErrorReason) EnumDescriptor
deprecated
func (ErrorReason) EnumDescriptor() ([]byte, []int)
Deprecated: Use ErrorReason.Descriptor instead.
func (ErrorReason) Number ¶
func (x ErrorReason) Number() protoreflect.EnumNumber
func (ErrorReason) String ¶
func (x ErrorReason) String() string
func (ErrorReason) Type ¶
func (ErrorReason) Type() protoreflect.EnumType
type ListChildrenReply ¶
type ListChildrenReply struct { Items []*ListChildrenReply_Dict `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"` // contains filtered or unexported fields }
func (*ListChildrenReply) Descriptor
deprecated
func (*ListChildrenReply) Descriptor() ([]byte, []int)
Deprecated: Use ListChildrenReply.ProtoReflect.Descriptor instead.
func (*ListChildrenReply) GetItems ¶
func (x *ListChildrenReply) GetItems() []*ListChildrenReply_Dict
func (*ListChildrenReply) ProtoMessage ¶
func (*ListChildrenReply) ProtoMessage()
func (*ListChildrenReply) ProtoReflect ¶
func (x *ListChildrenReply) ProtoReflect() protoreflect.Message
func (*ListChildrenReply) Reset ¶
func (x *ListChildrenReply) Reset()
func (*ListChildrenReply) String ¶
func (x *ListChildrenReply) String() string
func (*ListChildrenReply) Validate ¶
func (m *ListChildrenReply) Validate() error
Validate checks the field values on ListChildrenReply 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 (*ListChildrenReply) ValidateAll ¶
func (m *ListChildrenReply) ValidateAll() error
ValidateAll checks the field values on ListChildrenReply 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 ListChildrenReplyMultiError, or nil if none found.
type ListChildrenReplyMultiError ¶
type ListChildrenReplyMultiError []error
ListChildrenReplyMultiError is an error wrapping multiple validation errors returned by ListChildrenReply.ValidateAll() if the designated constraints aren't met.
func (ListChildrenReplyMultiError) AllErrors ¶
func (m ListChildrenReplyMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (ListChildrenReplyMultiError) Error ¶
func (m ListChildrenReplyMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type ListChildrenReplyValidationError ¶
type ListChildrenReplyValidationError struct {
// contains filtered or unexported fields
}
ListChildrenReplyValidationError is the validation error returned by ListChildrenReply.Validate if the designated constraints aren't met.
func (ListChildrenReplyValidationError) Cause ¶
func (e ListChildrenReplyValidationError) Cause() error
Cause function returns cause value.
func (ListChildrenReplyValidationError) Error ¶
func (e ListChildrenReplyValidationError) Error() string
Error satisfies the builtin error interface
func (ListChildrenReplyValidationError) ErrorName ¶
func (e ListChildrenReplyValidationError) ErrorName() string
ErrorName returns error name.
func (ListChildrenReplyValidationError) Field ¶
func (e ListChildrenReplyValidationError) Field() string
Field function returns field value.
func (ListChildrenReplyValidationError) Key ¶
func (e ListChildrenReplyValidationError) Key() bool
Key function returns key value.
func (ListChildrenReplyValidationError) Reason ¶
func (e ListChildrenReplyValidationError) Reason() string
Reason function returns reason value.
type ListChildrenReply_Dict ¶
type ListChildrenReply_Dict struct { Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` CreatedAt *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=createdAt,proto3" json:"createdAt,omitempty"` UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=updatedAt,proto3" json:"updatedAt,omitempty"` ParentId uint64 `protobuf:"varint,4,opt,name=parentId,proto3" json:"parentId,omitempty"` Name string `protobuf:"bytes,5,opt,name=name,proto3" json:"name,omitempty"` Value string `protobuf:"bytes,6,opt,name=value,proto3" json:"value,omitempty"` DictCode string `protobuf:"bytes,7,opt,name=dictCode,proto3" json:"dictCode,omitempty"` HasChildren bool `protobuf:"varint,8,opt,name=hasChildren,proto3" json:"hasChildren,omitempty"` // contains filtered or unexported fields }
func (*ListChildrenReply_Dict) Descriptor
deprecated
func (*ListChildrenReply_Dict) Descriptor() ([]byte, []int)
Deprecated: Use ListChildrenReply_Dict.ProtoReflect.Descriptor instead.
func (*ListChildrenReply_Dict) GetCreatedAt ¶
func (x *ListChildrenReply_Dict) GetCreatedAt() *timestamppb.Timestamp
func (*ListChildrenReply_Dict) GetDictCode ¶
func (x *ListChildrenReply_Dict) GetDictCode() string
func (*ListChildrenReply_Dict) GetHasChildren ¶
func (x *ListChildrenReply_Dict) GetHasChildren() bool
func (*ListChildrenReply_Dict) GetId ¶
func (x *ListChildrenReply_Dict) GetId() uint64
func (*ListChildrenReply_Dict) GetName ¶
func (x *ListChildrenReply_Dict) GetName() string
func (*ListChildrenReply_Dict) GetParentId ¶
func (x *ListChildrenReply_Dict) GetParentId() uint64
func (*ListChildrenReply_Dict) GetUpdatedAt ¶
func (x *ListChildrenReply_Dict) GetUpdatedAt() *timestamppb.Timestamp
func (*ListChildrenReply_Dict) GetValue ¶
func (x *ListChildrenReply_Dict) GetValue() string
func (*ListChildrenReply_Dict) ProtoMessage ¶
func (*ListChildrenReply_Dict) ProtoMessage()
func (*ListChildrenReply_Dict) ProtoReflect ¶
func (x *ListChildrenReply_Dict) ProtoReflect() protoreflect.Message
func (*ListChildrenReply_Dict) Reset ¶
func (x *ListChildrenReply_Dict) Reset()
func (*ListChildrenReply_Dict) String ¶
func (x *ListChildrenReply_Dict) String() string
func (*ListChildrenReply_Dict) Validate ¶
func (m *ListChildrenReply_Dict) Validate() error
Validate checks the field values on ListChildrenReply_Dict 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 (*ListChildrenReply_Dict) ValidateAll ¶
func (m *ListChildrenReply_Dict) ValidateAll() error
ValidateAll checks the field values on ListChildrenReply_Dict 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 ListChildrenReply_DictMultiError, or nil if none found.
type ListChildrenReply_DictMultiError ¶
type ListChildrenReply_DictMultiError []error
ListChildrenReply_DictMultiError is an error wrapping multiple validation errors returned by ListChildrenReply_Dict.ValidateAll() if the designated constraints aren't met.
func (ListChildrenReply_DictMultiError) AllErrors ¶
func (m ListChildrenReply_DictMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (ListChildrenReply_DictMultiError) Error ¶
func (m ListChildrenReply_DictMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type ListChildrenReply_DictValidationError ¶
type ListChildrenReply_DictValidationError struct {
// contains filtered or unexported fields
}
ListChildrenReply_DictValidationError is the validation error returned by ListChildrenReply_Dict.Validate if the designated constraints aren't met.
func (ListChildrenReply_DictValidationError) Cause ¶
func (e ListChildrenReply_DictValidationError) Cause() error
Cause function returns cause value.
func (ListChildrenReply_DictValidationError) Error ¶
func (e ListChildrenReply_DictValidationError) Error() string
Error satisfies the builtin error interface
func (ListChildrenReply_DictValidationError) ErrorName ¶
func (e ListChildrenReply_DictValidationError) ErrorName() string
ErrorName returns error name.
func (ListChildrenReply_DictValidationError) Field ¶
func (e ListChildrenReply_DictValidationError) Field() string
Field function returns field value.
func (ListChildrenReply_DictValidationError) Key ¶
func (e ListChildrenReply_DictValidationError) Key() bool
Key function returns key value.
func (ListChildrenReply_DictValidationError) Reason ¶
func (e ListChildrenReply_DictValidationError) Reason() string
Reason function returns reason value.
type ListChildrenRequest ¶
type ListChildrenRequest struct { Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*ListChildrenRequest) Descriptor
deprecated
func (*ListChildrenRequest) Descriptor() ([]byte, []int)
Deprecated: Use ListChildrenRequest.ProtoReflect.Descriptor instead.
func (*ListChildrenRequest) GetId ¶
func (x *ListChildrenRequest) GetId() uint64
func (*ListChildrenRequest) ProtoMessage ¶
func (*ListChildrenRequest) ProtoMessage()
func (*ListChildrenRequest) ProtoReflect ¶
func (x *ListChildrenRequest) ProtoReflect() protoreflect.Message
func (*ListChildrenRequest) Reset ¶
func (x *ListChildrenRequest) Reset()
func (*ListChildrenRequest) String ¶
func (x *ListChildrenRequest) String() string
func (*ListChildrenRequest) Validate ¶
func (m *ListChildrenRequest) Validate() error
Validate checks the field values on ListChildrenRequest 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 (*ListChildrenRequest) ValidateAll ¶
func (m *ListChildrenRequest) ValidateAll() error
ValidateAll checks the field values on ListChildrenRequest 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 ListChildrenRequestMultiError, or nil if none found.
type ListChildrenRequestMultiError ¶
type ListChildrenRequestMultiError []error
ListChildrenRequestMultiError is an error wrapping multiple validation errors returned by ListChildrenRequest.ValidateAll() if the designated constraints aren't met.
func (ListChildrenRequestMultiError) AllErrors ¶
func (m ListChildrenRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (ListChildrenRequestMultiError) Error ¶
func (m ListChildrenRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type ListChildrenRequestValidationError ¶
type ListChildrenRequestValidationError struct {
// contains filtered or unexported fields
}
ListChildrenRequestValidationError is the validation error returned by ListChildrenRequest.Validate if the designated constraints aren't met.
func (ListChildrenRequestValidationError) Cause ¶
func (e ListChildrenRequestValidationError) Cause() error
Cause function returns cause value.
func (ListChildrenRequestValidationError) Error ¶
func (e ListChildrenRequestValidationError) Error() string
Error satisfies the builtin error interface
func (ListChildrenRequestValidationError) ErrorName ¶
func (e ListChildrenRequestValidationError) ErrorName() string
ErrorName returns error name.
func (ListChildrenRequestValidationError) Field ¶
func (e ListChildrenRequestValidationError) Field() string
Field function returns field value.
func (ListChildrenRequestValidationError) Key ¶
func (e ListChildrenRequestValidationError) Key() bool
Key function returns key value.
func (ListChildrenRequestValidationError) Reason ¶
func (e ListChildrenRequestValidationError) Reason() string
Reason function returns reason value.
type UnimplementedDataDictServer ¶
type UnimplementedDataDictServer struct { }
UnimplementedDataDictServer must be embedded to have forward compatible implementations.
func (UnimplementedDataDictServer) ListChildren ¶
func (UnimplementedDataDictServer) ListChildren(context.Context, *ListChildrenRequest) (*ListChildrenReply, error)
type UnsafeDataDictServer ¶
type UnsafeDataDictServer interface {
// contains filtered or unexported methods
}
UnsafeDataDictServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to DataDictServer will result in compilation errors.