Documentation ¶
Overview ¶
Package repository contains types and functions for git repository interaction.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrKeyNotFound = errors.New("key not found") ErrRepositoryNotFound = errors.New("repository not found") ErrUserNotFound = errors.New("user not found") ErrKeyAlreadyExists = errors.New("user already have this key") ErrRepositoryAlreadExists = errors.New("repository already exists") ErrUserAlreadyExists = errors.New("user already exists") )
Functions ¶
func Register ¶
func Register(name string, manager RepositoryManager)
Register registers a new repository manager, that can be later configured and used.
Types ¶
type KeyRepositoryManager ¶
type KeyRepositoryManager interface { AddKey(username string, key Key) error UpdateKey(username string, key Key) error RemoveKey(username string, key Key) error ListKeys(username string) ([]Key, error) }
KeyRepositoryManager is a RepositoryManager that is able to manage public SSH keys.
type Repository ¶
Repository represents a repository in the manager.
type RepositoryManager ¶
type RepositoryManager interface { CreateUser(username string) error RemoveUser(username string) error GrantAccess(repository, user string) error RevokeAccess(repository, user string) error CreateRepository(name string, users []string) error RemoveRepository(name string) error GetRepository(name string) (Repository, error) Diff(repositoryName, fromVersion, toVersion string) (string, error) CommitMessages(repository, ref string, limit int) ([]string, error) }
RepositoryManager represents a manager of application repositories.
func Manager ¶
func Manager() RepositoryManager
Manager returns the current configured manager, as defined in the configuration file.
Directories ¶
Path | Synopsis |
---|---|
Package gandalf provides an implementation of the RepositoryManager, that uses Gandalf (https://github.com/tsuru/gandalf).
|
Package gandalf provides an implementation of the RepositoryManager, that uses Gandalf (https://github.com/tsuru/gandalf). |
Package repositorytest provides a fake repository manager for use in tests.
|
Package repositorytest provides a fake repository manager for use in tests. |
Click to show internal directories.
Click to hide internal directories.