setting_service

package
v0.0.0-...-0eeeb36 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2018 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ISettingsService

type ISettingsService interface {
	RefreshSettingsCache() error
	GetSettings() map[string]setting_model.Setting
	RegisterRefreshCallback(func(map[string]setting_model.Setting))
}

type SettingsService

type SettingsService struct {
	LastRefresh        time.Time
	SettingsCache      map[string]setting_model.Setting
	RepositoriesGroup  *repository.RepositoriesGroup
	OnRefreshCallbacks []func(map[string]setting_model.Setting)
}

func DefaultSettingsService

func DefaultSettingsService(repositoriesGroup *repository.RepositoriesGroup) *SettingsService

func (*SettingsService) GetSettings

func (ss *SettingsService) GetSettings() map[string]setting_model.Setting

func (*SettingsService) RefreshSettingsCache

func (ss *SettingsService) RefreshSettingsCache() error

func (*SettingsService) RegisterRefreshCallback

func (ss *SettingsService) RegisterRefreshCallback(cb func(map[string]setting_model.Setting))

Jump to

Keyboard shortcuts

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