globalconfig

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2018 License: BSD-3-Clause Imports: 3 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitModels

func InitModels()

InitModels initialize models in mongo, if required

Types

type GlobalConfig

type GlobalConfig struct {
	Key   string `json:"key"`
	Value string `json:"value"`
}

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

Manager is used to store settings

func NewManager

func NewManager() *Manager

NewManager creates and initializes a new Manager

func (*Manager) Delete

func (m *Manager) Delete(key string) error

Delete a config key

func (*Manager) Exists

func (m *Manager) Exists(key string) (bool, error)

func (*Manager) GetByKey

func (m *Manager) GetByKey(key string) (*GlobalConfig, error)

GetByKey return a config key/value from key name

func (*Manager) Insert

func (m *Manager) Insert(c *GlobalConfig) error

Insert a config key

Jump to

Keyboard shortcuts

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