config

package
v0.0.0-...-830fbbb Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConnectInfo

type ConnectInfo struct {
	URI      string // e.g. redis:6379
	Username string
	Password string
	DBName   string
	Host     string // e.g. redis
}

ConnectInfo - the basic form for db config

type Gorm

type Gorm struct {
	ConnectInfo
	Dialect string
	Log     bool
}

Gorm - the setting config for gorm

func NewGorm

func NewGorm() *Gorm

NewGorm return Gorm default config with default setting

func (*Gorm) ConnectURI

func (m *Gorm) ConnectURI() string

ConnectURI combines gorm setting to URI

type Redis

type Redis struct {
	ConnectInfo
}

Redis - the setting config for redis

func NewRedis

func NewRedis() *Redis

NewRedis return Redis config with default setting

type Sentry

type Sentry struct {
	DSN         string
	Environment string
}

Sentry - The config of tappay app

func NewSentry

func NewSentry() *Sentry

NewSentry - get default sentry config

type Server

type Server struct {
	AllowOrigins []string
	SecretKey    string
	AESKey       string
	AppURL       string
}

Server - the main config for web-server.

func NewServer

func NewServer() *Server

NewServer - get server config with default value.

Jump to

Keyboard shortcuts

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