config

package
Version: v0.17.0 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// DefaultVerbose for default verbose value.
	DefaultVerbose = mallogger.LevelNormal
	// DefaultBreakTime is default time between parsing MyAnimeList web.
	DefaultBreakTime = 5 * time.Second
	// DefaultStartID is default entry id to be parsed.
	DefaultStartID = 1
	// DefaultMaxIdleConn is default max db idle connection.
	DefaultMaxIdleConn = 10
	// DefaultMaxOpenConn is default max db open connection.
	DefaultMaxOpenConn = 10
	// DefaultConnMaxLifeTime is default db connection max life time.
	DefaultConnMaxLifeTime = 5 * time.Minute
)

Functions

This section is empty.

Types

type Config

type Config struct {
	// DB connection using GORM package.
	// Can be assigned directly or defined the connection manually
	// to the fields below. Defining manually will override this DB field value.
	// For more information, read `github.com/jinzhu/gorm`.
	DB *gorm.DB

	// Database host and port connection.
	Address string
	// Database name.
	DBName string
	// Database schema name.
	Schema string
	// Databse user.
	User string
	// Database password.
	Password string
	// Debug query.
	Debug bool

	// Redis cache time.
	CacheTime time.Duration
	// Using or expressed in more detailed information to console.
	Verbose int
}

Config is config model for malkeeper.

func (*Config) Init

func (c *Config) Init() error

Init to initiate config value.

Source Files

Jump to

Keyboard shortcuts

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