manager

package
v0.0.0-...-6cdb919 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

type Manager interface {
	// Create template
	Create(ctx context.Context, template *models.Template) (*models.Template, error)
	ListV2(ctx context.Context, query *q.Query, groupIDs ...uint) ([]*models.Template, error)
	// ListTemplate returns all template
	ListTemplate(ctx context.Context) ([]*models.Template, error)
	// ListByGroupID lists all template by group ID
	ListByGroupID(ctx context.Context, groupID uint) ([]*models.Template, error)
	// DeleteByID deletes template by ID
	DeleteByID(ctx context.Context, id uint) error
	// GetByID gets a template by ID
	GetByID(ctx context.Context, id uint) (*models.Template, error)
	// GetByName gets a template by name
	GetByName(ctx context.Context, name string) (*models.Template, error)
	GetRefOfApplication(ctx context.Context, id uint) ([]*amodels.Application, uint, error)
	GetRefOfCluster(ctx context.Context, id uint) ([]*cmodels.Cluster, uint, error)
	UpdateByID(ctx context.Context, id uint, template *models.Template) error
	ListByGroupIDs(ctx context.Context, ids []uint) ([]*models.Template, error)
	ListByIDs(ctx context.Context, ids []uint) ([]*models.Template, error)
}

nolint

func New

func New(db *gorm.DB) Manager

Jump to

Keyboard shortcuts

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