customrest

package
v0.0.0-...-6e5bb36 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CustomRest

type CustomRest struct {
	HTTPMethod string
	Pattern    string
	H          Handler
}

CustomRest ...

func (*CustomRest) GetHTTPMethod

func (rest *CustomRest) GetHTTPMethod() string

GetHTTPMethod ...

func (*CustomRest) GetHandler

func (rest *CustomRest) GetHandler() Handler

GetHandler ...

func (*CustomRest) GetPattern

func (rest *CustomRest) GetPattern() string

GetPattern ...

type Handler

type Handler func(w http.ResponseWriter, r *http.Request) (interface{}, error)

Handler ...

func (Handler) ServeHTTP

func (h Handler) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP ...

type ICustomRest

type ICustomRest interface {
	GetHTTPMethod() string
	GetHandler() Handler
	GetPattern() string
}

ICustomRest ...

func New

func New(opts ...Option) ICustomRest

New ...

type Option

type Option func(*CustomRest)

Option ...

func WithHTTPMethod

func WithHTTPMethod(httpMethod string) Option

WithHTTPMethod ...

func WithHandler

func WithHandler(h Handler) Option

WithHandler ...

func WithPattern

func WithPattern(pattern string) Option

WithPattern ...

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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