context

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2026 License: BSD-3-Clause Imports: 9 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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