app

package
v0.0.0-...-410c955 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2024 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	// contains filtered or unexported fields
}

func NewApp

func NewApp(cfg Config) *App

func (*App) AfterQuery

func (a *App) AfterQuery(c context.Context, q *pg.QueryEvent) error

func (*App) BeforeQuery

func (a *App) BeforeQuery(c context.Context, q *pg.QueryEvent) (context.Context, error)

func (*App) Close

func (a *App) Close()

func (*App) Run

func (a *App) Run()

type Config

type Config struct {
	Listen     string   `yaml:"listen"`
	Postgres   Postgres `yaml:"postgres"`
	Orm        Orm      `yaml:"orm"`
	SwaggerDir string   ``
	DevEnv     bool     `yaml:"dev_env"`
}

type Orm

type Orm struct {
	Debug bool `yaml:"debug"`
}

type Postgres

type Postgres struct {
	Addr         string `yaml:"addr"`
	User         string `yaml:"user"`
	Password     string `yaml:"password"`
	Database     string `yaml:"database"`
	MinIdleConns int    `yaml:"min_idle_conns"`
	PoolSize     int    `yaml:"pool_size"`
}

Jump to

Keyboard shortcuts

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