repo

package
v0.15.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 12, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

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.

func (*Handlers) Transfer

func (h *Handlers) Transfer(w http.ResponseWriter, r *http.Request)

Transfer is an http handler that transfers the provided repository to a different owner.

func (*Handlers) Update

func (h *Handlers) Update(w http.ResponseWriter, r *http.Request)

Update is an http handler that updates the provided repository in the database.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL