setting

package
v0.0.0-...-d8e89f0 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2015 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const DS = "core" + string(os.PathSeparator) + "settings.ds"

DS is the location of the sessions datastore file

Variables

This section is empty.

Functions

func All

func All() (map[string]Setting, error)

All returns all available settings

func Bool

func Bool(settingName string) bool

Bool is a shortcut to get a boolean setting

func Default

func Default(settingName string) error

Default will set the setting to it's default value

func Float

func Float(settingName string) float64

Float is a shortcut to get a float64 setting

func InitSettings

func InitSettings()

InitSettings sets the initial settings values for any settings with a SetFunc

func Int

func Int(settingName string) int

Int is a shortcut to get a int setting

func Int64

func Int64(settingName string) int64

Int64 is a shortcut to get an int64 setting

func Set

func Set(settingName string, value interface{}) error

Set sets the setting to the passed in value

func String

func String(settingName string) string

String is a shortcut to get a string setting

func Value

func Value(settingName string) interface{}

Value gets the value for the setting

Types

type Setting

type Setting struct {
	Description string      `json:"description,omitempty"`
	Value       interface{} `json:"value,omitempty"`
	// contains filtered or unexported fields
}

Setting is a value that changes how the freehold instance operates

func Get

func Get(settingName string) (*Setting, error)

Get retrieves the value of the given setting

Jump to

Keyboard shortcuts

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