handlers

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IgnoreAPIError

func IgnoreAPIError(w http.ResponseWriter, r *http.Request, err apierrors.RequestError)

Types

type DefaultPorterHandler

type DefaultPorterHandler struct {
	// contains filtered or unexported fields
}

func (*DefaultPorterHandler) Config

func (d *DefaultPorterHandler) Config() *config.Config

func (*DefaultPorterHandler) DecodeAndValidate

func (d *DefaultPorterHandler) DecodeAndValidate(w http.ResponseWriter, r *http.Request, v interface{}) bool

func (*DefaultPorterHandler) DecodeAndValidateNoWrite

func (d *DefaultPorterHandler) DecodeAndValidateNoWrite(r *http.Request, v interface{}) error

func (*DefaultPorterHandler) HandleAPIError

func (*DefaultPorterHandler) PopulateOAuthSession

func (d *DefaultPorterHandler) PopulateOAuthSession(w http.ResponseWriter, r *http.Request, state string, isProject bool) error

func (*DefaultPorterHandler) Repo

func (*DefaultPorterHandler) WriteResult

func (d *DefaultPorterHandler) WriteResult(w http.ResponseWriter, r *http.Request, v interface{})

type PorterHandler

type PorterHandler interface {
	Config() *config.Config
	Repo() repository.Repository
	HandleAPIError(w http.ResponseWriter, r *http.Request, err apierrors.RequestError)
	PopulateOAuthSession(w http.ResponseWriter, r *http.Request, state string, isProject bool) error
}

type PorterHandlerReadWriter

type PorterHandlerReadWriter interface {
	PorterHandlerWriter
	PorterHandlerReader
}

func NewDefaultPorterHandler

func NewDefaultPorterHandler(
	config *config.Config,
	decoderValidator shared.RequestDecoderValidator,
	writer shared.ResultWriter,
) PorterHandlerReadWriter

type PorterHandlerReader

type PorterHandlerReader interface {
	PorterHandler
	shared.RequestDecoderValidator
}

type PorterHandlerWriter

type PorterHandlerWriter interface {
	PorterHandler
	shared.ResultWriter
}

Jump to

Keyboard shortcuts

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