need_api

package
v0.0.0-...-87cc4db Latest Latest
Warning

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

Go to latest
Published: May 25, 2017 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Need

type Need struct {
	ID                 int            `json:"id"`
	Role               string         `json:"role"`
	Goal               string         `json:"goal"`
	Benefit            string         `json:"benefit"`
	OrganisationIDs    []string       `json:"organisation_ids"`
	Organisations      []Organisation `json:"organisations"`
	Justifications     []string       `json:"justifications"`
	Impact             string         `json:"impact"`
	MetWhen            []string       `json:"met_when"`
	YearlyUserContacts int            `json:"yearly_user_contacts"`
	YearlySiteViews    int            `json:"yearly_site_views"`
	YearlyNeedViews    int            `json:"yearly_need_views"`
	YearlySearches     int            `json:"yearly_searches"`
	OtherEvidence      string         `json:"other_evidence"`
	Legislation        string         `json:"legislation"`
	AllOrganisations   bool           `json:"applies_to_all_organisations"`
	DuplicateOf        int            `json:"duplicate_of"`
	Status             *NeedStatus    `json:"status"`
}

func FetchNeed

func FetchNeed(needAPI, bearerToken, id string) (*Need, error)

func ParseNeedResponse

func ParseNeedResponse(response []byte) (*Need, error)

type NeedStatus

type NeedStatus struct {
	Description string `json:"description"`
}

type Organisation

type Organisation struct {
	ID           string   `json:"id"`
	Name         string   `json:"name"`
	Status       string   `json:"govuk_status"`
	Abbreviation string   `json:"abbreviation"`
	ParentIDs    []string `json:"parent_ids"`
	ChildIDs     []string `json:"child_ids"`
}

Jump to

Keyboard shortcuts

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