Documentation
¶
Index ¶
- func ListRemoteNames() ([]string, error)
- func SplitGroup(name string) (string, string)
- type Remote
- type RemoteGroup
- type Repository
- type RepositoryStorage
- func (s *RepositoryStorage) Add(repo *Repository) error
- func (s *RepositoryStorage) Close() error
- func (s *RepositoryStorage) Delete(repo *Repository)
- func (s *RepositoryStorage) GetByName(remote, name string) *Repository
- func (s *RepositoryStorage) GetByPath(path string) (*Repository, error)
- func (s *RepositoryStorage) List(remote string) []*Repository
- func (s *RepositoryStorage) ReadOnly()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ListRemoteNames ¶
func SplitGroup ¶
Types ¶
type Remote ¶
type Remote struct {
Name string `toml:"-"`
Host string `toml:"host" validate:"required"`
Protocol string `toml:"protocol" validate:"enum_protocol"`
User string `toml:"user" validate:"required"`
Email string `toml:"email" validate:"email"`
Provider string `toml:"provider" validate:"enum_provider"`
Token string `toml:"token"`
API string `toml:"api" validate:"omitempty,uri"`
Groups []*RemoteGroup `toml:"groups" validate:"unique=Name,dive"`
}
func (*Remote) GetCloneURL ¶
func (r *Remote) GetCloneURL(repo *Repository) (string, error)
func (*Remote) GetUserEmail ¶
func (r *Remote) GetUserEmail(repo *Repository) (string, string)
type RemoteGroup ¶
type Repository ¶
type Repository struct {
Path string
Name string
Remote string
View uint64
// contains filtered or unexported fields
}
func AttachRepository ¶
func AttachRepository(remote *Remote, name, path string) (*Repository, error)
func CreateRepository ¶
func CreateRepository(remote *Remote, name string) (*Repository, error)
func (*Repository) Base ¶
func (repo *Repository) Base() string
func (*Repository) FullName ¶
func (repo *Repository) FullName() string
func (*Repository) Group ¶
func (repo *Repository) Group() string
type RepositoryStorage ¶
type RepositoryStorage struct {
// contains filtered or unexported fields
}
func NewRepositoryStorage ¶
func NewRepositoryStorage() (*RepositoryStorage, error)
func (*RepositoryStorage) Add ¶
func (s *RepositoryStorage) Add(repo *Repository) error
func (*RepositoryStorage) Close ¶
func (s *RepositoryStorage) Close() error
func (*RepositoryStorage) Delete ¶
func (s *RepositoryStorage) Delete(repo *Repository)
func (*RepositoryStorage) GetByName ¶
func (s *RepositoryStorage) GetByName(remote, name string) *Repository
func (*RepositoryStorage) GetByPath ¶
func (s *RepositoryStorage) GetByPath(path string) (*Repository, error)
func (*RepositoryStorage) List ¶
func (s *RepositoryStorage) List(remote string) []*Repository
func (*RepositoryStorage) ReadOnly ¶
func (s *RepositoryStorage) ReadOnly()
Click to show internal directories.
Click to hide internal directories.