http

package
v0.0.0-...-26c2032 Latest Latest
Warning

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

Go to latest
Published: May 3, 2021 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUnknownOperation = errors.New("Unknown http operation")
)

Functions

This section is empty.

Types

type HTMLRespond

type HTMLRespond struct {
	StatusCode int

	PageTemplate string

	TemplateModel interface{}
}

func (*HTMLRespond) WriteRespond

func (self *HTMLRespond) WriteRespond(ses *httpSession) error

type MessageRespond

type MessageRespond struct {
	StatusCode int
	Msg        interface{}
	CodecName  string
}

func (*MessageRespond) String

func (self *MessageRespond) String() string

func (*MessageRespond) WriteRespond

func (self *MessageRespond) WriteRespond(ses *httpSession) error

type RequestMatcher

type RequestMatcher interface {
	Match(method, url string) bool
}

type RespondProc

type RespondProc interface {
	WriteRespond(*httpSession) error
}

type StatusRespond

type StatusRespond struct {
	StatusCode int
}

func (*StatusRespond) WriteRespond

func (self *StatusRespond) WriteRespond(ses *httpSession) error

type TextRespond

type TextRespond struct {
	StatusCode int
	Text       string
}

func (*TextRespond) WriteRespond

func (self *TextRespond) WriteRespond(ses *httpSession) error

Jump to

Keyboard shortcuts

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