config

package
v0.6.3 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2019 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config added in v0.6.1

type Config struct {
	Version        int                `yaml:"version"`
	Profiles       map[string]Profile `yaml:"profiles"`
	DefalutProfile string             `yaml:"default_profile"`
}

func GetConfig

func GetConfig() (*Config, error)

func NewConfig

func NewConfig() *Config

func (*Config) GetDefaultProfile added in v0.6.1

func (c *Config) GetDefaultProfile() *Profile

func (*Config) GetProfile added in v0.6.1

func (c *Config) GetProfile(domain string) (*Profile, error)

func (*Config) GetToken added in v0.6.1

func (c *Config) GetToken(domain string) string

func (*Config) HasDomain added in v0.6.1

func (c *Config) HasDomain(domain string) bool

func (*Config) Load added in v0.6.1

func (c *Config) Load() error

func (*Config) Path added in v0.6.1

func (c *Config) Path() string

func (*Config) Read added in v0.6.1

func (c *Config) Read() (string, error)

func (*Config) Save added in v0.6.1

func (c *Config) Save() error

func (*Config) SetProfile added in v0.6.1

func (c *Config) SetProfile(domain string, profile Profile)

func (*Config) SetToken added in v0.6.1

func (c *Config) SetToken(domain, token string)

type Profile

type Profile struct {
	Token             string `yaml:"token"`
	DefaultGroup      string `yaml:"default_group"`
	DefaultProject    string `yaml:"default_project"`
	DefaultAssigneeID int    `yaml:"default_assignee_id"`
}

Jump to

Keyboard shortcuts

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