context

package
v0.0.0-...-39d03c2 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MetaTask string = "__CONTEXT_TASK__"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Context

type Context struct {
	ID       ksuid.KSUID
	Request  *Request
	Response *Response
	Items    []map[string]interface{}
	Metadata map[string]interface{}
}

func New

func New() (*Context, error)

func (*Context) Clone

func (ctx *Context) Clone(id ksuid.KSUID) *Context

func (*Context) GetRefs

func (ctx *Context) GetRefs() map[string]interface{}

type Request

type Request struct {
	Url         string
	Headers     map[string]string
	QueryParams map[string]string
	PathParams  map[string]string
}

type Response

type Response struct {
	Url     string
	Headers http.Header
	Body    io.ReadCloser
}

type Task

type Task struct {
	SiteId   string
	SiteName string
	SiteUrl  string
	Url      string
}

func TaskFromUrl

func TaskFromUrl(u string) *Task

Jump to

Keyboard shortcuts

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