models

package
v0.0.0-...-c6b8aee Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2025 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetExampleEventDBDocument

func GetExampleEventDBDocument(id uuid.UUID, user uuid.UUID) db.DBDocument

func GetExampleEventDBDocumentArray

func GetExampleEventDBDocumentArray(count int) []db.DBDocument

Types

type Event

type Event struct {
	Id            uuid.UUID  `json:"id"`                      // id
	Type          string     `json:"type"`                    // t
	Status        string     `json:"status,omitempty"`        // s
	CreatedAt     *time.Time `json:"createdAt"`               // ca
	UpdatedAt     *time.Time `json:"updatedAt"`               // ua
	User          uuid.UUID  `json:"user,omitempty"`          // uid
	Agency        string     `json:"agency,omitempty"`        // a
	Route         string     `json:"route,omitempty"`         // r
	Trip          string     `json:"trip,omitempty"`          // tr
	UnitID        string     `json:"unitID,omitempty"`        // u
	UnitCount     *int       `json:"unitCount,omitempty"`     // uc
	UnitPosition  *int       `json:"unitPosition,omitempty"`  // up
	DepartureStop string     `json:"departureStop,omitempty"` // ds
	ArrivalStop   string     `json:"arrivalStop,omitempty"`   // as
	DepartureTime *time.Time `json:"departureTime,omitempty"` // dt
	ArrivalTime   *time.Time `json:"arrivalTime,omitempty"`   // at
	Notes         []string   `json:"notes,omitempty"`         // n
}

func GetExampleEvent

func GetExampleEvent(id uuid.UUID, user uuid.UUID) Event

func GetExampleEventArray

func GetExampleEventArray(count int) []Event

func (Event) MarshalDynamoDB

func (e Event) MarshalDynamoDB() (db.DBDocument, error)

func (*Event) UnmarshalDynamoDB

func (e *Event) UnmarshalDynamoDB(data db.DBDocument) error

type Model

type Model interface {
	Event | Unit
}

type Unit

type Unit struct {
	Id        uuid.UUID  `json:"id"`
	Type      string     `json:"type"`
	Status    string     `json:"status,omitempty"`
	CreatedAt *time.Time `json:"createdAt"`
	UpdatedAt *time.Time `json:"updatedAt"`
	Agency    string     `json:"agency,omitempty"`
	UnitID    string     `json:"unitID,omitempty"`
	Notes     []string   `json:"notes,omitempty"`
}

func GetExampleUnit

func GetExampleUnit(id uuid.UUID) Unit

func GetExampleUnitArray

func GetExampleUnitArray(count int) []Unit

func (Unit) MarshalDynamoDB

func (u Unit) MarshalDynamoDB() (db.DBDocument, error)

func (*Unit) UnmarshalDynamoDB

func (u *Unit) UnmarshalDynamoDB(data db.DBDocument) error

Jump to

Keyboard shortcuts

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