context

package
v0.10.5 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(req *request.Request, vars *service.Variables, options ...Option) (service.Context, error)

Types

type Context

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

func (*Context) Body

func (c *Context) Body() []byte

func (*Context) GetIntVariable

func (c *Context) GetIntVariable(key string) (int, error)

func (*Context) GetStringArrayVariable

func (c *Context) GetStringArrayVariable(key string) ([]string, error)

func (*Context) GetStringMapVariable

func (c *Context) GetStringMapVariable(key string) (map[string]interface{}, error)

func (*Context) GetStringVariable

func (c *Context) GetStringVariable(key string) (string, error)

func (*Context) HandleAuth

func (c *Context) HandleAuth(handler service.Handler) error

func (*Context) HandleCleanup

func (c *Context) HandleCleanup(handler service.Handler) error

func (*Context) HandleWith

func (c *Context) HandleWith(handler service.Handler) error

func (*Context) ParseBody

func (c *Context) ParseBody(obj interface{}) error

func (*Context) RawResponse

func (c *Context) RawResponse() bool

func (*Context) Request

func (c *Context) Request() *http.Request

func (*Context) SetBody

func (c *Context) SetBody(new []byte)

func (*Context) SetRawResponse

func (c *Context) SetRawResponse(val bool)

func (*Context) SetVariable

func (c *Context) SetVariable(key string, val interface{})

func (*Context) Variables

func (c *Context) Variables() map[string]interface{}

func (*Context) Writer

func (c *Context) Writer() http.ResponseWriter

type Option

type Option func(*Context) error

func RawResponse

func RawResponse() Option

Jump to

Keyboard shortcuts

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