common

package
v0.0.0-...-acf58c8 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2021 License: Apache-2.0 Imports: 5 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	DbConfig   DbConfig   `json:"db" yaml:"db" mapstructure:"db"`
	CronConfig CronConfig `json:"cron" yaml:"cron" mapstructure:"cron"`
}

func (Config) Validate

func (c Config) Validate() error

type CronConfig

type CronConfig struct {
	BackupSchedule string `json:"backupSchedule" yaml:"backupSchedule" mapstructure:"backupSchedule"`
	RotateSchedule string `json:"rotateSchedule" yaml:"rotateSchedule" mapstructure:"rotateSchedule"`
	BackupDir      string `json:"backupDir" yaml:"backupDir" mapstructure:"backupDir"`
}

func (CronConfig) Validate

func (c CronConfig) Validate() error

type DbConfig

type DbConfig struct {
	Name             string `json:"name" yaml:"name" mapstructure:"name"`
	EncryptKey       string `json:"encryptKey" yaml:"encryptKey" mapstructure:"encryptKey"`
	RotationDuration int    `json:"rotationDuration" yaml:"rotationDuration" mapstructure:"rotationDuration"`
	DbDir            string `json:"dbDir" yaml:"dbDir" mapstructure:"dbDir"`
	DeletePrevious   bool   `json:"deletePrevious" yaml:"deletePrevious" mapstructure:"deletePrevious"`
}

func (DbConfig) Validate

func (d DbConfig) Validate() error

type TokenConfig

type TokenConfig struct {
	Secret string `json:"secret" yaml:"secret" mapstructure:"secret"`
	Expiry int    `json:"expiry" yaml:"expiry" mapstructure:"expiry"`
}

func (TokenConfig) Validate

func (t TokenConfig) Validate() error

Jump to

Keyboard shortcuts

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