Documentation ¶
Index ¶
- Constants
- func DefaultGormConfig() *gorm.Config
- func FindConnection(ctx context.Context, db *gorm.DB, connectionType, name string) (*models.Connection, error)
- func GetComponent(ctx context.Context, db *gorm.DB, id string) (*models.Component, error)
- func GetConfigMapFromCache(c kubernetes.Interface, namespace, name, key string) (string, error)
- func GetConnection(ctx context.Context, client kubernetes.Interface, db *gorm.DB, ...) (*models.Connection, error)
- func GetEnvStringFromCache(c kubernetes.Interface, env string, namespace string) (string, error)
- func GetEnvValueFromCache(c kubernetes.Interface, input types.EnvVar, namespace string) (string, error)
- func GetSecretFromCache(c kubernetes.Interface, namespace, name, key string) (string, error)
- func Migrate(connection string) error
- func NewDB(connection string) (*sql.DB, error)
- func NewGorm(connection string, config *gorm.Config) (*gorm.DB, error)
- func NewPgxPool(connection string) (*pgxpool.Pool, error)
- func Query(ctx context.Context, conn *pgxpool.Pool, query string) ([]map[string]any, error)
- func QueryCheckSummary(dbpool *pgxpool.Pool) (models.Checks, error)
- func QueryTopology(dbpool *pgxpool.Pool, params TopologyOptions) ([]*models.Component, error)
- func RefreshCheckStatusSummary(dbpool *pgxpool.Pool) error
- type TopologyOptions
Constants ¶
View Source
const DefaultDepth = 5
Variables ¶
This section is empty.
Functions ¶
func DefaultGormConfig ¶ added in v1.0.6
func FindConnection ¶ added in v1.0.45
func FindConnection(ctx context.Context, db *gorm.DB, connectionType, name string) (*models.Connection, error)
FindConnection returns the connection with the given type and name
func GetComponent ¶ added in v1.0.45
func GetConfigMapFromCache ¶ added in v1.0.45
func GetConfigMapFromCache(c kubernetes.Interface, namespace, name, key string) (string, error)
func GetConnection ¶ added in v1.0.45
func GetEnvStringFromCache ¶ added in v1.0.45
func GetEnvValueFromCache ¶ added in v1.0.45
func GetSecretFromCache ¶ added in v1.0.45
func GetSecretFromCache(c kubernetes.Interface, namespace, name, key string) (string, error)
func NewGorm ¶
creates a new Gorm DB connection using the global pgx connection pool, must be called after NewPgxPool
func Query ¶ added in v1.0.43
Query runs the given SQL query against the provided db connection. The rows are returned as a map of columnName=>columnValue.
func QueryCheckSummary ¶ added in v1.0.34
func QueryTopology ¶ added in v1.0.24
func RefreshCheckStatusSummary ¶ added in v1.0.34
Types ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.