opendata

package
v0.0.0-...-b9ed496 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2023 License: Apache-2.0, MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ServiceRequestsDataset string = "311-service-requests-customer-initiated"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type APIResponse

type APIResponse struct {
	Help    string `json:"help"`
	Success bool   `json:"success"`
	Result  Result `json:"result"`
}

func Get

func Get(id string) (*APIResponse, error)

type BoolString

type BoolString bool

func (*BoolString) UnmarshalJSON

func (bs *BoolString) UnmarshalJSON(data []byte) error

type CustomTime

type CustomTime time.Time

CustomTime is a custom time.Time type for our special unmarshal case

func (*CustomTime) UnmarshalJSON

func (ct *CustomTime) UnmarshalJSON(b []byte) (err error)

type Dataset

type Dataset string

type Group

type Group struct {
}

type Organization

type Organization struct {
	ID             string     `json:"id"`
	Name           string     `json:"name"`
	Title          string     `json:"title"`
	Type           string     `json:"type"`
	Description    string     `json:"description"`
	ImageURL       string     `json:"image_url"`
	Created        CustomTime `json:"created"`
	IsOrganization bool       `json:"is_organization"`
	ApprovalStatus string     `json:"approval_status"`
	State          string     `json:"state"`
}

type Relationship

type Relationship struct {
}

type Resource

type Resource struct {
	CacheLastUpdated     interface{} `json:"cache_last_updated"`
	CacheURL             interface{} `json:"cache_url"`
	Created              CustomTime  `json:"created"`
	DatastoreActive      bool        `json:"datastore_active"`
	Format               string      `json:"format"`
	Hash                 string      `json:"hash"`
	ID                   string      `json:"id"`
	IsDatastoreCacheFile bool        `json:"is_datastore_cache_file"`
	IsPreview            BoolString  `json:"is_preview"`
	LastModified         CustomTime  `json:"last_modified"`
	MetadataModified     CustomTime  `json:"metadata_modified"`
	MimeType             string      `json:"mimetype"`
	MimeTypeInner        interface{} `json:"mimetype_inner"`
	Name                 string      `json:"name"`
	PackageID            string      `json:"package_id"`
	Position             int         `json:"position"`
	ResourceType         interface{} `json:"resource_type"`
	RevisionID           string      `json:"revision_id"`
	Size                 int         `json:"size"`
	State                string      `json:"state"`
	URL                  string      `json:"url"`
	URLType              string      `json:"url_type"`
}

type Result

type Result struct {
	Author                 string         `json:"author"`
	AuthorEmail            string         `json:"author_email"`
	CollectionMethod       string         `json:"collection_method"`
	CreatorUserID          string         `json:"creator_user_id"`
	DatasetCategory        string         `json:"dataset_category"`
	DatePublished          CustomTime     `json:"date_published"`
	Excerpt                string         `json:"excerpt"`
	Formats                string         `json:"formats"`
	ID                     string         `json:"id"`
	InformationURL         string         `json:"information_url"`
	IsRetired              string         `json:"is_retired"`
	IsOpen                 bool           `json:"isopen"`
	LastRefreshed          CustomTime     `json:"last_refreshed"`
	LicenseID              string         `json:"license_id"`
	LicenseTitle           string         `json:"license_title"`
	Limitations            string         `json:"limitations"`
	Maintainer             string         `json:"maintainer"`
	MaintainerEmail        string         `json:"maintainer_email"`
	MetadataCreated        CustomTime     `json:"metadata_created"`
	MetadataModified       CustomTime     `json:"metadata_modified"`
	Name                   string         `json:"name"`
	Notes                  string         `json:"notes"`
	NumResources           int            `json:"num_resources"`
	NumTags                int            `json:"num_tags"`
	Organization           Organization   `json:"organization"`
	OwnerDivision          string         `json:"owner_division"`
	OwnerEmail             string         `json:"owner_email"`
	OwnerOrg               string         `json:"owner_org"`
	Private                bool           `json:"private"`
	RefreshRate            string         `json:"refresh_rate"`
	State                  string         `json:"state"`
	Title                  string         `json:"title"`
	Topics                 string         `json:"topics"`
	Type                   string         `json:"type"`
	Version                string         `json:"version"`
	Resources              []Resource     `json:"resources"`
	Tags                   []Tag          `json:"tags"`
	Groups                 []Group        `json:"groups"`
	RelationshipsAsSubject []Relationship `json:"relationships_as_subject"`
	RelationshipsAsObject  []Relationship `json:"relationships_as_object"`
}

type Tag

type Tag struct {
	DisplayName  string      `json:"display_name"`
	ID           string      `json:"id"`
	Name         string      `json:"name"`
	State        string      `json:"state"`
	VocabularyID interface{} `json:"vocabulary_id"`
}

Jump to

Keyboard shortcuts

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