internal

package
v0.0.0-...-e4a5794 Latest Latest
Warning

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

Go to latest
Published: May 21, 2021 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TraceKey = "trace"
)

Variables

This section is empty.

Functions

func LoadConfig

func LoadConfig(filePath string) (err error)

func LoadLogging

func LoadLogging() (err error)

func LoggerMiddleware

func LoggerMiddleware(h http.Handler) http.Handler

func StartDB

func StartDB() (userRepository application.UserRepository, notificationRepository application.NotificationRepository, err error)

StartDB Starts the DB and returns the repository implementations according to the driver

func StopDB

func StopDB() (err error)

Types

type Database

type Database struct {
	Driver string `yaml:"driver"`
	DSN    string `yaml:"dsn"`
}

type LoggerResponseWriter

type LoggerResponseWriter struct {
	http.ResponseWriter
	StatusCode int
}

func NewLoggerResponseWriter

func NewLoggerResponseWriter(w http.ResponseWriter) (lrw *LoggerResponseWriter)

func (*LoggerResponseWriter) WriteHeader

func (lrw *LoggerResponseWriter) WriteHeader(code int)

type Logging

type Logging struct {
	Level  string `yaml:"level"`
	Pretty bool   `yaml:"pretty"`
}

type PerfectyConfig

type PerfectyConfig struct {
	Server   Server
	Logging  Logging
	Database Database
}
var (
	Config PerfectyConfig
)

type Server

type Server struct {
	Host string `yaml:"host"`
	Port int    `yaml:"port"`
	Ssl  Ssl
}

type Ssl

type Ssl struct {
	Enabled  bool   `yaml:"enabled"`
	CertFile string `yaml:"cert_file"`
	KeyFile  string `yaml:"key_file"`
}

Directories

Path Synopsis
domain
repository

Jump to

Keyboard shortcuts

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