Documentation
¶
Index ¶
- Variables
- func ConvertToGroups(repos []*Repository) []string
- func GetJobPath(name string) (string, error)
- func ListBuilderNames() ([]string, error)
- func ListJobNames() ([]string, error)
- func ListRemoteNames() ([]string, error)
- func ListWorkflowNames() ([]string, error)
- func SplitGroup(name string) (string, string)
- type BuildFile
- type Builder
- type Job
- type JobError
- type Remote
- type RemoteGroup
- type Repository
- type RepositoryStorage
- func (s *RepositoryStorage) Add(repo *Repository) error
- func (s *RepositoryStorage) Close() error
- func (s *RepositoryStorage) Delete(repo *Repository)
- func (s *RepositoryStorage) GetByName(remote, name string) *Repository
- func (s *RepositoryStorage) GetByPath(path string) (*Repository, error)
- func (s *RepositoryStorage) List(remote string) []*Repository
- func (s *RepositoryStorage) ReadOnly()
- type Workflow
- type WorkflowMatchItem
- type WorkflowSelect
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultBuilder = func() *Builder { var b Builder err := yaml.Unmarshal([]byte(config.DefaultBuilder), &b) if err != nil { panic(err) } err = b.Validate() if err != nil { panic(err) } return &b }()
View Source
var MuteJob bool
Functions ¶
func ConvertToGroups ¶ added in v0.1.0
func ConvertToGroups(repos []*Repository) []string
func GetJobPath ¶ added in v0.2.0
func ListBuilderNames ¶ added in v0.2.0
func ListJobNames ¶ added in v0.2.0
func ListRemoteNames ¶
func ListWorkflowNames ¶ added in v0.2.0
func SplitGroup ¶
Types ¶
type Builder ¶ added in v0.2.0
type Builder struct {
Create []*Job `yaml:"create" validate:"dive"`
Files []*BuildFile `yaml:"files" validate:"unique=Name,dive"`
Init []*Job `yaml:"init" validate:"dive"`
// contains filtered or unexported fields
}
func GetBuilder ¶ added in v0.2.0
type Job ¶ added in v0.2.0
type Job struct {
Name string `yaml:"name" validate:"required"`
Run string `yaml:"run"`
RequireEnv []string `yaml:"require_env"`
}
type Remote ¶
type Remote struct {
Name string `toml:"-"`
Host string `toml:"host" validate:"required"`
Protocol string `toml:"protocol" validate:"enum_protocol"`
User string `toml:"user" validate:"required"`
Email string `toml:"email" validate:"email"`
Provider string `toml:"provider" validate:"enum_provider"`
Token string `toml:"token"`
API string `toml:"api" validate:"omitempty,uri"`
Groups []*RemoteGroup `toml:"groups" validate:"unique=Name,dive"`
}
func (*Remote) GetCloneURL ¶
func (r *Remote) GetCloneURL(repo *Repository) (string, error)
func (*Remote) GetUserEmail ¶
func (r *Remote) GetUserEmail(repo *Repository) (string, string)
type RemoteGroup ¶
type Repository ¶
type Repository struct {
Path string
Name string
Remote string
View uint64
// contains filtered or unexported fields
}
func AttachRepository ¶
func AttachRepository(remote *Remote, name, path string) (*Repository, error)
func DiscoverLocalRepositories ¶ added in v0.2.0
func DiscoverLocalRepositories(rootDir string) ([]*Repository, error)
func NewLocalRepository ¶ added in v0.2.0
func NewLocalRepository(rootDir, name string) (*Repository, error)
func WorkspaceRepository ¶ added in v0.2.0
func WorkspaceRepository(remote *Remote, name string) (*Repository, error)
func (*Repository) Base ¶
func (repo *Repository) Base() string
func (*Repository) Dir ¶ added in v0.2.0
func (repo *Repository) Dir() string
func (*Repository) EnsureDir ¶ added in v0.2.0
func (repo *Repository) EnsureDir() (string, error)
func (*Repository) FullName ¶
func (repo *Repository) FullName() string
func (*Repository) Group ¶
func (repo *Repository) Group() string
type RepositoryStorage ¶
type RepositoryStorage struct {
// contains filtered or unexported fields
}
func NewRepositoryStorage ¶
func NewRepositoryStorage() (*RepositoryStorage, error)
func (*RepositoryStorage) Add ¶
func (s *RepositoryStorage) Add(repo *Repository) error
func (*RepositoryStorage) Close ¶
func (s *RepositoryStorage) Close() error
func (*RepositoryStorage) Delete ¶
func (s *RepositoryStorage) Delete(repo *Repository)
func (*RepositoryStorage) GetByName ¶
func (s *RepositoryStorage) GetByName(remote, name string) *Repository
func (*RepositoryStorage) GetByPath ¶
func (s *RepositoryStorage) GetByPath(path string) (*Repository, error)
func (*RepositoryStorage) List ¶
func (s *RepositoryStorage) List(remote string) []*Repository
func (*RepositoryStorage) ReadOnly ¶
func (s *RepositoryStorage) ReadOnly()
type Workflow ¶ added in v0.2.0
type Workflow struct {
Select *WorkflowSelect `yaml:"select"`
Jobs []*Job `yaml:"jobs" validate:"required,dive"`
}
func GetWorkflow ¶ added in v0.2.0
type WorkflowMatchItem ¶ added in v0.2.0
type WorkflowMatchItem struct {
Path string
Env osutil.Env
Repo *Repository
}
type WorkflowSelect ¶ added in v0.2.0
func (*WorkflowSelect) Match ¶ added in v0.2.0
func (s *WorkflowSelect) Match(store *RepositoryStorage) ([]*WorkflowMatchItem, error)
Click to show internal directories.
Click to hide internal directories.