config

package
v0.0.0-...-3834a52 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package config is the package that handles application config

Index

Constants

This section is empty.

Variables

View Source
var DefaultInfo = models.APIInfo{Name: "Reflow", Version: "v0.1", Stream: "master"}

DefaultInfo is the default APIInfo for reflow.

Functions

func LoadConfig

func LoadConfig(configFile string)

LoadConfig takes a config file at the specified path and loads it, or creates configFile if it doesn't exist

func LoadDefaultConfig

func LoadDefaultConfig()

LoadDefaultConfig loads the default configuration from disk and sets Conf

Types

type Config

type Config struct {
	Database DatabaseConfig
	Server   ServerConfig
	Repo     RepoConfig
}
var Conf Config

Conf the struct with the config in (duh)

type DatabaseConfig

type DatabaseConfig struct {
	Driver   string
	Hostname string
	Port     int
	Database string
	Username string
	Password string
}

type RepoConfig

type RepoConfig struct {
	RepoURL string
}

type ServerConfig

type ServerConfig struct {
	Listen  string
	Port    int
	TLS     bool
	TLSCert string
	Debug   bool
}

Jump to

Keyboard shortcuts

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