Documentation ¶
Index ¶
- type GetResourceRequest
- type ListResourceRequest
- type Repo
- type Resource
- type ResourceServer
- type ResourceValue
- type Server
- type UseCase
- func (u *UseCase) CreateResource(ctx kratosx.Context, req *Resource) (uint32, error)
- func (u *UseCase) DeleteResource(ctx kratosx.Context, ids []uint32) (uint32, error)
- func (u *UseCase) GetResource(ctx kratosx.Context, req *GetResourceRequest) (*Resource, error)
- func (u *UseCase) ListResource(ctx kratosx.Context, req *ListResourceRequest) ([]*Resource, uint32, error)
- func (u *UseCase) ListResourceValue(ctx kratosx.Context, bid uint32) ([]*ResourceValue, uint32, error)
- func (u *UseCase) UpdateResource(ctx kratosx.Context, req *Resource) error
- func (u *UseCase) UpdateResourceValue(ctx kratosx.Context, list []*ResourceValue) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GetResourceRequest ¶ added in v1.0.35
type ListResourceRequest ¶ added in v1.0.35
type Repo ¶
type Repo interface { // GetResource 获取指定的资源配置信息 GetResource(ctx kratosx.Context, id uint32) (*Resource, error) // ListResource 获取资源配置信息列表 ListResource(ctx kratosx.Context, req *ListResourceRequest) ([]*Resource, uint32, error) // CreateResource 创建资源配置信息 CreateResource(ctx kratosx.Context, req *Resource) (uint32, error) // UpdateResource 更新资源配置信息 UpdateResource(ctx kratosx.Context, req *Resource) error // DeleteResource 删除资源配置信息 DeleteResource(ctx kratosx.Context, ids []uint32) (uint32, error) // GetResourceByKeyword 获取指定的资源配置信息 GetResourceByKeyword(ctx kratosx.Context, keyword string) (*Resource, error) // ListResourceValue 获取业务配置值信息列表 ListResourceValue(ctx kratosx.Context, bid uint32) ([]*ResourceValue, uint32, error) // UpdateResourceValues 更新业务配置值信息 UpdateResourceValues(ctx kratosx.Context, bs []*ResourceValue) error // AllResourceValue 获取全部可用的值 AllResourceValue(ctx kratosx.Context, eid, sid uint32) ([]*ResourceValue, error) // AllResourceField 获取全部可用的字段 AllResourceField(ctx kratosx.Context, sid uint32) ([]string, error) }
type Resource ¶
type Resource struct { Id uint32 `json:"id"` Keyword string `json:"keyword"` Fields string `json:"fields"` Tag string `json:"tag"` Private *bool `json:"private"` Description *string `json:"description"` CreatedAt int64 `json:"createdAt"` UpdatedAt int64 `json:"updatedAt"` Servers []*Server `json:"servers"` ResourceServers []*ResourceServer `json:"resourceServers"` }
type ResourceServer ¶
type ResourceValue ¶
type UseCase ¶
type UseCase struct {
// contains filtered or unexported fields
}
func (*UseCase) CreateResource ¶ added in v1.0.35
CreateResource 创建资源配置信息
func (*UseCase) DeleteResource ¶
DeleteResource 删除资源配置信息
func (*UseCase) GetResource ¶
GetResource 获取指定的资源配置信息
func (*UseCase) ListResource ¶ added in v1.0.35
func (u *UseCase) ListResource(ctx kratosx.Context, req *ListResourceRequest) ([]*Resource, uint32, error)
ListResource 获取资源配置信息列表
func (*UseCase) ListResourceValue ¶ added in v1.0.35
func (u *UseCase) ListResourceValue(ctx kratosx.Context, bid uint32) ([]*ResourceValue, uint32, error)
ListResourceValue 获取业务配置值信息列表
func (*UseCase) UpdateResource ¶
UpdateResource 更新资源配置信息
func (*UseCase) UpdateResourceValue ¶
func (u *UseCase) UpdateResourceValue(ctx kratosx.Context, list []*ResourceValue) error
UpdateResourceValue 更新业务配置值信息
Click to show internal directories.
Click to hide internal directories.