request

package
v0.0.0-...-e168591 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2017 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAngliaListPageNums

func GetAngliaListPageNums(ur string) (int, error)

GetAngliaListPageNums pare anglia detail

func GetBestIPfromMicroService

func GetBestIPfromMicroService(ur string) (string, error)

47.91.138.212:9999/api/v1/getip/1 GetAngliaListPageNums pare anglia detail

func ParseAnglia

func ParseAnglia(ur string) (interface{}, error)

ParseAnglia pare anglia detail

func ParseAngliaList

func ParseAngliaList(ur string) ([]string, error)

ParseAngliaList http reques from node.js and parse

func PostParseAngliaList

func PostParseAngliaList(keyword string) ([]string, error)

func StanHTTPGetURL

func StanHTTPGetURL(ur string) ([]byte, error)

StanHTTPGetURL go request url use http get.

func StanHTTPPostURL

func StanHTTPPostURL(url string, jsonStr []byte) ([]byte, error)

St var jsonprep string = `{"username":"`+username+`","password":"`+password+`"}`

var jsonStr = []byte(jsonprep)

u := "http://47.91.138.212:8001/anglialist" k := "http://www.anglia-live.com/products/circuit-protection/fuses-breakers-holders/resettable-fuses#resultspage,4|" var jsonrep string = `{"keyword":"` + k + `"}`

Types

type AngliaPostResponse

type AngliaPostResponse struct {
	Status  int      `json:"status"`
	Keyword string   `json:"keyword"`
	Sups    []string `json:"sups"`
}

type BestIPResponse

type BestIPResponse struct {
	Bestip *BestProxyIP `json:"bestip"`
}

type BestProxyIP

type BestProxyIP struct {
	Status int     `json:"status"`
	ID     string  `json:"id"`
	IP     string  `json:"ip"`
	Dur    float64 `json:"dur"`
	Err    string  `json:"err,omitempty"`
}

PagesResponse

type PagesResponse

type PagesResponse struct {
	Status  int    `json:"status"`
	Keyword string `json:"keyword"`
	Pages   int    `json:"pages"`
}

PagesResponse json response from ndoe.js struct

type PartNumber

type PartNumber struct {
	Status           int       `json:"status"`
	Keyword          string    `json:"keyword"`
	Steps            []string  `json:"steps"`
	Prices           []float64 `json:"prices"`
	Description      string    `json:"description"`
	Part             string    `json:"part"`
	Promaf           string    `json:"pro_maf"`
	Pkgtype          string    `json:"pkgtype"`
	Rohs             string    `json:"rohs"`
	Tcode            string    `json:"tcode"`
	Stock            string    `json:"stock"`
	ReserveStock     string    `json:"reserveStock"`
	TotalStockDue    string    `json:"totalStockDue"`
	TotalResStockDue string    `json:"totalResStockDue"`
	SupplierLeadTime string    `json:"supplierLeadTime"`
	Spq              string    `json:"spq"`
	Moq              string    `json:"moq"`
	OrderMultiple    string    `json:"orderMultiple"`
}

PartNumber str

type Response

type Response struct {
	Status  int      `json:"status"`
	Keyword string   `json:"keyword"`
	Sups    []string `json:"sups"`
}

Response json response from ndoe.js struct

Jump to

Keyboard shortcuts

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