postman

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2017 License: MIT Imports: 12 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnvironmentFromFile added in v0.5.0

func EnvironmentFromFile(file string) (map[string]string, error)

Types

type Collection

type Collection struct {
	Id          string      `json:"id"`
	Name        string      `json:"name"`
	Description string      `json:"description"`
	Order       []string    `json:"order"`
	Folders     []Folder    `json:"folders"`
	Timestamp   int64       `json:"timestamp"`
	Owner       interface{} `json:"owner"`
	RemoteLink  string      `json:"remoteLink"`
	Public      bool        `json:"public"`
	Requests    []Request   `json:"requests"`
	Structures  []StructureDefinition
}

func CollectionFromFile added in v0.0.3

func CollectionFromFile(file string, options CollectionOptions) (*Collection, error)

CollectionFromFile parses the content of a file and in a new collection

func (*Collection) ExtractStructuresDefinition added in v0.0.3

func (col *Collection) ExtractStructuresDefinition()

type CollectionOptions added in v0.3.0

type CollectionOptions struct {
	IgnoredRequestHeaders  HeadersList
	IgnoredResponseHeaders HeadersList
	EnvironmentVariables   map[string]string
}

type Folder

type Folder struct {
	Id          string      `json:"id"`
	Name        string      `json:"name"`
	Description string      `json:"description"`
	Order       []string    `json:"order"`
	Owner       interface{} `json:"owner"`
}
type Header struct {
	Name  string
	Value string
}

type HeadersList added in v0.3.0

type HeadersList []string

func (HeadersList) Contains added in v0.3.0

func (list HeadersList) Contains(value string) bool

type Request

type Request struct {
	ID               string        `json:"id"`
	RawHeaders       string        `json:"headers"`
	URL              string        `json:"url"`
	PreRequestScript string        `json:"preRequestScript"`
	PathVariables    interface{}   `json:"pathVariables"`
	Method           string        `json:"method"`
	Data             []RequestData `json:"data"`
	DataMode         string        `json:"dataMode"`
	Version          int64         `json:"version"`
	Tests            string        `json:"tests"`
	CurrentHelper    string        `json:"currentHelper"`
	HelperAttributes interface{}   `json:"helperAttributes"`
	Time             interface{}   `json:"time"`
	Name             string        `json:"name"`
	Description      string        `json:"description"`
	CollectionID     string        `json:"collectionId"`
	Responses        []Response    `json:"responses"`
	RawModeData      string        `json:"rawModeData"`
}

func (Request) Headers

func (req Request) Headers() (headers []Header)

func (Request) ParsedURL added in v0.3.0

func (req Request) ParsedURL() *url.URL

type RequestData added in v0.3.0

type RequestData struct {
	Key   string `json:"key"`
	Value string `json:"value"`
}

type Response

type Response struct {
	Status       string `json:"status"`
	ResponseCode struct {
		Code   int    `json:"code"`
		Name   string `json:"name"`
		Detail string `json:"detail"`
	} `json:"responseCode"`
	Time        interface{}      `json:"time"`
	Headers     []ResponseHeader `json:"headers"`
	Cookies     []interface{}    `json:"cookies"`
	Mime        string           `json:"mime"`
	Text        string           `json:"text"`
	Language    string           `json:"language"`
	RawDataType string           `json:"rawDataType"`
	State       struct {
		Size string `json:"size"`
	} `json:"state"`
	PreviewType            string      `json:"previewType"`
	SearchResultScrolledTo interface{} `json:"searchResultScrolledTo"`
	ForceNoPretty          bool        `json:"forceNoPretty"`
	Write                  bool        `json:"write"`
	Empty                  bool        `json:"empty"`
	Failed                 bool        `json:"failed"`
	IsSample               bool        `json:"isSample"`
	ScrollToResult         bool        `json:"scrollToResult"`
	RunTests               bool        `json:"runTests"`
	ID                     string      `json:"id"`
	Name                   string      `json:"name"`
	Request                interface{} `json:"request"`
}

type ResponseHeader added in v0.3.0

type ResponseHeader struct {
	Name        string `json:"name"`
	Key         string `json:"key"`
	Value       string `json:"value"`
	Description string `json:"description"`
}

type StructureDefinition added in v0.0.3

type StructureDefinition struct {
	Name        string
	Description string
	Fields      []StructureFieldDefinition
}

type StructureFieldDefinition added in v0.0.3

type StructureFieldDefinition struct {
	Name        string
	Description string
	Type        string
}

Jump to

Keyboard shortcuts

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