duty

package module
v1.0.14 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2023 License: Apache-2.0 Imports: 15 Imported by: 19

README

duty

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

Documentation

Index

Constants

This section is empty.

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 TopologyQuery added in v1.0.11

func TopologyQuery(opts TopologyOptions) (string, map[string]any)

Types

type TopologyOptions added in v1.0.11

type TopologyOptions struct {
	ID     string            `query:"id"`
	Owner  string            `query:"owner"`
	Labels map[string]string `query:"labels"`
}

func (TopologyOptions) String added in v1.0.11

func (opt TopologyOptions) String() string

Directories

Path Synopsis
hack
migrate Module

Jump to

Keyboard shortcuts

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