postman

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2021 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetMocksFromPostman

func GetMocksFromPostman() (map[string]Mock, error)

func LoadStaticPostmanCollection

func LoadStaticPostmanCollection(path string)

func StartServer

func StartServer()

func StartServerFromStaticFile

func StartServerFromStaticFile()

Types

type Client

type Client struct {
	BaseURL   *url.URL
	UserAgent string
	// contains filtered or unexported fields
}

type Collection

type Collection struct {
	Info struct {
		PostmanID string `json:"_postman_id"`
		Name      string `json:"name"`
		Schema    string `json:"schema"`
	} `json:"info"`
	Item []item `json:"item"`
	Auth struct {
		Type   string `json:"type"`
		Bearer []struct {
			Key   string `json:"key"`
			Value string `json:"value"`
			Type  string `json:"type"`
		} `json:"bearer"`
	} `json:"auth"`
	Event []struct {
		Listen string `json:"listen"`
		Script struct {
			ID   string   `json:"id"`
			Type string   `json:"type"`
			Exec []string `json:"exec"`
		} `json:"script"`
	} `json:"event"`
	Variable []struct {
		ID    string `json:"id"`
		Key   string `json:"key"`
		Value string `json:"value"`
		Type  string `json:"type"`
	} `json:"variable"`
}

type CollectionOverview

type CollectionOverview struct {
	ID    string `json:"id"`
	Name  string `json:"name"`
	Owner string `json:"owner"`
	UID   string `json:"uid"`
}

type Collections

type Collections struct {
	Collections []CollectionOverview `json:"collections"`
}

type Config

type Config struct {
	Name    string `yaml:"name"`
	Logging struct {
		Level       string `yaml:"level"`
		JSONLogging bool   `yaml:"jsonLogging"`
	} `yaml:"logging"`
	Port    int    `yaml:"port"`
	Mode    string `yaml:"mode"`
	Postman struct {
		URL         string   `yaml:"url"`
		Collections []string `yaml:collections`
		// contains filtered or unexported fields
	} `yaml:"postman"`
	Static struct {
		WatchFile bool   `yaml:"watchFile"`
		Path      string `yaml:"path"`
	} `yaml:"static"`
}

Jump to

Keyboard shortcuts

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