postman2

package
v0.0.0-...-998eeed Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2017 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIItem

type APIItem struct {
	Name    string  `json:"name,omitempty"`
	Event   []Event `json:"event,omitempty"`
	Request Request `json:"request,omitempty"`
}

type Collection

type Collection struct {
	Info CollectionInfo `json:"info"`
	Item []FolderItem   `json:"item"`
}

func NewCollectionFromBytes

func NewCollectionFromBytes(data []byte) (Collection, error)

func (*Collection) GetOrNewFolder

func (col *Collection) GetOrNewFolder(folderName string) FolderItem

func (*Collection) InflateRawURLs

func (col *Collection) InflateRawURLs()

func (*Collection) SetFolder

func (col *Collection) SetFolder(newFolder FolderItem)

type CollectionInfo

type CollectionInfo struct {
	Name        string `json:"name,omitempty"`
	PostmanID   string `json:"_postman_id,omitempty"`
	Description string `json:"description,omitempty"`
	Schema      string `json:"schema,omitempty"`
}

type Event

type Event struct {
	Listen string `json:"listen"`
	Script Script `json:"script"`
}

type FolderItem

type FolderItem struct {
	Name        string    `json:"name,omitempty"`
	Description string    `json:"description,omitempty"`
	Item        []APIItem `json:"item,omitempty"`
}
type Header struct {
	Key         string `json:"key,omitempty"`
	Value       string `json:"value,omitempty"`
	Description string `json:"description,omitempty"`
}

type Request

type Request struct {
	URL         URL         `json:"url,omitempty"`
	Method      string      `json:"method,omitempty"`
	Header      []Header    `json:"header,omitempty"`
	Body        RequestBody `json:"body,omitempty"`
	Description string      `json:"description,omitempty"`
}

type RequestBody

type RequestBody struct {
	Mode       string            `json:"mode,omitempty"`
	URLEncoded []URLEncodedParam `json:"urlencoded,omitempty"`
}

type Script

type Script struct {
	Type string   `json:"type,omitempty"`
	Exec []string `json:"exec,omitmpety"`
}

type URL

type URL struct {
	Raw      string            `json:"raw,omitempty"`
	Protocol string            `json:"protocol,omitempty"`
	Auth     map[string]string `json:"auth"`
	Host     []string          `json:"host,omitempty"`
	Path     []string          `json:"path,omitempty"`
	Variable []URLVariable     `json:"variable,omitempty"`
}

func NewURL

func NewURL(rawURL string) URL

func (*URL) AddVariable

func (url *URL) AddVariable(key string, value interface{})

type URLEncodedParam

type URLEncodedParam struct {
	Key     string `json:"key,omitempty"`
	Value   string `json:"value,omitempty"`
	Type    string `json:"type,omitempty"`
	Enabled bool   `json:"enabled,omitempty"`
}

type URLVariable

type URLVariable struct {
	Value interface{} `json:"value,omitempty"`
	ID    string      `json:"id,omitempty"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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