wings

package
v0.0.0-...-43a8b31 Latest Latest
Warning

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

Go to latest
Published: May 10, 2023 License: AGPL-3.0 Imports: 0 Imported by: 4

Documentation

Index

Constants

View Source
const (
	None  = iota
	View  = iota
	Edit  = iota
	Owner = iota
)
View Source
const (
	UNKNOWN          = iota
	SanFranciscoCAUS = iota
	SanJoseCAUS      = iota
	NewYorkNYUS      = iota
	AnchorageAKUS    = iota
	ParisFR          = iota
	KualaLumpurMY    = iota
	GeorgeTownPGMY   = iota
	SeattleWAUS      = iota
	WashingtonDCUS   = iota
	BostonMAUS       = iota
	PhoneixAZUS      = iota
	PageAZUS         = iota
	LosAngelesCAUS   = iota
	LasVegasNVUS     = iota
	SantaCruzCAUS    = iota
	HonoluluHIUS     = iota
	MauiHIUS         = iota
)
View Source
const (
	InvalidType        = iota
	EmailAlreadyExists = iota
	EmailInvalid       = iota
	UsernameInvalid    = iota
	UsernameTaken      = iota
	UsernameTooShort   = iota
	Success            = iota
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AccessLevel

type AccessLevel int

type City

type City int

type Day

type Day struct {
	ID         int          `json:"id"`
	TripID     int          `json:"trip_id"`
	DayOf      int          `json:"day_of"`
	Places     []Place      `json:"places"`
	TravelTime []TravelTime `json:"travel_time"`
}

Day - A day of a trip.

func (Day) GetID

func (day Day) GetID() int

GetID (istruct) - Returns the day ID.

func (*Day) SetID

func (day *Day) SetID(id int)

SetID (istruct) - Sets the day ID.

type Days

type Days []Day

Days - An array of Day

type NewUser

type NewUser struct {
	ID       int    `json:"id"`
	Username string `json:"username"`
	Name     string `json:"name"`
	Email    string `json:"email"`
	Bio      string `json:"bio"`
	Password string `json:"password"`
}

NewUser - Basic information for user registeration.

func (NewUser) GetID

func (newUser NewUser) GetID() int

GetID (istruct) - Returns the trip ID.

func (*NewUser) SetID

func (newUser *NewUser) SetID(id int)

SetID (istruct) - Sets the trip ID.

type NewUsers

type NewUsers []NewUser

NewUsers - An array of NewUser

type ParsedCity

type ParsedCity struct {
	ID      int    `json:"id"`
	Display string `json:"display"`
	Iso2    string `json:"iso2"`
}

ParsedCity - City object queried from DB

type ParsedCitys

type ParsedCitys []ParsedCity

ParsedCitys - An array of ParsedCity

type Place

type Place struct {
	ID          int    `json:"id"`
	Label       string `json:"label"`
	URL         string `json:"url"`
	Description string `json:"description"`
}

Place - One of many location for a Day (in a Trip).

func (Place) GetID

func (place Place) GetID() int

GetID (istruct) - Returns the place ID.

func (*Place) SetID

func (place *Place) SetID(id int)

SetID (istruct) - Sets the place ID.

type Places

type Places []Place

Places - An array of Place

type RegistrationError

type RegistrationError int

type TravelTime

type TravelTime struct {
	ID            int `json:"id"`
	FromPlaceID   int `json:"from_place_id"`
	ToPlaceID     int `json:"to_place_id"`
	ToPlaceIndex  int `json:"to_place_index"`
	TimeInMinutes int `json:"time_in_minutes"`
}

TravelTime - Time take to travel from one place to another.

type TravelTimes

type TravelTimes []TravelTime

TravelTimes - An array of TravelTime

type TripBasic

type TripBasic struct {
	ID          int               `json:"id"`
	Name        string            `json:"name"`
	Cities      []ParsedCity      `json:"cities"`
	Days        []Day             `json:"days"`
	Description string            `json:"description"`
	Private     bool              `json:"private"`
	SharedWith  []UserAccessLevel `json:"shared_with"`
}

TripBasic - Only core information of a trip.

func (TripBasic) GetID

func (trip TripBasic) GetID() int

GetID (istruct) - Returns the trip ID.

func (*TripBasic) SetID

func (trip *TripBasic) SetID(id int)

SetID (istruct) - Sets the trip ID.

type TripBasics

type TripBasics []TripBasic

TripBasics - An array of TripBasic

type UserAccessLevel

type UserAccessLevel struct {
	ID     int         `json:"id"`
	ObjID  int         `json:"obj_id"`
	UserID int         `json:"user_id"`
	Access AccessLevel `json:"access"`
}

UserAccessLevel - UserAccessLevel - User access level of a specific object.

type UserAccessLevels

type UserAccessLevels []UserAccessLevel

UserAccessLevels - An array of UserAccessLevel

type UserBasic

type UserBasic struct {
	ID        int    `json:"id"`
	Username  string `json:"username"`
	Name      string `json:"name"`
	Bio       string `json:"bio"`
	Link      string `json:"link"`
	Confirmed bool   `json:"confirmed"`
}

UserBasic - Basic info of a user.

func (UserBasic) GetID

func (user UserBasic) GetID() int

GetID (istruct) - Returns the trip ID.

func (*UserBasic) SetID

func (user *UserBasic) SetID(id int)

SetID (istruct) - Sets the trip ID.

type UserBasics

type UserBasics []UserBasic

UserBasics - An array of UserBasic

Jump to

Keyboard shortcuts

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