git

package
v0.0.0-...-5692a8a Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CloneURL

func CloneURL(u string) option

func GithubAccessToken

func GithubAccessToken(t string) option

func License

func License(l string) option

func Name

func Name(n string) option

func Organization

func Organization(o string) option

func ProjectDir

func ProjectDir(d string) option

func ServerURL

func ServerURL(u string) option

Types

type GithubRepository

type GithubRepository struct {
	Name              string `mapstructure:"github-repo-name"`
	ServerURL         string `mapstructure:"github-enterprise-server-url"`
	Organization      string `mapstructure:"github-organization"`
	GithubAccessToken string `mapstructure:"github-auth-token"`
	License           string `mapstructure:"license"`
	ProjectDir        string `mapstructure:"project-dir"`
	Private           bool   `mapstructure:"private"`
	CloneURL          string
}

GithubRepository defines a github (enterprise) repo

func New

func New(name string, options ...option) (*GithubRepository, error)

New creates a new GithubRepository configured with the provided options

func (GithubRepository) Clone

func (r GithubRepository) Clone(output io.Writer) error

Clone performs a plain `git clone` of "url" as the project dir. If the output arg is supplied, progress is logged there.

func (*GithubRepository) Configure

func (r *GithubRepository) Configure(opts ...option)

Configure allows us to modify the configuration of a GithubRepository

func (GithubRepository) Create

func (r GithubRepository) Create() error

Create uses a GithubRepository to construct a Github (Enterprise) repo via API calls

func (GithubRepository) URL

func (r GithubRepository) URL() (string, error)

Jump to

Keyboard shortcuts

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