config

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CommandConfigPath

func CommandConfigPath() string

func ConfigExists

func ConfigExists() bool

func CreateDefaultConfig

func CreateDefaultConfig(p *BacklogSettings)

func DeleteAlias

func DeleteAlias(alias string) error

func FindConfig

func FindConfig(name string) (string, error)

func GetAccessToken

func GetAccessToken(setting BacklogSettings) (string, error)

func GetRefreshToken

func GetRefreshToken(setting BacklogSettings) (string, error)

func SetAlias

func SetAlias(alias string, expansion string)

func ShowConfigNotFound

func ShowConfigNotFound()

func WriteConfig

func WriteConfig(space string, update *HostConfig)

Types

type Aliases

type Aliases map[string]string

type BacklogSettings

type BacklogSettings struct {
	BacklogDomain string `json:"backlog_domain"`
	Organization  string `json:"organization"`
	Project       string `json:"project"`
}

func GetBacklogSetting

func GetBacklogSetting() (BacklogSettings, error)

type CommandConfig

type CommandConfig struct {
	Aliases Aliases `json:"aliases"`
}

type Config

type Config map[string]HostConfig

func ReadConfig

func ReadConfig() (Config, error)

type HostConfig

type HostConfig struct {
	Hostname     string `yaml:"hostname"`
	AccessToken  string `yaml:"access_token"`
	RefreshToken string `yaml:"refresh_token"`
}

Jump to

Keyboard shortcuts

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