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) Search(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(cfg *viper.Viper, 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 ¶
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 ¶
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) Search ¶ added in v1.0.0
func (h *Handlers) Search(w http.ResponseWriter, r *http.Request)
Search is an http handler used to search for repositories in the hub database.