Documentation
¶
Index ¶
- type Finder
- type Icons
- type Project
- func (p *Project) Filter() error
- func (p Project) GetAllRepos(prefix ...string) []Repository
- func (p Project) GetRepo(name, prefix string) (Repository, bool)
- func (p Project) GetRepoAbsPath(repo Repository) (string, error)
- func (p Project) GetSubProject(name, prefix string) (Project, bool)
- func (p Project) ListReposWithNamespace(prefix ...string) []string
- type ProjectListKeyed
- type ProviderSource
- type RepoState
- type Repository
- type Settings
- type Style
- type Theme
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Icons ¶
type Icons struct { Modified string `json:"modified,omitempty"` Untracked string `json:"untracked,omitempty"` DiffError string `json:"diffError,omitempty"` DiffClean string `json:"diffClean,omitempty"` Ahead string `json:"ahead,omitempty"` Behind string `json:"behind,omitempty"` NA string `json:"na,omitempty"` }
type Project ¶
type Project struct { Source *ProviderSource `json:"source,omitempty"` Clone *bool `json:"clone,omitempty"` ID string `json:"id"` Name string `json:"name"` Path string `json:"path"` Desc string `json:"desc,omitempty"` AbsPath string `json:"-"` Repos []Repository `json:"repos,omitempty"` SubProjects []Project `json:"subprojects,omitempty"` Include []string `json:"include,omitempty"` Exclude []string `json:"exclude,omitempty"` }
Project represents a single project that can have many child projects, while each project can have many repositories.
func (Project) GetAllRepos ¶
func (p Project) GetAllRepos(prefix ...string) []Repository
GetAllRepos returns a list of all repositories in the project.
func (Project) GetRepo ¶
func (p Project) GetRepo(name, prefix string) (Repository, bool)
GetRepo returns a repository by name and initial prefix.
func (Project) GetRepoAbsPath ¶
func (p Project) GetRepoAbsPath(repo Repository) (string, error)
GetRepoAbsPath returns an absolute path of one of its repositories.
func (Project) GetSubProject ¶
GetSubProject returns a sub-project by name and initial prefix.
func (Project) ListReposWithNamespace ¶
ListReposWithNamespace returns a list of repository names with namespace.
type ProjectListKeyed ¶
ProjectList is a list of projects with keys.
type ProviderSource ¶
type ProviderSource struct { Type string `json:"type,omitempty"` Search string `json:"search,omitempty"` }
ProviderSource represents a cloud-provider source of repositories.
func (ProviderSource) UniqueKey ¶
func (ps ProviderSource) UniqueKey() string
UniqueKey returns a unique key for a specific provider source.
func (ProviderSource) Validate ¶
func (ps ProviderSource) Validate() error
type Repository ¶
type Repository struct { ID string `json:"id,omitempty"` Name string `json:"name,omitempty"` Namespace string `json:"namespace,omitempty"` Src string `json:"src,omitempty"` Dir string `json:"dir,omitempty"` URL string `json:"url,omitempty"` Desc string `json:"desc,omitempty"` Type string `json:"-"` AbsPath string `json:"-"` State RepoState `json:"-"` Reason string `json:"-"` }
Repository represents a single repository from filesystem or git provider.
func (Repository) ContainedIn ¶
func (r Repository) ContainedIn(paths []string) bool
func (Repository) GetName ¶
func (r Repository) GetName() string
func (Repository) GetNameWithNamespace ¶
func (r Repository) GetNameWithNamespace() string
func (Repository) GetSource ¶
func (r Repository) GetSource() string
type Theme ¶
type Theme struct { // General Normal Style `json:"normal,omitempty"` Bullet Style `json:"bullet,omitempty"` PreviewHeader Style `json:"previewHeader,omitempty"` // Project ProjectTitle Style `json:"projectTitle,omitempty"` Provider Style `json:"provider,omitempty"` Desc Style `json:"desc,omitempty"` // Repository RepoTitle Style `json:"repoTitle,omitempty"` RepoPath Style `json:"repoPath,omitempty"` GitOutput Style `json:"gitOutput,omitempty"` // Branch BranchName Style `json:"branchName,omitempty"` BranchCurrent Style `json:"branchCurrent,omitempty"` BranchIndicator Style `json:"branchIndicator,omitempty"` RemoteName Style `json:"remoteName,omitempty"` // Tag TagIndicator Style `json:"tagIndicator,omitempty"` // Status Modified Style `json:"modified,omitempty"` Untracked Style `json:"untracked,omitempty"` Diff Style `json:"diff,omitempty"` Error Style `json:"error,omitempty"` // Table // TableBorder Style `json:"tableBorder,omitempty"` FIXME: TableBorderStyle Style `json:"tableBorderStyle,omitempty"` TableHeader Style `json:"tableHeader,omitempty"` TableRowEven Style `json:"tableRowEven,omitempty"` TableRowOdd Style `json:"tableRowOdd,omitempty"` }