api

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BasicsProvider

type BasicsProvider interface {
	ApiGet(uri string) ([]byte, error)
	GetListForUrl(endpoint string) (*ListResponse, error)
	QueryListForUrl(endpoint string, query map[string]string) (*ListResponse, error)
}

func NewBasicsProvider

func NewBasicsProvider(client HttpClient, baseUrl string) BasicsProvider

type Choice

type Choice struct {
	Choose int           `json:"choose"`
	Type   string        `json:"type"`
	From   []interface{} `json:"from"`
}

type Cost

type Cost struct {
	Quantity int
	Unit     string
}

type Description

type Description struct {
	Index       *string  `json:"index"`
	Name        string   `json:"name"`
	Url         *string  `json:"url"`
	Description []string `json:"desc"`
}

type HttpClient added in v1.0.3

type HttpClient interface {
	Get(url string) (*http.Response, error)
	Do(req *http.Request) (*http.Response, error)
}

type ListResponse

type ListResponse struct {
	Count   int `json:"count"`
	Results []Ref
}

type Range

type Range struct {
	Normal int
	Long   int
}

type Ref

type Ref struct {
	Index string `json:"index"`
	Name  string `json:"name"`
	Url   string `json:"url"`
}

Jump to

Keyboard shortcuts

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