context

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Context

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

func NewContext

func NewContext(request *http.Request, response http.ResponseWriter, traceId string, spanId string) *Context

func (*Context) Input

func (c *Context) Input() *Input

func (*Context) Output

func (c *Context) Output() *Output

func (*Context) SetViewSwitch

func (c *Context) SetViewSwitch(viewDisabled bool)

func (*Context) SpanId

func (c *Context) SpanId() string

func (*Context) TraceId

func (c *Context) TraceId() string

func (*Context) ViewDisabled

func (c *Context) ViewDisabled() bool

type Input

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

func NewInput

func NewInput(request *http.Request) *Input

func (*Input) BaseUrl

func (i *Input) BaseUrl() string

func (*Input) ClientIp

func (i *Input) ClientIp() string

func (*Input) Data

func (i *Input) Data() map[string][]string

func (*Input) File

func (i *Input) File(key string) (multipart.File, *multipart.FileHeader, error)

func (*Input) GetBool

func (i *Input) GetBool(key string) bool

func (*Input) GetFloat64

func (i *Input) GetFloat64(key string) float64

func (*Input) GetHeader

func (i *Input) GetHeader(key string) string

func (*Input) GetInt

func (i *Input) GetInt(key string) int

func (*Input) GetInt64

func (i *Input) GetInt64(key string) int64

func (*Input) Headers

func (i *Input) Headers() map[string][]string

func (*Input) Is

func (i *Input) Is(method string) bool

func (*Input) IsMultipartForm

func (i *Input) IsMultipartForm() bool

func (*Input) Method

func (i *Input) Method() string

func (*Input) Path

func (i *Input) Path() string

func (*Input) Post

func (i *Input) Post(key string) string

func (*Input) PostData

func (i *Input) PostData() map[string][]string

func (*Input) Query

func (i *Input) Query(key string) string

func (*Input) QueryData

func (i *Input) QueryData() map[string][]string

func (*Input) Uri

func (i *Input) Uri() string

type Output

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

func NewOutput

func NewOutput(response http.ResponseWriter) *Output

func (*Output) Data

func (o *Output) Data() interface{}

func (*Output) End

func (o *Output) End()

func (*Output) InternalError

func (o *Output) InternalError()

func (*Output) PageNotFound

func (o *Output) PageNotFound()

func (*Output) Redirect

func (o *Output) Redirect(url string)

func (*Output) Response

func (o *Output) Response() http.ResponseWriter

func (*Output) SetData

func (o *Output) SetData(data interface{}) *Output

func (*Output) SetHeader

func (o *Output) SetHeader(key string, value string) *Output

func (*Output) SetStatus

func (o *Output) SetStatus(code int) *Output

func (*Output) Status

func (o *Output) Status() int

func (*Output) ToHtml

func (o *Output) ToHtml()

func (*Output) ToJson

func (o *Output) ToJson()

func (*Output) ToString

func (o *Output) ToString()

func (*Output) ToXml

func (o *Output) ToXml()

Jump to

Keyboard shortcuts

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