config

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package config provides the build information, configuration for the application.

Index

Constants

View Source
const (
	// DefaultConfigFile is the default configuration file name.
	DefaultConfigFile = "setting.yaml"
	// DefaultPort is the default port number of the web server. HACK: uint32 is used to avoid viper's bug for uint16.
	DefaultPort = uint32(8080)
)
View Source
const (
	// LicenseKey is the license key of the application.
	LicenseKey = "A7KS7-Q95TX-3AFQB-F6VFF-NP2KW"
)

Variables

View Source
var (
	// AppName is the name of the application.
	AppName = "nb1"
	// CIBuildNum is the build number of the application on Continuous Integration system.
	CIBuildNum string
	// BuildDate is the date of the application build.
	BuildDate string
	// BuildHost is the host/machine name of the application build.
	BuildHost string
	// GoVersion is the version of Go used to build the application. i.e. go version
	GoVersion string
	// GitBranch is the git branch name of the application source code. i.e. git symbolic-ref -q --short HEAD
	GitBranch string
	// GitCommit is the git commit hash of the application source code. i.e. git rev-parse --short HEAD
	GitCommit string
	// GitSummary is the git summary of the application source code. i.e. git describe --tags --dirty --always
	GitSummary string
)
View Source
var (
	// AppLogoArt is the ASCII art of the application logo. Use `kfiglet nb1 -f ansishadow -p 2 | pbcopy` to generate.
	AppLogoArt = `` /* 203-byte string literal not displayed */

)

Functions

func GetBaseURL

func GetBaseURL() string

GetBaseURL returns the base URL of the web server.

func GetColorMap

func GetColorMap() map[string]string

GetColorMap returns the predefined colors map.

func GetContentDir

func GetContentDir() string

GetContentDir returns the filesystem path to the content directory.

func GetPort

func GetPort() uint32

GetPort returns the port number of the web server.

func GetPreferredDevice

func GetPreferredDevice() string

GetPreferredDevice returns the preferred device name for blink(1).

func GetTitle

func GetTitle() string

GetTitle returns the title of the application for website.

func SetDefaults

func SetDefaults()

SetDefaults sets the default values in Viper for the configuration.

Types

This section is empty.

Jump to

Keyboard shortcuts

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