Versions in this module Expand all Collapse all v0 v0.0.2 Oct 12, 2022 Changes in this version type RemoteRepository + func (r *RemoteRepository) GetUpstreamName() string + func (r *RemoteRepository) GetUpstreamURL() string v0.0.1 Oct 11, 2022 Changes in this version + const ProtocolHTTPS + const ProtocolSSH + const ProviderGithub + const ProviderGitlab + var Fs = afero.NewOsFs() + func ConfigPath(rootDir string) string + func EnsureCurrentGit() (string, error) + func EnsureDir(paths ...string) error + func GetRootDir() (string, error) + func ParseRepositoryGroup(name string) (string, string, error) + func SortRepositories(repos []*Repository) + func SortRepositoryAttachments(attaches []*RepositoryAttachment) + type Config struct + Editor string + Remotes []*Remote + SearchLimit int + Workspace string + func InitConfig() (*Config, error) + func ReadConfig(rootDir string) (*Config, error) + func (c *Config) GetRemote(name string) *Remote + func (c *Config) MustGetRemote(name string) (*Remote, error) + func (c *Config) Normalize() error + func (c *Config) RootDir() string + type Remote struct + API string + Email string + Groups []*RemoteGroup + Host string + Name string + Protocol string + Provider string + Token string + User string + func (r *Remote) Normalize(cfg *Config) error + type RemoteGroup struct + Email string + Prefix string + Protocol string + User string + type RemoteRepository struct + Archived bool + DefaultBranch string + Name string + Remote *Remote + Upstream *RemoteRepository + WebURL string + func (r *RemoteRepository) Convert() (*Repository, error) + type Repository struct + Attach string + Base string + CloneURL string + Email string + Group string + Name string + Protocol string + Remote *Remote + User string + View int + func NewRepository(remote *Remote, name string) (*Repository, error) + func ParseRepositoryFullPath(cfg *Config, repoFull string) (*Repository, error) + func (repo *Repository) ColorName() string + func (repo *Repository) Exists() (bool, error) + func (repo *Repository) FullName() string + func (repo *Repository) Git() *git.Repository + func (repo *Repository) Normalize() error + func (repo *Repository) Path() string + func (repo *Repository) PathWithRemote() string + type RepositoryAttachment struct + Name string + Path string + Remote string + func (a *RepositoryAttachment) FullName() string + type RepositoryMergeOptions struct + SourceBranch string + TargetBranch string + Title string + Upstream *Repository + type RepositoryProvider interface + Create func(repo *Repository) error + CreateMerge func(repo *Repository, opts RepositoryMergeOptions) (string, error) + CreateRelease func(repo *Repository, release *RepositoryRelease) (*RepositoryRelease, error) + Fork func(repo *Repository, name string) (*RemoteRepository, error) + Get func(remote *Remote, name string) (*RemoteRepository, error) + GetMerge func(repo *Repository, opts RepositoryMergeOptions) (string, error) + GetRelease func(repo *Repository, tag string) (*RepositoryRelease, error) + List func(remote *Remote, group string) ([]*RemoteRepository, error) + Remove func(repo *Repository) error + Search func(remote *Remote, opts RepositorySearchOptions) ([]*RemoteRepository, error) + UploadReleaseFile func(repo *Repository, id interface{}, opts RepositoryUploadReleaseFileOptions) error + type RepositoryRelease struct + Body string + Files []*RepositoryReleaseFile + ID interface{} + Preview bool + Tag string + Title string + WebURL string + type RepositoryReleaseFile struct + DownloadURL string + Name string + Size int64 + type RepositorySearchOptions struct + Group string + Query string + type RepositoryStorage interface + Close func() error + Get func(remote *Remote, name string) (*Repository, error) + GetAttach func(path string) (*Repository, error) + List func(remote *Remote) ([]*Repository, error) + Remove func(repo *Repository) error + Save func(repo *Repository) error + type RepositoryUploadReleaseFileOptions struct + FilePath string + Label string + Name string + Reader io.ReadCloser + Size int64