Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrResourceBound = errors.New("资源已被绑定,无法删除")
View Source
var (
ErrResourceNotFound = errors.New("资源未找到")
)
Functions ¶
This section is empty.
Types ¶
type AliResourceService ¶
type AliResourceService interface { // CreateResource 创建云资源 CreateResource(ctx context.Context, config model.TerraformConfig) (string, error) // GetTaskStatus 获取任务状态 GetTaskStatus(ctx context.Context, taskID string) (model.Task, error) // UpdateResource 更新云资源 UpdateResource(ctx context.Context, id int, updatedConfig model.TerraformConfig) error // DeleteResource 删除云资源 DeleteResource(ctx context.Context, id int) error // StartWorker 启动后台任务 StartWorker() }
func NewAliResourceService ¶
func NewAliResourceService(logger *zap.Logger, dao dao.TreeAliResourceDAO, redisClient redis.Cmdable, ecsDao dao.TreeEcsDAO, ecsResourceDao dao.TreeEcsResourceDAO) AliResourceService
type EcsResourceService ¶
type EcsResourceService interface { CreateEcsResource(ctx context.Context, obj *model.ResourceEcs) error UpdateEcsResource(ctx context.Context, obj *model.ResourceEcs) error DeleteEcsResource(ctx context.Context, id int) error GetAllResourcesByType(ctx context.Context, nid int, resourceType string, page int, size int) ([]*model.ResourceTree, error) }
func NewEcsResourceService ¶
func NewEcsResourceService(logger *zap.Logger, ecsResourceDao dao.TreeEcsResourceDAO, ecsDao dao.TreeEcsDAO) EcsResourceService
type EcsService ¶
type EcsService interface { GetEcsUnbindList(ctx context.Context) ([]*model.ResourceEcs, error) GetEcsList(ctx context.Context) ([]*model.ResourceEcs, error) BindEcs(ctx context.Context, ecsID int, treeNodeID int) error UnBindEcs(ctx context.Context, ecsID int, treeNodeID int) error GetEcsById(ctx context.Context, id int) (*model.ResourceEcs, error) }
func NewEcsService ¶
func NewEcsService(logger *zap.Logger, ecsDao dao.TreeEcsDAO, nodeDao dao.TreeNodeDAO) EcsService
type ElbService ¶
type ElbService interface { GetElbUnbindList(ctx context.Context) ([]*model.ResourceElb, error) GetElbList(ctx context.Context) ([]*model.ResourceElb, error) BindElb(ctx context.Context, elbID int, treeNodeID int) error UnBindElb(ctx context.Context, elbID int, treeNodeID int) error }
func NewElbService ¶
func NewElbService(logger *zap.Logger, elbDao dao.TreeElbDAO, nodeDao dao.TreeNodeDAO) ElbService
type RdsService ¶
type RdsService interface { GetRdsUnbindList(ctx context.Context) ([]*model.ResourceRds, error) GetRdsList(ctx context.Context) ([]*model.ResourceRds, error) BindRds(ctx context.Context, rdsID int, treeNodeID int) error UnBindRds(ctx context.Context, rdsID int, treeNodeID int) error }
func NewRdsService ¶
func NewRdsService(logger *zap.Logger, rdsDao dao.TreeRdsDAO, nodeDao dao.TreeNodeDAO) RdsService
type TreeNodeService ¶
type TreeNodeService interface { CreateTreeNode(ctx context.Context, obj *model.TreeNode) error DeleteTreeNode(ctx context.Context, id int) error GetChildrenTreeNodes(ctx context.Context, pid int) ([]*model.TreeNode, error) GetTopTreeNode(ctx context.Context) ([]*model.TreeNode, error) ListLeafTreeNodes(ctx context.Context) ([]*model.TreeNode, error) ListTreeNodes(ctx context.Context) ([]*model.TreeNode, error) SelectTreeNode(ctx context.Context, level int, levelLt int) ([]*model.TreeNode, error) UpdateTreeNode(ctx context.Context, obj *model.TreeNode) error }
func NewTreeNodeService ¶
func NewTreeNodeService(nodeDao dao.TreeNodeDAO, userDao dao2.UserDAO, l *zap.Logger) TreeNodeService
Click to show internal directories.
Click to hide internal directories.