Documentation ¶
Index ¶
- type PageResourceRequest
- type Repo
- type Resource
- type ResourceServer
- type ResourceValue
- type UseCase
- func (u *UseCase) AddResource(ctx kratosx.Context, resource *Resource) (uint32, error)
- func (u *UseCase) AllResourceField(ctx kratosx.Context, sid uint32) ([]string, error)
- func (u *UseCase) DeleteResource(ctx kratosx.Context, id uint32) error
- func (u *UseCase) GetResource(ctx kratosx.Context, id uint32) (*Resource, error)
- func (u *UseCase) GetResourceByKeyword(ctx kratosx.Context, keyword string) (*Resource, error)
- func (u *UseCase) GetResourceServerIds(ctx kratosx.Context, rid uint32) ([]uint32, error)
- func (u *UseCase) GetResourceValues(ctx kratosx.Context, rid uint32) ([]*ResourceValue, error)
- func (u *UseCase) PageResource(ctx kratosx.Context, req *PageResourceRequest) ([]*Resource, uint32, error)
- func (u *UseCase) UpdateResource(ctx kratosx.Context, resource *Resource) error
- func (u *UseCase) UpdateResourceValue(ctx kratosx.Context, rv *ResourceValue) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PageResourceRequest ¶
type Repo ¶
type Repo interface { GetResource(ctx kratosx.Context, id uint32) (*Resource, error) GetResourceByKeyword(ctx kratosx.Context, key string) (*Resource, error) PageResource(ctx kratosx.Context, req *PageResourceRequest) ([]*Resource, uint32, error) AddResource(ctx kratosx.Context, c *Resource) (uint32, error) UpdateResource(ctx kratosx.Context, c *Resource) error DeleteResource(ctx kratosx.Context, uint322 uint32) error GetResourceValues(ctx kratosx.Context, rid uint32) ([]*ResourceValue, error) UpdateResourceValue(ctx kratosx.Context, rv *ResourceValue) error GetResourceServerIds(ctx kratosx.Context, id uint32) ([]uint32, error) AllResourceValue(ctx kratosx.Context, eid, sid uint32) ([]*ResourceValue, error) AllResourceField(ctx kratosx.Context, sid uint32) ([]string, error) CheckResourceValue(ctx kratosx.Context, rid uint32, value string) error }
type ResourceServer ¶
type ResourceServer struct { ktypes.CreateModel ServerId uint32 `json:"server_id"` ResourceId uint32 `json:"resource_id"` }
type ResourceValue ¶
type UseCase ¶
type UseCase struct {
// contains filtered or unexported fields
}
func (*UseCase) AddResource ¶
AddResource 添加资源信息
func (*UseCase) AllResourceField ¶
AllResourceField 获取指定服务资源的字段
func (*UseCase) DeleteResource ¶
DeleteResource 删除资源信息
func (*UseCase) GetResource ¶
GetResource 获取指定资源信息
func (*UseCase) GetResourceByKeyword ¶
GetResourceByKeyword 获取指定标识的资源信息
func (*UseCase) GetResourceServerIds ¶
GetResourceServerIds 获取指定资源的关联服务id
func (*UseCase) GetResourceValues ¶
GetResourceValues 获取指定资源的所有环境值
func (*UseCase) PageResource ¶
func (u *UseCase) PageResource(ctx kratosx.Context, req *PageResourceRequest) ([]*Resource, uint32, error)
PageResource 获取分页资源信息
func (*UseCase) UpdateResource ¶
UpdateResource 更新资源信息
func (*UseCase) UpdateResourceValue ¶
func (u *UseCase) UpdateResourceValue(ctx kratosx.Context, rv *ResourceValue) error
UpdateResourceValue 更新指定资源的值
Click to show internal directories.
Click to hide internal directories.