duty

package module
v1.0.42 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2023 License: Apache-2.0 Imports: 18 Imported by: 19

README

duty

Duty (Database Utility) is a home for common database tools, models and helpers.

Documentation

Index

Constants

View Source
const DefaultDepth = 5

Variables

This section is empty.

Functions

func DefaultGormConfig added in v1.0.6

func DefaultGormConfig() *gorm.Config

func Migrate added in v1.0.10

func Migrate(connection string) error

func NewDB

func NewDB(connection string) (*sql.DB, error)

func NewGorm

func NewGorm(connection string, config *gorm.Config) (*gorm.DB, error)

creates a new Gorm DB connection using the global pgx connection pool, must be called after NewPgxPool

func NewPgxPool

func NewPgxPool(connection string) (*pgxpool.Pool, error)

func QueryCheckSummary added in v1.0.34

func QueryCheckSummary(dbpool *pgxpool.Pool) (models.Checks, error)

func QueryTopology added in v1.0.24

func QueryTopology(dbpool *pgxpool.Pool, params TopologyOptions) ([]*models.Component, error)

func RefreshCheckStatusSummary added in v1.0.34

func RefreshCheckStatusSummary(dbpool *pgxpool.Pool) error

Types

type TopologyOptions added in v1.0.11

type TopologyOptions struct {
	ID      string
	Owner   string
	Labels  map[string]string
	Flatten bool
	Depth   int
	Types   []string
	Status  []string
}

func (TopologyOptions) String added in v1.0.11

func (opt TopologyOptions) String() string

Directories

Path Synopsis
fixtures
hack
migrate Module

Jump to

Keyboard shortcuts

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