project

package
v1.9.1 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CI bool

Functions

func Bool

func Bool(b bool) *bool

func Contains added in v1.8.0

func Contains(s []string, e string) bool

func Int

func Int(i int) *int

func LogFail added in v1.5.0

func LogFail(w io.Writer, str string, function string)

func LogInfo added in v1.5.0

func LogInfo(w io.Writer, str string, function string)

func LogSuccess added in v1.5.0

func LogSuccess(w io.Writer, str string, function string)

func String

func String(str string) *string

func StringSlice

func StringSlice(s []string) *[]string

Types

type IProject

type IProject interface {
	WriteConfig() error
	SetupProject() error
	SetGitignore() error
	CreateReadme() error
	RunTest() error
	RunBuild() error
	RunLinter() error

	GetName() string
	GetDescription() string
	GetRepository() string
	GetAuthorName() string
	GetAuthorEmail() string
	GetAuthorOrganization() string
	IsRelease() bool
	IsGoBuild() bool
	GetDefaultReleaseBranch() string
	GetGitignore() []string
	GetCodeOwners() []string
	IsGoLinter() bool
	IsGoTest() bool
	GetGoTestArgs() []string
	IsBuildWorkflow() bool
	GetGitHubToken() string
	GetGojenVersion() string
	IsIsGojen() bool
	IsCreateReadme() bool
	IsCodeCov() bool
	GetGoBuildArgs() []string
	GetWorkflowEnv() *map[string]*string
	GetLicense() string
	// contains filtered or unexported methods
}

func InitProject

func InitProject() (IProject, error)

type Project

type Project struct {
	Name        *string `yaml:"name" json:"name"`
	Description *string `yaml:"description" json:"description"`
	Repository  *string `yaml:"repository"  json:"repository"`
	GoVersion   *string `yaml:"goVersion" json:"goVersion"`

	AuthorName         *string `yaml:"authorName" json:"authorName"`
	AuthorEmail        *string `yaml:"authorEmail" json:"authorEmail"`
	AuthorOrganization *string `yaml:"authorOrganization" json:"authorOrganization"`

	Readme       *bool   `yaml:"readme" json:"readme"`
	GojenVersion *string `yaml:"gojenVersion" json:"gojenVersion"`
	License      *string `yaml:"license" json:"license"`

	Release              *bool     `yaml:"release" json:"release"`
	BuildWorkflow        *bool     `yaml:"buildWorkflow" json:"buildWorkflow"`
	GithubToken          *string   `yaml:"githubToken" json:"githubToken"`
	DefaultReleaseBranch *string   `yaml:"defaultReleaseBranch" json:"defaultReleaseBranch"`
	IsGojen              *bool     `yaml:"isGojen" json:"isGojen"`
	CodeCov              *bool     `yaml:"codeCov" json:"codeCov"`
	TestEnvVars          *[]string `yaml:"testEnvVars" json:"testEnvVars"`

	Gitignore  *[]string `yaml:"gitignore" json:"gitignore"`
	CodeOwners *[]string `yaml:"codeOwners" json:"codeOwners"`

	SkipVendor *bool `yaml:"skipVendor" json:"skipVendor"`
	SkipTidy   *bool `yaml:"skipTidy" json:"skipTidy"`

	GoLinter     *bool               `yaml:"goLinter" json:"goLinter"`
	GoTest       *bool               `yaml:"goTest" json:"goTest"`
	GoTestArgs   *[]string           `yaml:"goTestArgs" json:"goTestArgs"`
	GoBuild      *bool               `yaml:"goBuild" json:"goBuild"`
	GoBuildArgs  *[]string           `yaml:"goBuildArgs" json:"goBuildArgs"`
	WorkflowEnv  *map[string]*string `yaml:"workflowEnv" json:"workflowEnv"`
	PrependSteps *[]*github.JobStep  `yaml:"prependSteps" json:"prependSteps"`
	AppendSteps  *[]*github.JobStep  `yaml:"apendSteps" json:"apendSteps"`
}

func GetConfig

func GetConfig() (*Project, error)

func (*Project) AddCodeCov added in v1.2.0

func (proj *Project) AddCodeCov() error

func (*Project) AddLicense added in v1.8.0

func (proj *Project) AddLicense() error

func (*Project) CreateBuildWorkflow

func (proj *Project) CreateBuildWorkflow() error

func (*Project) CreateReadme added in v1.1.0

func (proj *Project) CreateReadme() error

func (*Project) CreateReleaseWorkflow

func (proj *Project) CreateReleaseWorkflow() error

func (*Project) GetAuthorEmail

func (proj *Project) GetAuthorEmail() string

func (*Project) GetAuthorName

func (proj *Project) GetAuthorName() string

func (*Project) GetAuthorOrganization

func (proj *Project) GetAuthorOrganization() string

func (*Project) GetCodeOwners

func (proj *Project) GetCodeOwners() []string

func (*Project) GetDefaultReleaseBranch

func (proj *Project) GetDefaultReleaseBranch() string

func (*Project) GetDescription

func (proj *Project) GetDescription() string

func (*Project) GetGitHubToken

func (proj *Project) GetGitHubToken() string

func (*Project) GetGitignore

func (proj *Project) GetGitignore() []string

func (*Project) GetGoBuildArgs added in v1.4.0

func (proj *Project) GetGoBuildArgs() []string

func (*Project) GetGoTestArgs

func (proj *Project) GetGoTestArgs() []string

func (*Project) GetGoVersion

func (proj *Project) GetGoVersion() string

func (*Project) GetGojenVersion

func (proj *Project) GetGojenVersion() string

func (*Project) GetLicense added in v1.8.0

func (proj *Project) GetLicense() string

func (*Project) GetName

func (proj *Project) GetName() string

func (*Project) GetRepository

func (proj *Project) GetRepository() string

func (*Project) GetTestEnvVars added in v1.3.0

func (proj *Project) GetTestEnvVars() []string

func (*Project) GetWorkflowEnv added in v1.6.0

func (proj *Project) GetWorkflowEnv() *map[string]*string

func (*Project) IsBuildWorkflow

func (proj *Project) IsBuildWorkflow() bool

func (*Project) IsCodeCov added in v1.2.0

func (proj *Project) IsCodeCov() bool

func (*Project) IsCreateReadme added in v1.1.0

func (proj *Project) IsCreateReadme() bool

func (*Project) IsGoBuild added in v1.4.0

func (proj *Project) IsGoBuild() bool

func (*Project) IsGoLinter

func (proj *Project) IsGoLinter() bool

func (*Project) IsGoTest

func (proj *Project) IsGoTest() bool

func (*Project) IsIsGojen

func (proj *Project) IsIsGojen() bool

func (*Project) IsRelease

func (proj *Project) IsRelease() bool

func (*Project) RunBuild added in v1.4.0

func (proj *Project) RunBuild() error

func (*Project) RunLinter

func (proj *Project) RunLinter() error

func (*Project) RunTest

func (proj *Project) RunTest() error

func (*Project) SetCodeOwners

func (proj *Project) SetCodeOwners() error

func (*Project) SetGitignore

func (proj *Project) SetGitignore() error

func (*Project) SetupProject

func (proj *Project) SetupProject() error

func (*Project) ValidateConfig

func (proj *Project) ValidateConfig() error

func (*Project) WriteConfig

func (proj *Project) WriteConfig() error

Jump to

Keyboard shortcuts

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