api

package
v0.0.0-...-c34cdf8 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2024 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Identity

type Identity struct {
	// ID is the unique identifier of the identity
	ID int `json:"id"`

	// UUID is the unique identifier of the identity, usually provided by the auth provider
	UUID string `json:"uuid"`

	// Provider is the type of the identity provider
	Provider ProviderType `json:"provider"`

	// FavoriteStops is a list of the user's favorite stops
	FavoriteStops []Stop `json:"favorite_stops"`

	// Metadata is a genric string that holds additional information about the identity
	Metadata string `json:"metadata"`
}

Identity is a struct that holds the information of a user, including their auth provider type and ID

type Line

type Line struct {
	// ID is the unique identifier of the line
	ID int `json:"id"`
	// Name is the name of the line provided by the bus company
	Name string `json:"name"`
}

type NearbyStops

type NearbyStops struct {
	Origin struct {
		Lat float64 `json:"lat"`
		Lon float64 `json:"lon"`
	} `json:"origin"`
	Radius  float64 `json:"radius"`
	Stops   []Stop  `json:"stops"`
	Image64 string  `json:"image"`
}

type ProviderType

type ProviderType string

ProviderType is an enum that represents the possible values for the identity provider

const (
	// ProviderTypeTelegram represents the Telegram identity provider
	ProviderTypeTelegram ProviderType = "telegram"
)

type Schedule

type Schedule struct {

	// Line is the line that the schedule is for
	Line Line `json:"line"`

	// Route is the route that the schedule is for
	Route string `json:"route"`

	// Time is the time of the schedule
	Time int `json:"time"`
}

type Stop

type Stop struct {
	// ID is the unique identifier of the stop
	ID int `json:"id"`

	// StopNumber is the number of the stop provided by the bus company
	StopNumber int `json:"stop_number"`

	// StopID is the number of the stop used internally by the bus company
	StopID int `json:"stop_id"`

	// Name is the name of the stop
	Name string `json:"name"`

	// Location is the geographical location of the stop
	Location struct {
		// Lat is the latitude of the stop
		Lat float64 `json:"lat"`
		// Lon is the longitude of the stop
		Lon float64 `json:"lon"`
	} `json:"location"`
}

Stop is a struct that holds the information of a bus stop

type StopSchedule

type StopSchedule struct {
	// Stop is the stop that the schedule is for
	Stop Stop `json:"stop"`

	// Schedules is a list of the schedules for the stop
	Schedules []Schedule `json:"schedules"`
}

Jump to

Keyboard shortcuts

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