nhs

package
v0.0.0-...-f72edf6 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2017 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NHSBaseAPI = "https://v1.syndication.nhschoices.nhs.uk"
)

Variables

This section is empty.

Functions

func NearbySearch

func NearbySearch(lat, lng float32, locationType string) ([]models.Location, error)

func OrganisationsByPostcode

func OrganisationsByPostcode(organisationType, postcode string) ([]models.Location, error)

func OrganisationsFinder

func OrganisationsFinder(organisationType, organisationId string) models.Location

func ServicesByPostcode

func ServicesByPostcode(serviceType, postcode string) ([]models.Location, error)

func ServicesFinder

func ServicesFinder(serviceType, serviceId string) models.Location

Types

type Entry

type Entry struct {
	Id      string `xml:"id"`
	Content struct {
		Service struct {
			Name string `xml:"deliverer"`
			Type struct {
				Code string `xml:"code,attr"`
			} `xml:"type"`
			GeographicCoordinates struct {
				Lat string `xml:"latitude"`
				Lng string `xml:"longitude"`
			} `xml:"geographicCoordinates"`
		} `xml:"service"`
	} `xml:"content"`
}

type OrganisationXML

type OrganisationXML struct {
	Id   string `xml:"OrganisationId"`
	Name string `xml:"Name"`
	Lat  string `xml:"Latitude"`
	Lng  string `xml:"Longitude"`
}

type Result

type Result struct {
	Entry Entry `xml:"entry"`
}

type ResultEntryXML

type ResultEntryXML struct {
	Id      string `xml:"id"`
	Content struct {
		OrganisationSummary struct {
			Name                  string `xml:"name"`
			GeographicCoordinates struct {
				Lat string `xml:"latitude"`
				Lng string `xml:"longitude"`
			} `xml:"geographicCoordinates"`
		} `xml:"organisationSummary"`
	} `xml:"content"`
}

type ResultFromPostcodeXML

type ResultFromPostcodeXML struct {
	Entries []ResultEntryXML `xml:"entry"`
}

type ResultPostcodeXML

type ResultPostcodeXML struct {
	Entries []Entry `xml:"entry"`
}

Jump to

Keyboard shortcuts

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