config

package
v0.0.0-...-e1fd696 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2021 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Overview

Package config for interacting with the cli config

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

Package config for interacting with the cli config

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

Index

Constants

View Source
const DevModeMwdd string = "docker"

DevModeMwdd value for DevMode that will use the docker/mediawiki-docker-dev command set

View Source
const UpdateChannelDev string = "dev-addshore"

UpdateChannelDev value for UpdateChannel that will pull updates from addshore's dev builds

View Source
const UpdateChannelStable string = "stable-wikimedia"

UpdateChannelStable value for UpdateChannel that will pull updates from wikimedia's stable builds

Variables

View Source
var DevModeValues = AllowedOptions([]string{DevModeMwdd})

DevModeValues allowed values for DevMode

View Source
var UpdateChannelValues = AllowedOptions([]string{UpdateChannelDev, UpdateChannelStable})

UpdateChannelValues allowed values for UpdateChannel

Functions

This section is empty.

Types

type AllowedOptions

type AllowedOptions []string

AllowedOptions representation of allowed options for a config value

func (AllowedOptions) Contains

func (cao AllowedOptions) Contains(value string) bool

Contains do the allowed options contain this value

type Config

type Config struct {
	DevMode       string `json:"dev_mode"`
	UpdateChannel string `json:"update_channel"`
}

Config representation of a cli config

func LoadFromDisk

func LoadFromDisk() Config

LoadFromDisk loads the config.json from disk

func (Config) PrettyPrint

func (c Config) PrettyPrint()

PrettyPrint writers the config to disk

func (Config) WriteToDisk

func (c Config) WriteToDisk()

WriteToDisk writers the config to disk

Jump to

Keyboard shortcuts

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