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: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DAO

type DAO interface {
	// GetEnvironmentRegionByID ...
	GetEnvironmentRegionByID(ctx context.Context, id uint) (*models.EnvironmentRegion, error)
	// ListAllEnvironmentRegions list all environmentRegions
	ListAllEnvironmentRegions(ctx context.Context) ([]*models.EnvironmentRegion, error)
	// GetEnvironmentRegionByEnvAndRegion get
	GetEnvironmentRegionByEnvAndRegion(ctx context.Context, env, region string) (*models.EnvironmentRegion, error)
	// CreateEnvironmentRegion create a environmentRegion
	CreateEnvironmentRegion(ctx context.Context, er *models.EnvironmentRegion) (*models.EnvironmentRegion, error)
	// ListRegionsByEnvironment list regions by environment
	ListRegionsByEnvironment(ctx context.Context, env string) ([]*models.EnvironmentRegion, error)
	// ListEnabledRegionsByEnvironment list regions by environment that are enabled
	ListEnabledRegionsByEnvironment(ctx context.Context, env string) (regionmodels.RegionParts, error)
	// GetDefaultRegionByEnvironment get default regions by environment
	GetDefaultRegionByEnvironment(ctx context.Context, env string) (*models.EnvironmentRegion, error)
	// GetDefaultRegions get all default regions
	GetDefaultRegions(ctx context.Context) ([]*models.EnvironmentRegion, error)
	// SetEnvironmentRegionToDefaultByID set region to default by id
	SetEnvironmentRegionToDefaultByID(ctx context.Context, id uint) error
	// DeleteByID delete an environmentRegion by id
	DeleteByID(ctx context.Context, id uint) error
}

func NewDAO

func NewDAO(db *gorm.DB) DAO

NewDAO returns an instance of the default DAO

Jump to

Keyboard shortcuts

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