config

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2019 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExistsRootConfig

func ExistsRootConfig(confFileName string) bool

Types

type CircleCIConfig

type CircleCIConfig struct {
	Err error
	// contains filtered or unexported fields
}

func NewCircleCIConfig

func NewCircleCIConfig(lc LocationConfig) (*CircleCIConfig, error)

func (*CircleCIConfig) GetApiToken

func (c *CircleCIConfig) GetApiToken() null.String

func (*CircleCIConfig) GetBranch

func (c *CircleCIConfig) GetBranch() null.String

func (*CircleCIConfig) GetFileNamePattern

func (c *CircleCIConfig) GetFileNamePattern() string

func (*CircleCIConfig) GetRepoName

func (c *CircleCIConfig) GetRepoName() string

func (*CircleCIConfig) GetUsername

func (c *CircleCIConfig) GetUsername() string

func (*CircleCIConfig) GetVcsType

func (c *CircleCIConfig) GetVcsType() VcsType

func (*CircleCIConfig) SetApiTokenName

func (c *CircleCIConfig) SetApiTokenName(v *string)

func (*CircleCIConfig) SetBranch

func (c *CircleCIConfig) SetBranch(v *string)

func (*CircleCIConfig) SetFileNamePattern

func (c *CircleCIConfig) SetFileNamePattern(v *string)

func (*CircleCIConfig) SetRepoName

func (c *CircleCIConfig) SetRepoName(v string)

func (*CircleCIConfig) SetUsername

func (c *CircleCIConfig) SetUsername(v string)

func (*CircleCIConfig) SetVcsType

func (c *CircleCIConfig) SetVcsType(v VcsType)

func (*CircleCIConfig) Validate

func (c *CircleCIConfig) Validate() error

type DestinationConfig

type DestinationConfig struct {
	Location LocationConfig `yaml:"location"`
}

type GitHubConfig

type GitHubConfig struct {
	Err error
	// contains filtered or unexported fields
}

func NewGitHubConfig

func NewGitHubConfig(lc LocationConfig) (*GitHubConfig, error)

func (*GitHubConfig) GetApiToken

func (c *GitHubConfig) GetApiToken() null.String

func (*GitHubConfig) GetFileNamePattern added in v0.0.3

func (c *GitHubConfig) GetFileNamePattern() string

func (*GitHubConfig) GetRepoName

func (c *GitHubConfig) GetRepoName() string

func (*GitHubConfig) GetStrategy

func (*GitHubConfig) GetUsername

func (c *GitHubConfig) GetUsername() string

func (*GitHubConfig) SetApiTokenName

func (c *GitHubConfig) SetApiTokenName(v *string)

func (*GitHubConfig) SetFileNamePattern added in v0.0.3

func (c *GitHubConfig) SetFileNamePattern(v *string)

func (*GitHubConfig) SetRepoName

func (c *GitHubConfig) SetRepoName(v string)

func (*GitHubConfig) SetStrategy

func (c *GitHubConfig) SetStrategy(s GitHubReleaseCreationStrategy)

func (*GitHubConfig) SetUsername

func (c *GitHubConfig) SetUsername(v string)

func (*GitHubConfig) Validate

func (c *GitHubConfig) Validate() error

type GitHubReleaseCreationStrategy

type GitHubReleaseCreationStrategy string
const (
	Draft         GitHubReleaseCreationStrategy = "draft"
	DraftOrCreate GitHubReleaseCreationStrategy = "draft-or-create"
	Create        GitHubReleaseCreationStrategy = "create"
)

type LocalConfig

type LocalConfig struct {
	Err error
	// contains filtered or unexported fields
}

func NewLocalConfig

func NewLocalConfig(lc LocationConfig) (*LocalConfig, error)

func (*LocalConfig) GetFileNamePattern

func (c *LocalConfig) GetFileNamePattern() string

func (*LocalConfig) GetPath

func (c *LocalConfig) GetPath() string

func (*LocalConfig) SetFileNamePattern

func (c *LocalConfig) SetFileNamePattern(v *string)

func (*LocalConfig) SetPath

func (c *LocalConfig) SetPath(v string)

func (*LocalConfig) Validate

func (c *LocalConfig) Validate() error

type LocationConfig

type LocationConfig map[string]interface{}

func (*LocationConfig) GetLocationType

func (c *LocationConfig) GetLocationType() (LocationType, error)

func (*LocationConfig) Has

func (c *LocationConfig) Has(key string) bool

func (*LocationConfig) Set

func (c *LocationConfig) Set(key string, v interface{})

func (*LocationConfig) SetLocationType

func (c *LocationConfig) SetLocationType(t LocationType)

type LocationType

type LocationType string
const (
	CircleCI      LocationType = "circleci"
	GitHubRelease LocationType = "github-release"
	Local         LocationType = "local"
)

func NewLocationType

func NewLocationType(v string) (LocationType, error)

type Project

type Project struct {
	ConfFileName string
	RootConfig   RootConfig
}

func LoadProject

func LoadProject(confFileName string) (*Project, error)

func (*Project) AddSource

func (p *Project) AddSource(lc LocationConfig)

func (*Project) SaveConfig

func (p *Project) SaveConfig() error

func (*Project) SetDestination

func (p *Project) SetDestination(lc LocationConfig)

type RootConfig

type RootConfig struct {
	Version     uint              `yaml:"version"`
	SaveDir     string            `yaml:"save_dir"`
	Source      SourceConfig      `yaml:"source"`
	Destination DestinationConfig `yaml:"destination"`
}

type SourceConfig

type SourceConfig struct {
	Locations []LocationConfig `yaml:"locations"`
}

type VcsType

type VcsType string
const (
	GitHub    VcsType = "github"
	Bitbucket         = "bitbucket"
)

func NewVcsType

func NewVcsType(v string) (VcsType, error)

Jump to

Keyboard shortcuts

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