dao

package
v0.0.0-...-d125d34 Latest Latest
Warning

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

Go to latest
Published: May 8, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenSQLForTagSelector

func GenSQLForTagSelector(tagSelectors []tagmodels.TagSelector, statement *gorm.DB) *gorm.DB

Types

type DAO

type DAO interface {
	Create(ctx context.Context, cluster *models.Cluster,
		tags []*tagmodels.Tag, extraMembers map[*usermodels.User]string) (*models.Cluster, error)
	GetByID(ctx context.Context, id uint, includeSoftDelete bool) (*models.Cluster, error)
	GetByName(ctx context.Context, clusterName string) (*models.Cluster, error)
	UpdateByID(ctx context.Context, id uint, cluster *models.Cluster) (*models.Cluster, error)
	DeleteByID(ctx context.Context, id uint) error
	CheckClusterExists(ctx context.Context, cluster string) (bool, error)
	List(ctx context.Context, query *q.Query, userID uint,
		withRegion bool, appIDs ...uint) (int, []*models.ClusterWithRegion, error)
	ListClusterWithExpiry(ctx context.Context, query *q.Query) ([]*models.Cluster, error)
	GetByNameFuzzily(ctx context.Context, name string, includeSoftDelete bool) ([]*models.Cluster, error)
}

func NewDAO

func NewDAO(db *gorm.DB) DAO

Jump to

Keyboard shortcuts

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