repository

package
v1.5.2 Latest Latest
Warning

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

Go to latest
Published: May 9, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuditLogRepository

type AuditLogRepository struct {
	// contains filtered or unexported fields
}

func NewAuditLogRepository

func NewAuditLogRepository(mysqlInstance mysqldb.IMysqlInstance) *AuditLogRepository

func (*AuditLogRepository) CreateAuditLog

func (a *AuditLogRepository) CreateAuditLog(ctx context.Context, auditLog *model.AuditLog) error

type ClusterRepository

type ClusterRepository struct {
	// contains filtered or unexported fields
}

func NewClusterRepository

func NewClusterRepository(mysqlInstance mysqldb.IMysqlInstance) *ClusterRepository

func (*ClusterRepository) CreateCluster

func (c *ClusterRepository) CreateCluster(ctx context.Context, cluster *model.Cluster) error

func (*ClusterRepository) DeleteUpdateCluster

func (c *ClusterRepository) DeleteUpdateCluster(ctx context.Context, cluster *model.Cluster, clusterUUID string) error

func (*ClusterRepository) GetClusterByUUID

func (c *ClusterRepository) GetClusterByUUID(ctx context.Context, uuid string) (*model.Cluster, error)

func (*ClusterRepository) GetClustersByProjectId

func (c *ClusterRepository) GetClustersByProjectId(ctx context.Context, projectId string) ([]model.Cluster, error)

func (*ClusterRepository) UpdateCluster

func (c *ClusterRepository) UpdateCluster(ctx context.Context, cluster *model.Cluster) error

type IAuditLogRepository

type IAuditLogRepository interface {
	CreateAuditLog(ctx context.Context, auditLog *model.AuditLog) error
}

type IClusterRepository

type IClusterRepository interface {
	GetClusterByUUID(ctx context.Context, uuid string) (*model.Cluster, error)
	GetClustersByProjectId(ctx context.Context, projectId string) ([]model.Cluster, error)
	CreateCluster(ctx context.Context, cluster *model.Cluster) error
	UpdateCluster(ctx context.Context, cluster *model.Cluster) error
	DeleteUpdateCluster(ctx context.Context, cluster *model.Cluster, clusterUUID string) error
}

type IKubeconfigRepository

type IKubeconfigRepository interface {
	GetKubeconfigByUUID(ctx context.Context, clusterUUID string) (*model.Kubeconfigs, error)
	CreateKubeconfig(ctx context.Context, kubeconfig *model.Kubeconfigs) error
	UpdateKubeconfig(ctx context.Context, clusterUUID string, kubeConfig string) error
}

type INodeGroupsRepository

type INodeGroupsRepository interface {
	GetNodeGroupsByClusterUUID(ctx context.Context, uuid, nodeType, nodeGroupStatus string) ([]model.NodeGroups, error)
	CreateNodeGroups(ctx context.Context, nodeGroups *model.NodeGroups) error
	UpdateNodeGroups(ctx context.Context, nodeGroups *model.NodeGroups) error
	GetNodeGroupByUUID(ctx context.Context, uuid string) (*model.NodeGroups, error)
	GetClusterProjectUUIDByNodeGroupUUID(ctx context.Context, nodeGroupUUID string) (string, error)
}

type IRepository

type IRepository interface {
	Cluster() IClusterRepository
	AuditLog() IAuditLogRepository
	Kubeconfig() IKubeconfigRepository
	NodeGroups() INodeGroupsRepository
	StartDBTransaction(ctx context.Context) (*gorm.DB, error)
	CommitDBTransaction(tx *gorm.DB) error
}

type KubeconfigRepository

type KubeconfigRepository struct {
	// contains filtered or unexported fields
}

func NewKubeconfigRepository

func NewKubeconfigRepository(mysqlInstance mysqldb.IMysqlInstance) *KubeconfigRepository

func (*KubeconfigRepository) CreateKubeconfig

func (k *KubeconfigRepository) CreateKubeconfig(ctx context.Context, kubeconfig *model.Kubeconfigs) error

func (*KubeconfigRepository) GetKubeconfigByUUID

func (k *KubeconfigRepository) GetKubeconfigByUUID(ctx context.Context, clusterUUID string) (*model.Kubeconfigs, error)

func (*KubeconfigRepository) UpdateKubeconfig added in v1.1.10

func (k *KubeconfigRepository) UpdateKubeconfig(ctx context.Context, clusterUUID string, kubeConfig string) error

type NodeGroupsRepository

type NodeGroupsRepository struct {
	// contains filtered or unexported fields
}

func NewNodeGroupsRepository

func NewNodeGroupsRepository(mysqlInstance mysqldb.IMysqlInstance) *NodeGroupsRepository

func (*NodeGroupsRepository) CreateNodeGroups

func (n *NodeGroupsRepository) CreateNodeGroups(ctx context.Context, nodeGroups *model.NodeGroups) error

func (*NodeGroupsRepository) GetClusterProjectUUIDByNodeGroupUUID

func (c *NodeGroupsRepository) GetClusterProjectUUIDByNodeGroupUUID(ctx context.Context, nodeGroupUUID string) (string, error)

func (*NodeGroupsRepository) GetNodeGroupByUUID

func (n *NodeGroupsRepository) GetNodeGroupByUUID(ctx context.Context, uuid string) (*model.NodeGroups, error)

func (*NodeGroupsRepository) GetNodeGroupsByClusterUUID

func (n *NodeGroupsRepository) GetNodeGroupsByClusterUUID(ctx context.Context, uuid, nodeType, nodeGroupStatus string) ([]model.NodeGroups, error)

func (*NodeGroupsRepository) UpdateNodeGroups

func (n *NodeGroupsRepository) UpdateNodeGroups(ctx context.Context, nodeGroups *model.NodeGroups) error

Jump to

Keyboard shortcuts

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