db

package
v0.0.0-...-f4ba850 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2024 License: MIT Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Max

func Max(x interface{}, f func(int) time.Time) time.Time

func Min

func Min(x interface{}, f func(int) time.Time) time.Time

Types

type Address

type Address struct {
	Address string
	City    string
	State   string
	Zip     string
}

type Attachment

type Attachment struct {
	ID           int
	LastModified time.Time
	Name         string
	Link         string
	// MatterVersion        string
	// IsSupportingDocument bool
	// ShowOnInternetPage   bool
	// IsMinuteOrder        bool
	// IsBoardLetter        bool
	// AgiloftID            int
	// Description          string
	// PrintWithReports     bool
	Sort int
}

func NewAttachment

func NewAttachment(h legistar.MatterAttachment) Attachment

type Event

type Event struct {
	ID   int
	GUID string

	BodyID   int
	BodyName string
	Date     time.Time

	Location          string
	VideoStatus       string
	AgendaStatusID    int
	AgendaStatusName  string
	MinutesStatusID   int
	MinutesStatusName string
	AgendaFile        string
	MinutesFile       string `json:",omitempty"`
	Comment           string `json:",omitempty"`
	VideoPath         string `json:",omitempty"`
	Media             string `json:",omitempty"`
	InSiteURL         string
	Items             []EventItem `json:",omitempty"`

	AgendaLastPublished  time.Time
	MinutesLastPublished time.Time
	LastModified         time.Time
}

func NewEvent

func NewEvent(m legistar.Event, tz *time.Location) Event

type EventItem

type EventItem struct {
	ID   int
	GUID string

	Title string

	// EventID           int
	AgendaSequence    int
	MinutesSequence   int
	AgendaNumber      string `json:",omitempty"`
	Video             int    `json:",omitempty"`
	VideoIndex        int    `json:",omitempty"`
	Version           string
	AgendaNote        string                       `json:",omitempty"`
	MinutesNote       string                       `json:",omitempty"`
	ActionID          int                          `json:",omitempty"`
	ActionName        string                       `json:",omitempty"`
	ActionText        string                       `json:",omitempty"`
	PassedFlag        int                          `json:",omitempty"`
	PassedFlagName    string                       `json:",omitempty"`
	RollCallFlag      int                          `json:",omitempty"`
	RollCall          RollCalls                    `json:",omitempty"`
	FlagExtra         int                          `json:",omitempty"`
	Tally             string                       `json:",omitempty"`
	AccelaRecordID    string                       `json:",omitempty"`
	Consent           int                          `json:",omitempty"`
	MoverID           int                          `json:",omitempty"`
	Mover             string                       `json:",omitempty"`
	SeconderID        int                          `json:",omitempty"`
	Seconder          string                       `json:",omitempty"`
	MatterID          int                          `json:",omitempty"`
	MatterFile        string                       `json:",omitempty"`
	MatterName        string                       `json:",omitempty"`
	MatterType        string                       `json:",omitempty"`
	MatterStatus      string                       `json:",omitempty"`
	MatterAttachments []EventItemMatterAttachments `json:",omitempty"`

	LastModified time.Time
}

func NewEventItem

func NewEventItem(e legistar.EventItem) EventItem

type EventItemMatterAttachments

type EventItemMatterAttachments struct {
	ID                   int
	GUID                 string
	Name                 string
	Hyperlink            string
	FileName             string
	MatterVersion        string
	IsHyperlink          bool
	Binary               string
	IsSupportingDocument bool
	ShowOnInternetPage   bool
	IsMinuteOrder        bool
	IsBoardLetter        bool
	AgiloftID            int
	Description          string
	PrintWithReports     bool
	Sort                 int
	LastModified         time.Time
}

type EventItems

type EventItems []EventItem

func NewEventItems

func NewEventItems(e legistar.EventItems) EventItems

type History

type History struct {
	ID int

	Date        time.Time
	ActionID    int
	Action      string
	Description string
	BodyID      int
	BodyName    string

	EventID         int    `json:",omitempty"`
	AgendaSequence  int    `json:",omitempty"`
	MinutesSequence int    `json:",omitempty"`
	AgendaNumber    string `json:",omitempty"`
	Video           int    `json:",omitempty"`
	VideoIndex      int    `json:",omitempty"`
	Version         string
	AgendaNote      string `json:",omitempty"`
	MinutesNote     string `json:",omitempty"`

	PassedFlag     int    `json:",omitempty"` // Note: 0 may indicate a vote that failed
	PassedFlagName string `json:",omitempty"` // Pass, Fail
	RollCallFlag   int    `json:",omitempty"`
	FlagExtra      int    `json:",omitempty"`
	Tally          string `json:",omitempty"`
	AccelaRecordID string `json:",omitempty"`
	Consent        int    `json:",omitempty"`
	MoverID        int    `json:",omitempty"`
	MoverName      string `json:",omitempty"`
	SeconderID     int    `json:",omitempty"`
	SeconderName   string `json:",omitempty"`
	MatterStatusID int

	Votes []Vote `json:",omitempty"`

	LastModified time.Time
}

func NewHistory

func NewHistory(h legistar.MatterHistory) History

type Legislation

type Legislation struct {
	ID       int
	GUID     string
	File     string
	LocalLaw string `json:",omitempty"` // format: $year/$number
	Name     string
	Title    string

	TypeID        int
	TypeName      string
	StatusID      int
	StatusName    string
	BodyID        int
	BodyName      string
	IntroDate     time.Time
	AgendaDate    time.Time
	PassedDate    time.Time
	EnactmentDate time.Time
	Version       string `json:",omitempty"`

	Sponsors    []PersonReference `json:",omitempty"`
	History     []History         `json:",omitempty"`
	Attachments []Attachment      `json:",omitempty"`

	Summary string // MatterEXText5

	TextID int    `json:",omitempty"`
	Text   string `json:",omitempty"` // current version
	RTF    string `json:",omitempty"` // current version

	LastModified time.Time
}

func NewLegislation

func NewLegislation(m legistar.Matter) Legislation

func (Legislation) Shallow

func (l Legislation) Shallow() Legislation

Shallow returns a copy of l with details about the text and sponsors ommitted

type OfficeRecord

type OfficeRecord struct {
	ID   int
	GUID string

	// Body
	BodyID            int
	BodyName          string
	MemberType, Title string
	MemberTypeID      int

	// Person
	FullName     string
	PersonID     int
	Start, End   time.Time
	LastModified time.Time
}

func NewOfficeRecord

func NewOfficeRecord(o legistar.OfficeRecord) OfficeRecord

type Person

type Person struct {
	ID                  int
	GUID                string
	Slug                string
	IsActive            bool
	Email               string
	FullName            string
	FirstName, LastName string
	WWW                 string
	LastModified        time.Time
	OfficeRecords       []OfficeRecord
	Start, End          time.Time
	DistrictOffice      Address `json:",omitempty"`
	LegislativeOffice   Address `json:",omitempty"`
}

func (Person) Reference

func (p Person) Reference() PersonReference

type PersonReference

type PersonReference struct {
	ID       int
	Slug     string
	FullName string
}

func NewPersonReference

func NewPersonReference(o legistar.MatterSponsor) PersonReference

type ResubmitLegislation

type ResubmitLegislation struct {
	FromFile string
	ToFile   string
}

type RollCall

type RollCall struct {
	PersonReference
	ValueID int    `json:",omitempty"`
	Value   string `json:",omitempty"` // Present
	Sort    int    `json:",omitempty"`
	Result  int    `json:",omitempty"`
}

func NewRollCall

func NewRollCall(v legistar.RollCall) RollCall

type RollCalls

type RollCalls []RollCall

func NewRollCalls

func NewRollCalls(v legistar.RollCalls) RollCalls

type Vote

type Vote struct {
	PersonReference
	VoteID int
	Vote   string // Afffirmative, Negative, Absent
	Result int    `json:",omitempty"` // 1 = Afirmative, 2 = Negative
	Sort   int
}

func NewVote

func NewVote(v legistar.Vote) Vote

type Votes

type Votes []Vote

func NewVotes

func NewVotes(v legistar.Votes) Votes

Jump to

Keyboard shortcuts

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