Documentation ¶
Index ¶
- Constants
- Variables
- type BodyType
- type HTTPMethod
- type Project
- func (p *Project) GetRequest(name string) (*Request, bool)
- func (p *Project) ListEnvironments() ([]string, error)
- func (p *Project) ListRequests() []*Request
- func (p *Project) NewRequest(name string, description string, method HTTPMethod, url string, ...) *Request
- func (p *Project) ReloadRequests() error
- func (p *Project) Save() error
- type Request
Constants ¶
View Source
const (
CurrentVersion = "0.0.1"
)
Variables ¶
View Source
var ( BodyTypeExtensions = map[BodyType]string{ BodyTypeNone: "", BodyTypeJSON: "json", BodyTypeForm: "form", BodyTypeText: "txt", } BodyTypes = [...]BodyType{ BodyTypeNone, BodyTypeJSON, BodyTypeForm, BodyTypeText, } )
View Source
var ( HTTPMethods = [...]HTTPMethod{ HTTPMethodGet, HTTPMethodPost, HTTPMethodPut, HTTPMethodDelete, HTTPMethodPatch, HTTPMethodHead, HTTPMethodOption, } )
Functions ¶
This section is empty.
Types ¶
type HTTPMethod ¶
type HTTPMethod string
const ( HTTPMethodGet HTTPMethod = "GET" HTTPMethodPost HTTPMethod = "POST" HTTPMethodPut HTTPMethod = "PUT" HTTPMethodDelete HTTPMethod = "DELETE" HTTPMethodPatch HTTPMethod = "PATCH" HTTPMethodHead HTTPMethod = "HEAD" HTTPMethodOption HTTPMethod = "OPTION" )
type Project ¶
type Project struct { Name string `json:"name"` Version string `json:"version"` RootDir string `json:"-"` // contains filtered or unexported fields }
func LoadProject ¶
func (*Project) ListEnvironments ¶
func (*Project) ListRequests ¶
func (*Project) NewRequest ¶
func (*Project) ReloadRequests ¶
type Request ¶
type Request struct { Name string `json:"-"` Description string `json:"description"` Method HTTPMethod `json:"method"` URL string `json:"url"` BodyType BodyType `json:"body_type"` Body string `json:"body_template"` Headers map[string]string `json:"headers"` Variables map[string]string `json:"variables"` Version string `json:"version"` // contains filtered or unexported fields }
Click to show internal directories.
Click to hide internal directories.