responses

package
v0.0.0-...-793a51f Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2018 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Behavior

type Behavior struct {
	Wait       int    `json:"wait,omitempty"`
	DecorateFn string `json:"decorate,omitempty"`
}

type InjectBuilder

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

func Inject

func Inject() *InjectBuilder

func (*InjectBuilder) Build

func (builder *InjectBuilder) Build() Response

func (*InjectBuilder) Fn

func (builder *InjectBuilder) Fn(functionCode string) *InjectBuilder

type IsBuilder

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

func Is

func Is() *IsBuilder

func (*IsBuilder) Body

func (builder *IsBuilder) Body(body string) *IsBuilder

func (*IsBuilder) Build

func (builder *IsBuilder) Build() IsElement

func (*IsBuilder) Decorate

func (builder *IsBuilder) Decorate(decorateFn string) *IsBuilder

func (*IsBuilder) Header

func (builder *IsBuilder) Header(header string, value string) *IsBuilder

func (*IsBuilder) StatusCode

func (builder *IsBuilder) StatusCode(statusCode int) *IsBuilder

func (*IsBuilder) Wait

func (builder *IsBuilder) Wait(waitTime int) *IsBuilder

type IsElement

type IsElement struct {
	Is       *IsResponse `json:"is"`
	Behavior *Behavior   `json:"_behaviors,omitempty"`
}

func (IsElement) Type

func (i IsElement) Type() string

type IsResponse

type IsResponse struct {
	StatusCode int               `json:"statusCode,omitempty"`
	Headers    map[string]string `json:"headers,omitempty"`
	Body       string            `json:"body,omitempty"`
}

type Response

type Response interface {
	Type() string
}

Jump to

Keyboard shortcuts

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