Documentation ¶
Index ¶
Constants ¶
View Source
const ( DefaultPasswordCost = 12 DefaultExpirationDelta = 30 * 24 * time.Hour )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIKey ¶
type Location ¶
type Location struct { Model VehicleUUID uuid.UUID `gorm:"not null;" json:"vehicle_uuid"` Vehicle Vehicle `gorm:"foreignKey:VehicleUUID;constraint:OnUpdate:CASCADE,OnDelete:CASCADE;" json:"-"` Latitude float64 `gorm:"not null;" json:"latitude"` Longitude float64 `gorm:"not null;" json:"longitude"` Speed float64 `gorm:"not null;" json:"speed"` Status VehicleStatus `gorm:"not null;" json:"status"` }
type Model ¶
type Route ¶
type Route struct { Model VehicleUUID uuid.UUID `gorm:"not null;" json:"vehicle_uuid"` Vehicle Vehicle `gorm:"foreignKey:VehicleUUID;constraint:OnUpdate:CASCADE,OnDelete:CASCADE;" json:"-"` Started time.Time `gorm:"default:CURRENT_TIMESTAMP;not null;" json:"started"` Completed *time.Time `json:"completed,omitempty"` Status RouteStatus `gorm:"not null;" json:"status"` StartNode int `gorm:"not null;" json:"startNode"` EndNode int `gorm:"not null;" json:"endNode"` }
type RouteStatus ¶
type RouteStatus int
const ( RouteInProgress RouteStatus = iota RouteCancelled RouteCompleted )
type User ¶
type User struct { Model Username string `gorm:"unique;not null;" json:"username"` Password string `gorm:"-" json:"password"` PasswordHash []byte `gorm:"not null;" json:"-"` Type UserType `gorm:"not null;" json:"account_type"` }
func (*User) Authenticate ¶
func (*User) FromClaims ¶
Click to show internal directories.
Click to hide internal directories.