Documentation ¶
Index ¶
- type Repository
- func (r *Repository) Create(repo *entity.Repo) (*entity.Repo, error)
- func (r *Repository) Delete(repoID string) error
- func (r *Repository) DeleteMany(userID string) error
- func (r *Repository) FindAll(userID string) ([]*entity.Repo, error)
- func (r *Repository) FindByID(repoID string) (*entity.Repo, error)
- func (r *Repository) FindByUrlAndUserID(url string, userID string) (*entity.Repo, error)
- func (r *Repository) UpdatePackages(repo *entity.Repo) (*entity.Repo, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Repository ¶
type Repository struct {
Collection *mongo.Collection
}
func NewRepository ¶
func NewRepository(db *mongo.Database) *Repository
Creates new mongo repository for git repositories
func (*Repository) DeleteMany ¶
func (r *Repository) DeleteMany(userID string) error
Deletes all git repositories belongs to user Run after deleting user
func (*Repository) FindAll ¶
func (r *Repository) FindAll(userID string) ([]*entity.Repo, error)
Finds git all repositories belongs to user
func (*Repository) FindByID ¶
func (r *Repository) FindByID(repoID string) (*entity.Repo, error)
Finds git repository by id
func (*Repository) FindByUrlAndUserID ¶
Finds git repository by url and user id
func (*Repository) UpdatePackages ¶
Updates git repository's packages
Click to show internal directories.
Click to hide internal directories.