Documentation ¶
Index ¶
- type Handlers
- func (h *Handlers) Add(w http.ResponseWriter, r *http.Request)
- func (h *Handlers) Badge(w http.ResponseWriter, r *http.Request)
- func (h *Handlers) CheckAvailability(w http.ResponseWriter, r *http.Request)
- func (h *Handlers) ClaimOwnership(w http.ResponseWriter, r *http.Request)
- func (h *Handlers) Delete(w http.ResponseWriter, r *http.Request)
- func (h *Handlers) GetAll(w http.ResponseWriter, r *http.Request)
- func (h *Handlers) GetByKind(w http.ResponseWriter, r *http.Request)
- func (h *Handlers) GetOwnedByOrg(w http.ResponseWriter, r *http.Request)
- func (h *Handlers) GetOwnedByUser(w http.ResponseWriter, r *http.Request)
- func (h *Handlers) Transfer(w http.ResponseWriter, r *http.Request)
- func (h *Handlers) Update(w http.ResponseWriter, r *http.Request)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handlers ¶
type Handlers struct {
// contains filtered or unexported fields
}
Handlers represents a group of http handlers in charge of handling repositories operations.
func NewHandlers ¶
func NewHandlers(repoManager hub.RepositoryManager) *Handlers
NewHandlers creates a new Handlers instance.
func (*Handlers) Add ¶
func (h *Handlers) Add(w http.ResponseWriter, r *http.Request)
Add is an http handler that adds the provided repository to the database.
func (*Handlers) Badge ¶ added in v0.6.0
func (h *Handlers) Badge(w http.ResponseWriter, r *http.Request)
Badge is an http handler that returns the information needed to render the repository badge.
func (*Handlers) CheckAvailability ¶
func (h *Handlers) CheckAvailability(w http.ResponseWriter, r *http.Request)
CheckAvailability is an http handler that checks the availability of a given value for the provided resource kind.
func (*Handlers) ClaimOwnership ¶ added in v0.6.0
func (h *Handlers) ClaimOwnership(w http.ResponseWriter, r *http.Request)
ClaimOwnership is an http handler used to claim the ownership of a given repository, transferring it to the selected entity if the requesting user has permissions to do so.
func (*Handlers) Delete ¶
func (h *Handlers) Delete(w http.ResponseWriter, r *http.Request)
Delete is an http handler that deletes the provided repository from the database.
func (*Handlers) GetAll ¶ added in v0.6.0
func (h *Handlers) GetAll(w http.ResponseWriter, r *http.Request)
GetAll is an http handler that returns all the repositories available.
func (*Handlers) GetByKind ¶ added in v0.6.0
func (h *Handlers) GetByKind(w http.ResponseWriter, r *http.Request)
GetByKind is an http handler that returns all the repositories available of the kind provided.
func (*Handlers) GetOwnedByOrg ¶
func (h *Handlers) GetOwnedByOrg(w http.ResponseWriter, r *http.Request)
GetOwnedByOrg is an http handler that returns the repositories owned by the organization provided. The user doing the request must belong to the organization.
func (*Handlers) GetOwnedByUser ¶
func (h *Handlers) GetOwnedByUser(w http.ResponseWriter, r *http.Request)
GetOwnedByUser is an http handler that returns the repositories owned by the user doing the request.