repo

package
v0.0.0-...-cab28d8 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2023 License: Apache-2.0 Imports: 13 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(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

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

Search is an http handler used to search for repositories in the hub database.

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