dao

package
v0.0.21 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClusterDAO

type ClusterDAO interface {
	GetClusterList(ctx context.Context, req *model.ListClustersReq) ([]*model.K8sCluster, int64, error)
	CreateCluster(ctx context.Context, cluster *model.K8sCluster) error
	UpdateCluster(ctx context.Context, cluster *model.K8sCluster) error
	UpdateClusterStatus(ctx context.Context, id int, status model.ClusterStatus) error
	DeleteCluster(ctx context.Context, id int) error
	GetClusterByID(ctx context.Context, id int) (*model.K8sCluster, error)
	GetClusterByName(ctx context.Context, name string) (*model.K8sCluster, error)
}

func NewClusterDAO

func NewClusterDAO(db *gorm.DB, l *zap.Logger) ClusterDAO

type YamlTaskDAO

type YamlTaskDAO interface {
	ListAllYamlTasks(ctx context.Context, req *model.YamlTaskListReq) ([]*model.K8sYamlTask, error)
	CreateYamlTask(ctx context.Context, task *model.K8sYamlTask) error
	UpdateYamlTask(ctx context.Context, task *model.K8sYamlTask) error
	DeleteYamlTask(ctx context.Context, id int, clusterID int) error
	GetYamlTaskByID(ctx context.Context, id int, clusterID int) (*model.K8sYamlTask, error)
	GetYamlTaskByTemplateID(ctx context.Context, templateID int) ([]*model.K8sYamlTask, error)
}

func NewYamlTaskDAO

func NewYamlTaskDAO(db *gorm.DB, logger *zap.Logger) YamlTaskDAO

type YamlTemplateDAO

type YamlTemplateDAO interface {
	ListAllYamlTemplates(ctx context.Context, req *model.YamlTemplateListReq) ([]*model.K8sYamlTemplate, error)
	CreateYamlTemplate(ctx context.Context, yaml *model.K8sYamlTemplate) error
	UpdateYamlTemplate(ctx context.Context, yaml *model.K8sYamlTemplate) error
	DeleteYamlTemplate(ctx context.Context, id int, clusterId int) error
	GetYamlTemplateByID(ctx context.Context, id int, clusterId int) (*model.K8sYamlTemplate, error)
}

func NewYamlTemplateDAO

func NewYamlTemplateDAO(db *gorm.DB, l *zap.Logger) YamlTemplateDAO

Jump to

Keyboard shortcuts

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