infra

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2023 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ProvideFiber

func ProvideFiber(lc fx.Lifecycle, config *Config) (*fiber.App, fiber.Router)

Types

type Config added in v1.0.0

type Config struct {
	Address     string `env:"ADDRESS" envDefault:"0.0.0.0:7080"`
	Root        string `env:"ROOT" envDefault:"./arkwaifu-root"`
	PostgresDSN string `env:"POSTGRES_DSN"`
	Users       []User
}

func ProvideConfig added in v1.0.0

func ProvideConfig() (*Config, error)

type Gorm added in v1.4.0

type Gorm struct {
	*gorm.DB
}

func ProvideGorm added in v1.0.0

func ProvideGorm(config *Config) (*Gorm, error)

func (*Gorm) CreateCollateNumeric added in v1.4.0

func (db *Gorm) CreateCollateNumeric() error

func (*Gorm) CreateEnum added in v1.4.0

func (db *Gorm) CreateEnum(name string, values ...string) error

type User added in v1.1.0

type User struct {
	ID   uuid.UUID
	Name string
}

Jump to

Keyboard shortcuts

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