request

package
v0.0.0-...-73f9428 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2024 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const UnsortedName = "unsorted"

Variables

This section is empty.

Functions

This section is empty.

Types

type Data

type Data struct {
	URL      string              `json:"url,omitempty"`
	Headers  map[string][]string `json:"headers,omitempty"`
	Method   string              `json:"method,omitempty"`
	Proto    string              `json:"proto,omitempty"`
	Body     string              `json:"body,omitempty"`
	Response *Data               `json:"response,omitempty"`
}

type Group

type Group struct {
	Name     string     `json:"name"`
	Desc     string     `json:"desc"`
	Requests []*Request `json:"requests"`
}

func LoadFrom

func LoadFrom(dataDir string) ([]*Group, error)

func NewGroup

func NewGroup(name string) *Group

func (*Group) AddRequest

func (group *Group) AddRequest(r *Request)

func (*Group) Description

func (group *Group) Description() string

Description returns a brief description of the group.

func (*Group) FilterValue

func (group *Group) FilterValue() string

FilterValue is the value we use when filtering against this item when we're filtering the list.

func (*Group) ListItems

func (group *Group) ListItems() []list.Item

ListItems returns the collection of requests as list.Item.

func (*Group) RemoveRequest

func (group *Group) RemoveRequest(r *Request)

func (*Group) Title

func (group *Group) Title() string

Title returns the name of the request group.

type Request

type Request struct {
	Name string `json:"name,omitempty"`
	Desc string `json:"desc,omitempty"`
	Data *Data  `json:"data,omitempty"`
}

func (*Request) Description

func (request *Request) Description() string

func (*Request) Equal

func (r *Request) Equal(other *Request) bool

func (*Request) FilterValue

func (request *Request) FilterValue() string

FilterValue is the value we use when filtering against this item when we're filtering the list.

func (*Request) Title

func (request *Request) Title() string

Jump to

Keyboard shortcuts

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