v1

package
v0.0.0-...-d49c957 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2022 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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

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

View Source
var File_v1_dict_proto protoreflect.FileDescriptor
View Source
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) 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

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

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

Cause function returns cause value.

func (ListChildrenReplyValidationError) Error

Error satisfies the builtin error interface

func (ListChildrenReplyValidationError) ErrorName

ErrorName returns error name.

func (ListChildrenReplyValidationError) Field

Field function returns field value.

func (ListChildrenReplyValidationError) Key

Key function returns key value.

func (ListChildrenReplyValidationError) Reason

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

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

Cause function returns cause value.

func (ListChildrenReply_DictValidationError) Error

Error satisfies the builtin error interface

func (ListChildrenReply_DictValidationError) ErrorName

ErrorName returns error name.

func (ListChildrenReply_DictValidationError) Field

Field function returns field value.

func (ListChildrenReply_DictValidationError) Key

Key function returns key value.

func (ListChildrenReply_DictValidationError) Reason

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

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

Cause function returns cause value.

func (ListChildrenRequestValidationError) Error

Error satisfies the builtin error interface

func (ListChildrenRequestValidationError) ErrorName

ErrorName returns error name.

func (ListChildrenRequestValidationError) Field

Field function returns field value.

func (ListChildrenRequestValidationError) Key

Key function returns key value.

func (ListChildrenRequestValidationError) Reason

Reason function returns reason value.

type UnimplementedDataDictServer

type UnimplementedDataDictServer struct {
}

UnimplementedDataDictServer must be embedded to have forward compatible implementations.

func (UnimplementedDataDictServer) ListChildren

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.

Directories

Path Synopsis
Package docs GENERATED BY SWAG; DO NOT EDIT This file was generated by swaggo/swag
Package docs GENERATED BY SWAG; DO NOT EDIT This file was generated by swaggo/swag

Jump to

Keyboard shortcuts

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