decoder

package
v0.0.1-beta1 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BlockHTTP        = "http"
	BlockHeaders     = "headers"
	BlockHeader      = "header"
	AttBaseURL       = "baseUrl"
	AttTimeout       = "timeout"
	LabelName        = "name"
	LabelType        = "type"
	AttributeValue   = "value"
	BlockAuthBasic   = "auth-basic"
	BlockAuthToken   = "auth-token"
	BlockCookie      = "cookie"
	AttributeName    = "name"
	AttributeBasURL  = "baseUrl"
	AttributePath    = "path"
	AttributeDomain  = "domain"
	BlockConnection  = "connection"
	AttributeTimeout = "timeout"
	AttributeProxy   = "Proxy"
	BlockPayload     = "payload"
	AttributeData    = "data"
	BlockQueryParams = "queryParams"
	BlockQueryParam  = "queryParam"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Connection

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

func (*Connection) Proxy

func (c *Connection) Proxy(ctx *hcl.EvalContext) (string, errors.Error)

func (*Connection) SetProxy

func (c *Connection) SetProxy(expr hcl.Expression)

func (*Connection) SetTimeout

func (c *Connection) SetTimeout(expr hcl.Expression)

func (*Connection) Timeout

func (c *Connection) Timeout(ctx *hcl.EvalContext) (time.Duration, errors.Error)
type Cookie struct {
	// contains filtered or unexported fields
}

func (*Cookie) Domain

func (c *Cookie) Domain(ctx *hcl.EvalContext) (string, errors.Error)

func (*Cookie) Name

func (c *Cookie) Name(ctx *hcl.EvalContext) (string, errors.Error)

func (*Cookie) Path

func (c *Cookie) Path(ctx *hcl.EvalContext) (string, errors.Error)

func (*Cookie) SetDomain

func (c *Cookie) SetDomain(expr hcl.Expression)

func (*Cookie) SetName

func (c *Cookie) SetName(expr hcl.Expression)

func (*Cookie) SetPath

func (c *Cookie) SetPath(expr hcl.Expression)

func (*Cookie) SetValue

func (c *Cookie) SetValue(expr hcl.Expression)

func (*Cookie) Value

func (c *Cookie) Value(ctx *hcl.EvalContext) (string, errors.Error)

type Headers

type Headers map[string]hcl.Expression

type Payload

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

func (*Payload) Data

func (p *Payload) Data(ctx *hcl.EvalContext) (string, errors.Error)

func (*Payload) SetData

func (p *Payload) SetData(expr hcl.Expression)

func (*Payload) SetType

func (p *Payload) SetType(t string)

func (*Payload) Type

func (p *Payload) Type(ctx *hcl.EvalContext) string

type QueryParams

type QueryParams map[string]hcl.Expression

type Request

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

func DecodeRequest

func DecodeRequest(block *hcl.Block) (*Request, errors.Error)

func (*Request) AddHeaders

func (req *Request) AddHeaders(headers map[string]hcl.Expression)

func (*Request) AddQueryParams

func (req *Request) AddQueryParams(qp map[string]hcl.Expression)

func (*Request) BaseURL

func (req *Request) BaseURL(ctx *hcl.EvalContext) (string, errors.Error)

func (*Request) Connection

func (req *Request) Connection(ctx *hcl.EvalContext) (*executor.Connection, errors.Error)

func (*Request) Cookies

func (req *Request) Cookies(ctx *hcl.EvalContext) ([]*executor.Cookie, errors.Error)

func (*Request) Headers

func (req *Request) Headers(ctx *hcl.EvalContext) (map[string][]string, errors.Error)

func (*Request) Path

func (req *Request) Path(ctx *hcl.EvalContext) (string, errors.Error)

func (*Request) QueryParams

func (req *Request) QueryParams(ctx *hcl.EvalContext) (map[string][]string, errors.Error)

func (*Request) SetBaseURL

func (req *Request) SetBaseURL(expr hcl.Expression)

func (*Request) SetPath

func (req *Request) SetPath(expr hcl.Expression)

type Response

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

func DecodeResponse

func DecodeResponse(block *hcl.Block) (*Response, errors.Error)

func (*Response) SetValues

func (res *Response) SetValues(attributes hcl.Attributes)

func (*Response) Values

func (res *Response) Values() map[string]hcl.Expression

Jump to

Keyboard shortcuts

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