remoteconfig

package
v1.22.0 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2023 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Overview

TODO inject to a global interface e.g. command factory as soon as it exists and remove this file.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddCondition

func AddCondition(name, description string, conditionFunc func() bool)

func GetGlobal

func GetGlobal() types.RemoteConfig

GetGlobal returns the global remote config. InitGlobal must be called in advance or the function will panic.

func InitGlobal

func InitGlobal(config Config, stateManager statetypes.State, isInternetActive func() bool) types.RemoteConfig

InitGlobal initializes the global remote config. This is done once, subsequent calls do not have any effect.

func ListConditions

func ListConditions() (conditions map[string]string)

func New

func New(config *Config, stateManager statetypes.State, isInternetActive func() bool) types.RemoteConfig

New creates and returns a new RemoteConfig.

Types

type Config

type Config struct {
	Local  Local
	Remote Remote

	UpdateInterval int
	TickerInterval int
}

Config is the struct defining the RemoteConfig config.

type Local

type Local struct {
	Path string
}

Local is the struct defining the local source.

type Remote

type Remote struct {
	Owner    string
	Repo     string
	Ref      string
	Filepath string
}

Remote is the struct defining the remote source.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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