Versions in this module Expand all Collapse all v0 v0.3.2 Mar 6, 2021 Changes in this version + const GitHubDefaultHostname + const GitHubTokenName + const GitLabDefaultHostname + const GitLabTokenName + type GitLabProvider struct + IsPersonal bool + IsPrivate bool + func (p *GitLabProvider) AddDeployKey(ctx context.Context, r *Repository, key, keyName string) (bool, error) + func (p *GitLabProvider) AddTeam(ctx context.Context, r *Repository, name, permission string) (bool, error) + func (p *GitLabProvider) CreateRepository(ctx context.Context, r *Repository) (bool, error) + func (p *GitLabProvider) DeleteRepository(ctx context.Context, r *Repository) error + type GithubProvider struct + IsPersonal bool + IsPrivate bool + func (p *GithubProvider) AddDeployKey(ctx context.Context, r *Repository, key, keyName string) (bool, error) + func (p *GithubProvider) AddTeam(ctx context.Context, r *Repository, name, permission string) (bool, error) + func (p *GithubProvider) CreateRepository(ctx context.Context, r *Repository) (bool, error) + func (p *GithubProvider) DeleteRepository(ctx context.Context, r *Repository) error + func (p *GithubProvider) GetRepositoryOwner(ctx context.Context, token string, owner string) (string, error) + type Provider interface + AddDeployKey func(ctx context.Context, r *Repository, key, keyName string) (bool, error) + AddTeam func(ctx context.Context, r *Repository, name, permission string) (bool, error) + CreateRepository func(ctx context.Context, r *Repository) (bool, error) + DeleteRepository func(ctx context.Context, r *Repository) error + GetRepositoryOwner func(ctx context.Context, owner string) (string, error) + type Repository struct + AuthorEmail string + AuthorName string + Host string + Name string + Owner string + SSHHost string + Token string + Username string + func NewRepository(name, owner, host, username, token, authorName, authorEmail string) (*Repository, error) + func (r *Repository) Checkout(ctx context.Context, branch, path string) error + func (r *Repository) Commit(ctx context.Context, path, message string) (bool, error) + func (r *Repository) GetSSH() string + func (r *Repository) GetURL() string + func (r *Repository) Push(ctx context.Context) error