Documentation ¶
Index ¶
- type Dictionary
- type DictionaryValue
- type GetDictionaryRequest
- type ListDictionaryRequest
- type ListDictionaryValueRequest
- type Repo
- type UseCase
- func (u *UseCase) CreateDictionary(ctx kratosx.Context, req *Dictionary) (uint32, error)
- func (u *UseCase) CreateDictionaryValue(ctx kratosx.Context, req *DictionaryValue) (uint32, error)
- func (u *UseCase) DeleteDictionary(ctx kratosx.Context, ids []uint32) (uint32, error)
- func (u *UseCase) DeleteDictionaryValue(ctx kratosx.Context, ids []uint32) (uint32, error)
- func (u *UseCase) GetDictionary(ctx kratosx.Context, req *GetDictionaryRequest) (*Dictionary, error)
- func (u *UseCase) GetDictionaryValues(ctx kratosx.Context, keywords []string) (map[string][]*DictionaryValue, error)
- func (u *UseCase) ListDictionary(ctx kratosx.Context, req *ListDictionaryRequest) ([]*Dictionary, uint32, error)
- func (u *UseCase) ListDictionaryValue(ctx kratosx.Context, req *ListDictionaryValueRequest) ([]*DictionaryValue, uint32, error)
- func (u *UseCase) UpdateDictionary(ctx kratosx.Context, req *Dictionary) error
- func (u *UseCase) UpdateDictionaryValue(ctx kratosx.Context, req *DictionaryValue) error
- func (u *UseCase) UpdateDictionaryValueStatus(ctx kratosx.Context, id uint32, status bool) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Dictionary ¶
type DictionaryValue ¶
type DictionaryValue struct { Id uint32 `json:"id"` DictionaryId uint32 `json:"dictionaryId"` Label string `json:"label"` Value string `json:"value"` Status *bool `json:"status"` Weight *int32 `json:"weight"` Type *string `json:"type"` Extra *string `json:"extra"` Description *string `json:"description"` CreatedAt int64 `json:"createdAt"` UpdatedAt int64 `json:"updatedAt"` }
type GetDictionaryRequest ¶ added in v1.0.15
type ListDictionaryRequest ¶ added in v1.0.15
type ListDictionaryValueRequest ¶ added in v1.0.15
type Repo ¶
type Repo interface { // ListDictionary 获取字典目录列表 ListDictionary(ctx kratosx.Context, req *ListDictionaryRequest) ([]*Dictionary, uint32, error) // CreateDictionary 创建字典目录 CreateDictionary(ctx kratosx.Context, req *Dictionary) (uint32, error) // UpdateDictionary 更新字典目录 UpdateDictionary(ctx kratosx.Context, req *Dictionary) error // DeleteDictionary 删除字典目录 DeleteDictionary(ctx kratosx.Context, ids []uint32) (uint32, error) // ListDictionaryValue 获取字典值目录列表 ListDictionaryValue(ctx kratosx.Context, req *ListDictionaryValueRequest) ([]*DictionaryValue, uint32, error) // AllDictionaryValue 获取全部字典值目录列表 AllDictionaryValue(ctx kratosx.Context, keyword string) ([]*DictionaryValue, error) // CreateDictionaryValue 创建字典值目录 CreateDictionaryValue(ctx kratosx.Context, req *DictionaryValue) (uint32, error) // UpdateDictionaryValue 更新字典值目录 UpdateDictionaryValue(ctx kratosx.Context, req *DictionaryValue) error // UpdateDictionaryValueStatus 更新字典值目录状态 UpdateDictionaryValueStatus(ctx kratosx.Context, id uint32, status bool) error // DeleteDictionaryValue 删除字典值目录 DeleteDictionaryValue(ctx kratosx.Context, ids []uint32) (uint32, error) // GetDictionary 获取指定的字典目录 GetDictionary(ctx kratosx.Context, id uint32) (*Dictionary, error) // GetDictionaryByKeyword 获取指定的字典目录 GetDictionaryByKeyword(ctx kratosx.Context, keyword string) (*Dictionary, error) }
type UseCase ¶
type UseCase struct {
// contains filtered or unexported fields
}
func (*UseCase) CreateDictionary ¶ added in v1.0.15
CreateDictionary 创建字典目录
func (*UseCase) CreateDictionaryValue ¶ added in v1.0.15
CreateDictionaryValue 创建字典值目录
func (*UseCase) DeleteDictionary ¶
DeleteDictionary 删除字典目录
func (*UseCase) DeleteDictionaryValue ¶
DeleteDictionaryValue 删除字典值目录
func (*UseCase) GetDictionary ¶ added in v1.0.15
func (u *UseCase) GetDictionary(ctx kratosx.Context, req *GetDictionaryRequest) (*Dictionary, error)
GetDictionary 获取指定的字典目录
func (*UseCase) GetDictionaryValues ¶ added in v1.0.16
func (u *UseCase) GetDictionaryValues(ctx kratosx.Context, keywords []string) (map[string][]*DictionaryValue, error)
GetDictionaryValues 获取字典值目录列表
func (*UseCase) ListDictionary ¶ added in v1.0.15
func (u *UseCase) ListDictionary(ctx kratosx.Context, req *ListDictionaryRequest) ([]*Dictionary, uint32, error)
ListDictionary 获取字典目录列表
func (*UseCase) ListDictionaryValue ¶ added in v1.0.15
func (u *UseCase) ListDictionaryValue(ctx kratosx.Context, req *ListDictionaryValueRequest) ([]*DictionaryValue, uint32, error)
ListDictionaryValue 获取字典值目录列表
func (*UseCase) UpdateDictionary ¶
func (u *UseCase) UpdateDictionary(ctx kratosx.Context, req *Dictionary) error
UpdateDictionary 更新字典目录
func (*UseCase) UpdateDictionaryValue ¶
func (u *UseCase) UpdateDictionaryValue(ctx kratosx.Context, req *DictionaryValue) error
UpdateDictionaryValue 更新字典值目录
Click to show internal directories.
Click to hide internal directories.