vcs

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2019 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 Git

type Git struct{}

func (Git) Clone

func (g Git) Clone(dir, name, url string, out io.Writer) error

type Github

type Github struct {
	Git
	Token        string `yaml:"token" env:"GITHUB_TOKEN"`
	Organisation string `yaml:"organisation" env:"GITHUB_ORG"`
	Public       bool   `yaml:"public"`
	// contains filtered or unexported fields
}

func (*Github) Configure

func (v *Github) Configure()

func (*Github) Name

func (v *Github) Name() string

func (*Github) Scaffold

func (v *Github) Scaffold(name string) (*RepositoryInfo, error)

func (*Github) Validate

func (v *Github) Validate(name string) error

func (*Github) ValidateConfig

func (v *Github) ValidateConfig() error

func (*Github) Webhook

func (v *Github) Webhook(name, url string) error

type Gitlab

type Gitlab struct {
	Git
	Group      string `yaml:"group" env:"GITLAB_GROUP"`
	Token      string `yaml:"token" env:"GITLAB_TOKEN"`
	Visibility string `yaml:"visibility"`
	// contains filtered or unexported fields
}

func (*Gitlab) Configure

func (v *Gitlab) Configure()

func (*Gitlab) Name

func (v *Gitlab) Name() string

func (*Gitlab) Scaffold

func (v *Gitlab) Scaffold(name string) (*RepositoryInfo, error)

func (*Gitlab) Validate

func (v *Gitlab) Validate(name string) error

func (*Gitlab) ValidateConfig

func (v *Gitlab) ValidateConfig() error

func (*Gitlab) Webhook

func (v *Gitlab) Webhook(name, url string) error

type RepositoriesService

type RepositoriesService interface {
	Create(ctx context.Context, org string, repo *github.Repository) (*github.Repository, *github.Response, error)
	UpdateBranchProtection(ctx context.Context, owner, repo, branch string, preq *github.ProtectionRequest) (*github.Protection, *github.Response, error)
	CreateHook(ctx context.Context, owner, repo string, hook *github.Hook) (*github.Hook, *github.Response, error)
}

type RepositoryInfo

type RepositoryInfo struct {
	SSHURL  string
	HTTPURL string
}

type VCS

type VCS interface {
	Name() string
	ValidateConfig() error
	Configure()
	Validate(name string) error
	Scaffold(name string) (*RepositoryInfo, error)
	Webhook(name, url string) error
	Clone(dir, name, url string, out io.Writer) error
}

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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