types

package
v1.5.1 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FeatureBranchPrefix = "feature/"
)

Variables

View Source
var (
	ErrEmptyAccessToken = errors.New("empty access token")
	ErrEmptyGitlabAPI   = errors.New("empty gitlab API URL")
)

Functions

This section is empty.

Types

type BranchTyp

type BranchTyp string

BranchTyp

const (
	MasterBranch BranchTyp = "master"
	DevBranch    BranchTyp = "develop"
	TestBranch   BranchTyp = "test"
)

func (BranchTyp) String

func (b BranchTyp) String() string

type Config

type Config struct {
	AccessToken  string `toml:"access_token"`
	DebugMode    bool   `toml:"debug"`
	GitlabAPIURL string `toml:"gitlab_api_url"`
	OpenBrowser  bool   `toml:"open_browser"`
}

Config contains all fields can be specified by user.

func (*Config) Debug

func (cfg *Config) Debug(debug bool) *Config

Debug open debug in Config if debug is true, otherwise do nothing.

func (Config) Valid

func (cfg Config) Valid() error

type FlowContext

type FlowContext struct {
	// Conf of flow CLI.
	Conf *Config
	// CWD current working directory.
	CWD string
	// project of current working directory, normally, get from current working directory.
	Project *ProjectBasics

	ConfPath string
}

FlowContext contains all necessary parameters of flow command to execute.

func NewContext

func NewContext(cwd, confPath string, c *Config) *FlowContext

NewContext be generated with non project information. Do not use Project directly!!!

type ProjectBasics

type ProjectBasics struct {
	ID     int
	Name   string
	WebURL string
}

ProjectBasics contains basic attributes of project.

Jump to

Keyboard shortcuts

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