config

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: May 4, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	ReleaseBranch string `yaml:"release_branck"`
	Github        Host   `yaml:"github.com"`
}

Config represents the config file for train

func New

func New(tkn string) *Config

func ParseFromFile

func ParseFromFile() (*Config, error)

ParseFromFile reads the train config file from the home directory. It returns any errors it encounters with parsing the file.

func (*Config) GetClient added in v0.1.1

func (c *Config) GetClient() (*github.Client, error)

func (*Config) WriteFile

func (c *Config) WriteFile() error

type Host

type Host struct {
	Token string `yaml:"token"`
}

Host represents a single host that train has a configuration for

Jump to

Keyboard shortcuts

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