dao

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2026 License: Apache-2.0 Imports: 13 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AdapterStatusDao

type AdapterStatusDao interface {
	Get(ctx context.Context, id string) (*api.AdapterStatus, error)
	Create(ctx context.Context, adapterStatus *api.AdapterStatus) (*api.AdapterStatus, error)
	Replace(ctx context.Context, adapterStatus *api.AdapterStatus) (*api.AdapterStatus, error)
	Upsert(ctx context.Context, adapterStatus *api.AdapterStatus) (*api.AdapterStatus, error)
	Delete(ctx context.Context, id string) error
	FindByResource(ctx context.Context, resourceType, resourceID string) (api.AdapterStatusList, error)
	FindByResourcePaginated(
		ctx context.Context, resourceType, resourceID string, offset, limit int,
	) (api.AdapterStatusList, int64, error)
	FindByResourceAndAdapter(
		ctx context.Context, resourceType, resourceID, adapter string,
	) (*api.AdapterStatus, error)
	All(ctx context.Context) (api.AdapterStatusList, error)
}

func NewAdapterStatusDao

func NewAdapterStatusDao(sessionFactory *db.SessionFactory) AdapterStatusDao

type ClusterDao

type ClusterDao interface {
	Get(ctx context.Context, id string) (*api.Cluster, error)
	Create(ctx context.Context, cluster *api.Cluster) (*api.Cluster, error)
	Replace(ctx context.Context, cluster *api.Cluster) (*api.Cluster, error)
	Delete(ctx context.Context, id string) error
	FindByIDs(ctx context.Context, ids []string) (api.ClusterList, error)
	All(ctx context.Context) (api.ClusterList, error)
}

func NewClusterDao

func NewClusterDao(sessionFactory *db.SessionFactory) ClusterDao

type GenericDao

type GenericDao interface {
	Fetch(offset int, limit int, resourceList interface{}) error

	GetInstanceDao(ctx context.Context, model interface{}) GenericDao
	Preload(preload string)
	OrderBy(orderBy string)
	Joins(sql string)
	Group(sql string)
	Where(where Where)
	Count(model interface{}, total *int64)
	Validate(resourceList interface{}) error

	GetTableName() string
	GetTableRelation(fieldName string) (TableRelation, bool)
}

func NewGenericDao

func NewGenericDao(sessionFactory *db.SessionFactory) GenericDao

type NodePoolDao

type NodePoolDao interface {
	Get(ctx context.Context, id string) (*api.NodePool, error)
	Create(ctx context.Context, nodePool *api.NodePool) (*api.NodePool, error)
	Replace(ctx context.Context, nodePool *api.NodePool) (*api.NodePool, error)
	Delete(ctx context.Context, id string) error
	FindByIDs(ctx context.Context, ids []string) (api.NodePoolList, error)
	All(ctx context.Context) (api.NodePoolList, error)
}

func NewNodePoolDao

func NewNodePoolDao(sessionFactory *db.SessionFactory) NodePoolDao

type TableRelation

type TableRelation struct {
	TableName         string
	ColumnName        string
	ForeignTableName  string
	ForeignColumnName string
}

TableRelation represents a relationship between two tables. They can be joined, ON TableName.ColumnName = ForeignTableName.ForeignColumnName

type Where

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

func NewWhere

func NewWhere(sql string, values []any) Where

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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