prelude

package
v0.0.23 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	GitTag string

	ErrorUnauthorized       = errors.New("Unauthorized")
	ErrorMethodNotAllowed   = errors.New("Method Not Allowed")
	ErrorInternalServer     = errors.New("Internal Server Error")
	ErrorWrongPaymentMethod = errors.New("wrong payment method")
	ErrorInvalidData        = errors.New("invalid data")
)

Functions

func GetParameters

func GetParameters(prefix string, r *http.Request) []string

func RErrorBadRequest

func RErrorBadRequest(w http.ResponseWriter)

func RErrorInternalServer

func RErrorInternalServer(w http.ResponseWriter)

func RErrorMethodNotAllowed

func RErrorMethodNotAllowed(w http.ResponseWriter)

func RErrorNotFound

func RErrorNotFound(w http.ResponseWriter)

func RErrorUnauthorized

func RErrorUnauthorized(w http.ResponseWriter)

Types

type RequestData

type RequestData struct {
	Method  string
	URL     string
	Query   string
	Body    string
	Headers map[string][]string
	Form    map[string][]string
}

func Prepare

func Prepare(w http.ResponseWriter, r *http.Request, methods []string, chkAuth bool) (*RequestData, error)

Jump to

Keyboard shortcuts

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