conf

package
v0.0.0-...-598afe9 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2019 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package conf only accomplishes loading configuration.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Configuration

type Configuration struct {
	*Database
	*Server
	*Redis
	*JWT
	*Storage
}
var Config Configuration

type Database

type Database struct {
	//Type     string
	DBName     string `yaml:"name"`
	DBUser     string `yaml:"user"`
	DBPassword string `yaml:"password"`
	DBHost     string `yaml:"host"`
	DBPort     string `yaml:"port"`
}

type Image

type Image struct {
	AvatarPath string `yaml:"avatar"`
}

type JWT

type JWT struct {
	SigningAlgorithm string        `yaml:"signing_algorithm"`
	AccessSecret     string        `yaml:"access_secret"`
	RefreshSecret    string        `yaml:"refresh_secret"`
	Timeout          time.Duration `yaml:"duration"`
	Issuer           string
	MaxRefreshTime   time.Duration `yaml:"max_refresh_time"`
}

type Redis

type Redis struct {
	RedisHost     string `yaml:"host"`
	RedisPort     string `yaml:"port"`
	RedisPassword string `yaml:"password"`
}

type Server

type Server struct {
	RunMode      string
	Port         string
	ReadTimeout  time.Duration `yaml:"read_timeout"`
	WriteTimeout time.Duration `yaml:"write_timeout"`
}

type Storage

type Storage struct {
	*Image
}

Jump to

Keyboard shortcuts

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