server

package
v0.0.20 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2023 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitController

func InitController(name string, controller interface{})

func InitServer

func InitServer()

func Run

func Run()

func RunWithSignal

func RunWithSignal()

Types

type Context

type Context struct {
	Request  *http.Request
	Response http.ResponseWriter
	Session  *session.Session
	Path     string
	Params   map[string]string
	Method   string
	Data     io.ReadCloser
	Query    url.Values
	Handle   *Info
}

func (*Context) Access

func (c *Context) Access(access uint) bool

func (*Context) Call

func (c *Context) Call()

func (*Context) CheckStatic added in v0.0.5

func (c *Context) CheckStatic(env *environment.Env, path string) (string, bool)

func (*Context) Error

func (c *Context) Error(status int, iface interface{})

func (*Context) IsGranted

func (c *Context) IsGranted() bool

func (*Context) ParseUrl

func (c *Context) ParseUrl()

func (*Context) UploadFile added in v0.0.10

func (c *Context) UploadFile(postName string) (filename string, error bool)

func (*Context) Write

func (c *Context) Write(iface interface{})

type ContextInterface

type ContextInterface interface {
	SetContext(c *Context)
}

type Info

type Info struct {
	Index      int
	Method     string
	Access     string
	Path       string
	Controller interface{}
	Params     []string
	Reg        *regexp.Regexp
	IsReg      bool
}

type TokenException

type TokenException struct {
	Error            string `json:"error"`
	ErrorDescription string `json:"error_description"`
}

func (*TokenException) Marshal

func (t *TokenException) Marshal() string

Jump to

Keyboard shortcuts

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