common

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: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TruncateString

func TruncateString(str string, num int) string

Types

type Header struct {
	Key   string
	Value string
}

func Map

func Map(vs []PostmanHeader, f func(PostmanHeader) Header) []Header

type HttpMethod

type HttpMethod string
const (
	GET     HttpMethod = "GET"
	POST    HttpMethod = "POST"
	PUT     HttpMethod = "PUT"
	DELETE  HttpMethod = "DELETE"
	OPTIONS HttpMethod = "OPTIONS"
	HEAD    HttpMethod = "HEAD"
)

func (HttpMethod) String

func (m HttpMethod) String() string

type Mock

type Mock struct {
	RawPath string
	Method  HttpMethod
	Name    string
	Body    string
	Header  []Header
	Code    int
	Path    []string
}

type PostmanHeader

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

Jump to

Keyboard shortcuts

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