postman2

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2019 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIItem added in v1.0.0

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"`
	Event []Event        `json:"event,omitempty"`
}

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 added in v1.0.0

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"` // `raw`, `urlencoded`, `formdata`,`file`,`graphql`
	Raw        string            `json:"raw,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 NewURLForGoUrl

func NewURLForGoUrl(goUrl url.URL) URL

func (*URL) AddVariable

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

func (*URL) IsRawOnly

func (url *URL) IsRawOnly() bool

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