FetchTask

package
v0.0.0-...-70c2902 Latest Latest
Warning

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

Go to latest
Published: May 9, 2019 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var FetchElements map[string]FetchElement

FetchElements map of requests

Functions

func AddToElements

func AddToElements(obj *FetchElement) string

AddToElements on global elements array

func DeleteFromList

func DeleteFromList(id string) error

DeleteFromList delete element from list

func IsInElements

func IsInElements(token string) bool

IsInElements check element in array

Types

type FetchElement

type FetchElement struct {
	ID      string      `json:"ID"`
	Status  int         `json:"StatusHttp"`
	Headers http.Header `json:"Headers"`
	Length  int64       `json:"Length"` // answer Length
	Error   string      `json:"Error"`
}

FetchElement list item

func GetElementById

func GetElementById(id string) (FetchElement, error)

GetElementById get element by id

func GetListElement

func GetListElement() []FetchElement

GetListElement fetch list

func (*FetchElement) GetOnline

func (t *FetchElement) GetOnline(method, url string) error

GetOnline request to url, and sets params

type PublicElement

type PublicElement struct {
	ID      string      `json:"ID"`
	Status  int         `json:"StatusHttp"`
	Headers http.Header `json:"Headers"`
	Length  int64       `json:"Length"` // answer Length
}

PublicElement public answer after add

func (*PublicElement) Encode

func (obj *PublicElement) Encode(w http.ResponseWriter) error

Encode encode answer

func (*PublicElement) SetFromElement

func (obj *PublicElement) SetFromElement(cl *FetchElement)

SetFromElement set answers values

Jump to

Keyboard shortcuts

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