dwp

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2022 License: Unlicense Imports: 7 Imported by: 0

Documentation

Overview

Package dwp provides an easy-to-use client for the DWP assessment API

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	RetrievePeople(ctx context.Context) (People, error)
	RetrievePeopleByCity(ctx context.Context, city string) (People, error)
}

func NewClient

func NewClient(baseURL string, httpClient http.Client) Client

NewClient returns an instance Client configured to user the provided http.Client and base URL

type Coordinate

type Coordinate float64

func (*Coordinate) UnmarshalJSON

func (c *Coordinate) UnmarshalJSON(b []byte) error

type People

type People []Person

type Person

type Person struct {
	ID        int
	FirstName string `json:"first_name"`
	LastName  string `json:"last_name"`
	Email     string
	IPAddress string `json:"ip_address"`
	Latitude  Coordinate
	Longitude Coordinate
}

Jump to

Keyboard shortcuts

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