updater

package
v0.0.0-...-22394b5 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2019 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotModified = errors.New("config not modified")

Functions

func YAMLToJSON

func YAMLToJSON(y []byte) ([]byte, error)

Types

type AdminConfig

type AdminConfig struct {
	URI      string
	Username string
	Password string
}

type ConfigData

type ConfigData struct {
	Modules []string      `json:"modules"`
	Nodes   []ConfigParam `json:"nodes"`
}

type ConfigParam

type ConfigParam struct {
	ID          int
	ContentType string
	Value       NullString
	Version     int
	Path        string
	Name        string
	MTime       string
}

type NullString

type NullString struct {
	sql.NullString
}

func (*NullString) CodecDecodeSelf

func (ns *NullString) CodecDecodeSelf(dec *codec.Decoder)

func (*NullString) CodecEncodeSelf

func (ns *NullString) CodecEncodeSelf(enc *codec.Encoder)

type Updater

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

func NewUpdater

func NewUpdater(config UpdaterConfig) *Updater

func (*Updater) Run

func (u *Updater) Run()

func (*Updater) Stop

func (u *Updater) Stop()

func (*Updater) Update

func (u *Updater) Update() error

type UpdaterConfig

type UpdaterConfig struct {
	Hostname       string
	Admin          AdminConfig
	DataDir        string
	UpdateInterval time.Duration
}

Jump to

Keyboard shortcuts

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