context

package
Version: v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2020 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 Ctx

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

Ctx type

func NewCtx

func NewCtx(t CtxType) *Ctx

NewCtx new Ctx

func (*Ctx) RealIP

func (c *Ctx) RealIP() string

RealIP get real IP Address

func (*Ctx) Request

func (c *Ctx) Request() *CtxRequest

Request get current request

type CtxRequest

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

CtxRequest type

func (*CtxRequest) HostName

func (cr *CtxRequest) HostName() string

HostName get hostname

func (*CtxRequest) Method

func (cr *CtxRequest) Method() string

Method get method

func (*CtxRequest) RemoteAddr

func (cr *CtxRequest) RemoteAddr() string

RemoteAddr get hostname

func (*CtxRequest) RequestURI

func (cr *CtxRequest) RequestURI() string

RequestURI get requestURI

func (*CtxRequest) UserAgent

func (cr *CtxRequest) UserAgent() string

UserAgent get UserAgent

type CtxType

type CtxType string

CtxType type

const (
	// SystemCtx const
	SystemCtx CtxType = "system.context"
)

Source Files

Jump to

Keyboard shortcuts

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