common

package
v0.0.0-...-5fdd26c Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitPostgres

func InitPostgres(cfg *PostgresConfig) (*gorp.DbMap, error)

Types

type Config

type Config struct {
	Postgres PostgresConfig `json:"postgres_config"`
	Session  SessionConfig  `json:"session_config"`
}

func NewConfigFromFile

func NewConfigFromFile(fileName string) (*Config, error)

type PostgresConfig

type PostgresConfig struct {
	Host     string `json:"host"`
	Port     int    `json:"port"`
	User     string `json:"user"`
	Password string `json:"password"`
	DBName   string `json:"db_name"`
}

type SessionConfig

type SessionConfig struct {
	Secret     string `json:"secret"`
	SessionKey string `json:"session_key"`
}

Jump to

Keyboard shortcuts

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