Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IAccountable ¶ added in v1.8.62
type IAccountable interface {
Account() int64
}
type IUserContainer ¶
type IUserContainer interface { // ID is the unique identifier for the user ID() int64 // Account returns the AccountID for the user Account() int64 // Activated returns whether or not the user is activated Activated() bool // Disabled returns whether or not the user is disabled Disabled() bool // Locked returns whether or not th user is locked Locked() bool // Permissions returns a slice of permission names Permissions() []string // Settings returns the settings implementation for a user Settings() *SettingsManager }
type SettingsManager ¶ added in v1.8.67
type SettingsManager struct {
// contains filtered or unexported fields
}
func NewSettingsManager ¶ added in v1.8.68
func NewSettingsManager(settings map[string]string) *SettingsManager
func (*SettingsManager) Bool ¶ added in v1.8.67
func (sm *SettingsManager) Bool(name string, defaultValue bool) bool
Bool returns true or false based on whether the value is the string "1" If the setting does not exist, it returns defaultValue
func (*SettingsManager) Float64 ¶ added in v1.8.67
func (sm *SettingsManager) Float64(name string, defaultValue float64) float64
Float64 returns the value of a setting converted to float64 if possible If the setting value does not exist, or parsing the string value to float64 returns an error, it returns defaultValue
func (*SettingsManager) Int64 ¶ added in v1.8.67
func (sm *SettingsManager) Int64(name string, defaultValue int64) int64
Int64 returns the value of a setting converted to int64 if possible. If the setting value does not exist, or parsing the string value to int64 returns an error, it returns defaultValue.
func (*SettingsManager) String ¶ added in v1.8.67
func (sm *SettingsManager) String(name, defaultValue string) string
String returns the string value of a setting. If that setting is not found it returns defaultValue.
Click to show internal directories.
Click to hide internal directories.