configuration

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2022 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Server struct {
		Port string `yaml:"port" json:"port"`
	} `yaml:"server" json:"server"`

	Logging struct {
		Level string `yaml:"level" json:"level"`
	} `yaml:"logging" json:"logging"`

	Files struct {
		TempDir        string `yaml:"temp_dir" json:"temp_dir"`
		DeleteDuration int    `yaml:"delete_durations_minutes" json:"delete_durations_minutes"`
	} `yaml:"files" json:"files"`

	Tasks struct {
		Duration int `yaml:"duration"`
	} `yaml:"tasks"`

	Printers map[string]struct {
		Host  string `yaml:"host"`
		Key   string `yaml:"key"`
		Image string `default:"" yaml:"image,omitempty"`
	} `yaml:"printers"`

	Database struct {
		DBDriver      string `yaml:"db_driver"`
		DBSource      string `yaml:"db_source"`
		ServerAddress string `yaml:"server_address"`
	} `yaml:"database"`

	OAuth struct {
		ClientId     string `yaml:"client_id"`
		ClientSecret string `yaml:"client_secret"`
	} `yaml:"oauth"`
}

type ConfigService

type ConfigService struct {
	// contains filtered or unexported fields
}

func NewConfigService

func NewConfigService() *ConfigService

func (*ConfigService) GetConfig

func (m *ConfigService) GetConfig() (*Config, error)

func (*ConfigService) LoadConfig

func (m *ConfigService) LoadConfig(configPath string) error

Jump to

Keyboard shortcuts

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