models

package
v0.0.0-...-bea4ea4 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2016 License: AGPL-3.0-or-later Imports: 6 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeUri

func MakeUri(txt string) string

helper

Types

type App

type App struct {
	Name      string
	Token     string
	UserId    int64
	Id        int64
	CreatedAt time.Time
	UpdatedAt time.Time
}

type City

type City struct {
	Id         string   `json:"id"`
	Name       string   `json:"name"`
	IbgeCode   int      `json:"ibge_code"`
	Gentile    string   `json:"gentile"`
	Population float64  `json:"population"`
	Area       float64  `json:"area"`
	Density    float64  `json:"density"`
	Pib        float64  `json:"pib"`
	StateId    string   `json:"state_id"`
	Sources    []Source `json:"sources"`
	Links      []Link   `json:"links"`
}

type Color

type Color struct {
	Hex string `json:"hex"`
	RGB []int  `json:"rgb"`
}

type Company

type Company popolo.Organization

type ContactDetail

type ContactDetail struct {
	Label      string       `json:"label,omitempty"`       // A human-readable label for the contact detail
	Type       string       `json:"type"`                  //  [required] A type of medium, e.g. 'fax' or 'email'
	Value      string       `json:"value"`                 // [required] A value, e.g. a phone number or email address
	Note       string       `json:"note,omitempty"`        // A note, e.g. for grouping contact details by physical location
	ValidFrom  *popolo.Date `json:"valid_from,omitempty"`  // The date from which the contact detail is valid",
	ValidUntil *popolo.Date `json:"valid_until,omitempty"` // The date from which the contact detail is no longer valid",
	CreatedAt  *time.Time   `json:"created_at,omitempty"`  // The time at which the resource was created
	UpdatedAt  *time.Time   `json:"updated_at,omitempty"`  // The time at which the resource was last modified
	Sources    []Source     `json:"sources, omitempty"`    // URLs to documents from which the person is derived
}

type Identifier

type Identifier struct {
	Identifier string `json:"identifier"` // An issued identifier, e.g. a DUNS number
	Scheme     string `json:"scheme"`     // An identifier scheme, e.g. DUNS
}

type Line

type Line struct {
	Id            string    `json:"id"`
	Name          string    `json:"name"`
	CreatedAt     time.Time `json:"created_at"`
	UpdatedAt     time.Time `json:"updated_at"`
	Links         []Link    `json:"links"`
	Status        Status    `json:"status"`
	Sources       []Source  `json:"sources"`
	Color         Color     `json:"color"`
	LineNumber    int       `json:"number"`
	MetroId       string    `json:"metro_id"`
	CannonicalUri string    `json:"-" bson:"cannonicaluri"`
}
type Link struct {
	Url  string `json:"url"` // A URL
	Note string `json:"rel"` // A note, e.g. 'Wikipedia page'
}

type Membership

type Membership struct {
	Id           bson.ObjectId `json:"id" bson:"_id,omitempty"`
	Member       Rel           `json:"member"`
	Organization Rel           `json:"organization"`
	Label        string        `json:"label"`
	Role         string        `json:"role"`
	Source       Source        `json:"source"`
}

type OtherNames

type OtherNames struct {
	Name            string       `json:"name"`                       // [required] An alternate or former name
	FamilyName      string       `json:"family_name,omitempty"`      // One or more family names
	GivenName       string       `json:"given_name,omitempty"`       //One or more primary given names
	AdditionalName  string       `json:"additional_name,omitempty"`  // One or more secondary given names
	HonorificPrefix string       `json:"honorific_prefix,omitempty"` // One or more honorifics preceding a person's name
	HonorificSuffix string       `json:"honorific_suffix,omitempty"` // One or more honorifics following a person's name
	PatronymicName  string       `json:"patronymic_name,omitempty"`  // One or more patronymic names
	StartDate       *popolo.Date `json:"start_date,omitempty"`       // The date on which the name was adopted
	EndDate         *popolo.Date `json:"end_date,omitempty"`         // The date on which the name was abandoned
	Note            string       `json:"note,omitempty"`             // A note, e.g. 'Birth name'
}

type Parliamentarian

type Parliamentarian struct {
	Id               string                 `json:"id"`                // The person's unique identifier
	Name             string                 `json:"name"`              // A person's preferred full name
	OtherNames       []OtherNames           `json:"other_names"`       // Alternate or former names
	Identifiers      []Identifier           `json:"identifiers"`       // Issued identifiers
	FamilyName       string                 `json:"family_name"`       // One or more family names
	GivenName        string                 `json:"given_name"`        // One or more primary given names
	AdditionalName   string                 `json:"additional_name"`   // One or more secondary given names
	HonorificPrefix  string                 `json:"honorific_prefix"`  // One or more honorifics preceding a person's name
	HonorificSuffix  string                 `json:"honorific_suffix"`  // One or more honorifics following a person's name
	PatronymicName   string                 `json:"patronymic_name"`   // One or more patronymic names
	SortName         string                 `json:"sort_name"`         // A name to use in a lexicographically ordered list
	Email            string                 `json:"email"`             // A preferred email address
	Gender           string                 `json:"gender"`            // A gender
	BirthDate        popolo.Date            `json:"birth_date"`        // A date of birth
	DeathDate        popolo.DateTime        `json:"death_date"`        // A date of death
	Image            string                 `json:"image"`             // A URL of a head shot
	Summary          string                 `json:"summary"`           // A one-line account of a person's life
	Biography        string                 `json:"biography"`         // An extended account of a person's life
	NationalIdentify string                 `json:"national_identity"` // A national identity
	ContactDetails   []popolo.ContactDetail `json:"contact_details"`   // Means of contacting the person
	Links            []Link                 `json:"links"`             // URLs to documents about the person
	Memberships      []Membership           `json:"memberships"`       // Memberships
	CreatedAt        time.Time              `json:"created_at"`        // The time at which the resource was created
	UpdatedAt        time.Time              `json:"updated_at"`        // The time at which the resource was last modified
	Sources          []Source               `json:"sources"`           // URLs to documents from which the person is derived
}

type Party

type Party struct {
	Id               string               `json:"id"`                         // The organization's unique identifier
	Name             string               `json:"name"`                       // A primary name, e.g. a legally recognized name
	OtherNames       []OtherNames         `json:"other_names,omitempty"`      // Alternate or former names
	Identifiers      []*Identifier        `json:"identifiers,omitempty"`      // Issued identifiers
	Classification   string               `json:"classification,omitempty"`   // An organization category, e.g. committee
	ParentId         string               `json:"parent_id,omitempty"`        //The ID of the organization that contains this organization
	Parent           *popolo.Organization `json:"parent,omitempty"`           // The organization that contains this organization
	AreaId           string               `json:"area_id,omitempty"`          // The ID of the geographic area to which this organization is related
	Area             *popolo.Area         `json:"area,omitempty"`             // The geographic area to which this organization is related
	FoundingDate     string               `json:"founding_date,omitempty"`    // A date of founding
	DissoulutionDate string               `json:"dissolution_date,omitempty"` // A date of dissolution
	Image            string               `json:"image,omitempty"`            // A URL of a head shot
	ContactDetails   []ContactDetail      `json:"contact_details,omitempty"`  // Means of contacting the person
	Links            []Link               `json:"link,omitempty"`             // URLs to documents about the person
	Memberships      []popolo.Membership  `json:"memberships,omitempty"`      // Memberships
	Posts            []popolo.Post        `json:"posts,omitempty"`            // Posts within the organization
	CreatedAt        time.Time            `json:"created_at,omitempty"`       // The time at which the resource was created
	UpdatedAt        time.Time            `json:"updated_at,omitempty"`       // The time at which the resource was last modified
	Sources          []Source             `json:"sources,omitempty"`          // URLs to documents from which the person is derived
}

type Quota

type Quota struct {
	Company         string
	Date            time.Time
	Parliamentarian string
	Order           string
	Value           float64

	PassengerName string
	Route         string
	Ticket        string
}

type Rel

type Rel struct {
	Id   string `json:"id"`
	Link string `json:"link"`
}

type Reservoir

type Reservoir struct {
	Name string `json:"name"`
	Uri  string `json:"-"`
	Data []struct {
		Date    string `json:"date"`
		Percent string `json:"percent"`
	} `json:"data"`
	Source []Source `json:"source"`
}

type Source

type Source struct {
	Url  string `json:"url"`  // A URL
	Note string `json:"note"` // A note, e.g. 'Wikipedia page'
}

type State

type State struct {
	Id                     string   `json:"id"`
	Name                   string   `json:"name"`
	CapitalId              string   `json:"capital_id"`
	Capital                City     `json:"capital"`
	Population             float64  `json:"population"`
	Area                   float64  `json:"area"`
	PopulationDensity      float64  `json:"population_density"`
	NumberOfMunicipalities int      `json:"number_of_municipalities"`
	Sources                []Source `json:"sources"`
	Links                  []Link   `json:"links"`
}

type Station

type Station struct {
}

type Status

type Status struct {
	Id        bson.ObjectId `json:"id" bson:"_id"`
	Status    string        `json:"message"`
	LineId    string        `json:"line_id"  bson:"line_id"`
	Links     []Link        `json:"links"`
	CreatedAt time.Time     `json:"created_at"`
	UpdatedAt time.Time     `json:"updated_at"`
	Sources   []Source      `json:"sources"`
}

type User

type User struct {
	Id        int64
	Name      string
	Email     string
	CreatedAt time.Time
	UpdatedAt time.Time
}

Jump to

Keyboard shortcuts

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