Documentation ¶
Index ¶
- func DefaultGormConfig() *gorm.Config
- 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 TopologyQuery(opts TopologyOptions) (string, map[string]any)
- type TopologyOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultGormConfig ¶ added in v1.0.6
func NewGorm ¶
creates a new Gorm DB connection using the global pgx connection pool, must be called after NewPgxPool
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
Click to show internal directories.
Click to hide internal directories.