types

package
v1.8.70 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2022 License: MIT Imports: 1 Imported by: 0

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
	// SettingMgr returns the settings implementation for a user
	SettingMgr() *SettingsManager
}

type IUserable added in v1.8.62

type IUserable interface {
	User() int64
}

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.

Jump to

Keyboard shortcuts

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