model

package
v1.1.40-rc2 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const ChallengeResponseFormat = `{"challenge":"%s"}`
View Source
const ResponseFormat = `{"codemsg":"%s"}`

Variables

This section is empty.

Functions

This section is empty.

Types

type OapiHeader

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

func NewOapiHeader

func NewOapiHeader(m map[string][]string) *OapiHeader

func (OapiHeader) GetFirstValue added in v1.1.12

func (h OapiHeader) GetFirstValue(name string) string

func (OapiHeader) GetMultiValues

func (h OapiHeader) GetMultiValues(name string) []string

func (OapiHeader) GetNames

func (h OapiHeader) GetNames() []string

type OapiRequest

type OapiRequest struct {
	Ctx    context.Context
	Uri    string
	Header *OapiHeader
	Body   string
}

func ToOapiRequest

func ToOapiRequest(request *http.Request) (*OapiRequest, error)

type OapiResponse

type OapiResponse struct {
	StatusCode  int
	ContentType string
	Header      map[string][]string
	Body        string
}

func NewOapiResponseOfErr

func NewOapiResponseOfErr(err error) *OapiResponse

func (*OapiResponse) Write

func (r *OapiResponse) Write(statusCode int, contentType string, body string)

func (OapiResponse) WriteTo

func (r OapiResponse) WriteTo(response http.ResponseWriter) error

Jump to

Keyboard shortcuts

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