models

package
v0.0.0-...-87278f6 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2017 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BaseURL string

DB is a connection to your database to be used throughout your application.

Functions

func GetEvent

func GetEvent(id int) (content.Event, error)

func GetEventBySlug

func GetEventBySlug(slug string) (content.Event, error)

func GetEventList

func GetEventList() ([]content.Event, error)

func GetHotel

func GetHotel(id int) (content.Hotel, error)

func GetHotelBySlug

func GetHotelBySlug(slug string) (content.Hotel, error)

func GetHotelList

func GetHotelList() ([]content.Hotel, error)

func GetPage

func GetPage(id int) (content.Page, error)

func GetPageBySlug

func GetPageBySlug(slug string) (content.Page, error)

func GetPageList

func GetPageList() ([]content.Page, error)

func GetPresentation

func GetPresentation(id int) (content.Presentation, error)

func GetPresentationBySlug

func GetPresentationBySlug(slug string) (content.Presentation, error)

func GetPresentationList

func GetPresentationList() ([]content.Presentation, error)

func GetSlot

func GetSlot(id int) (content.Slot, error)

func GetSlotBySlug

func GetSlotBySlug(slug string) (content.Slot, error)

func GetSlotList

func GetSlotList() ([]content.Slot, error)

func GetSpeaker

func GetSpeaker(id int) (content.Speaker, error)

func GetSpeakerBySlug

func GetSpeakerBySlug(slug string) (content.Speaker, error)

func GetSpeakerList

func GetSpeakerList() ([]content.Speaker, error)

func GetSponsor

func GetSponsor(id int) (content.Sponsor, error)

func GetSponsorBySlug

func GetSponsorBySlug(slug string) (content.Sponsor, error)

func GetSponsorList

func GetSponsorList() ([]content.Sponsor, error)

func GetWorkshop

func GetWorkshop(id int) (content.Workshop, error)

func GetWorkshopBySlug

func GetWorkshopBySlug(slug string) (content.Workshop, error)

func GetWorkshopList

func GetWorkshopList() ([]content.Workshop, error)

Types

type Contact

type Contact struct {
	ID        int       `json:"id" db:"id"`
	CreatedAt time.Time `json:"created_at" db:"created_at"`
	UpdatedAt time.Time `json:"updated_at" db:"updated_at"`
	Name      string    `json:"name" db:"name"`
	Phone     string    `json:"phone" db:"phone"`
	Email     string    `json:"email" db:"email"`
}

Contact represents an entity used for communications with a number of components

func (Contact) String

func (c Contact) String() string

String is not required by pop and may be deleted

type Contacts

type Contacts []Contact

Contacts is not required by pop and may be deleted

func (Contacts) String

func (c Contacts) String() string

String is not required by pop and may be deleted

type EventListResult

type EventListResult struct {
	Data []content.Event `json:"data"`
}

type HomePage

type HomePage struct {
	Hotels        []content.Hotel
	Sponsors      SponsorList
	Presentations []Presentation
	Workshops     []Workshop
}

func GetHomePage

func GetHomePage() (*HomePage, error)

type HotelListResult

type HotelListResult struct {
	Data []content.Hotel `json:"data"`
}

type Location

type Location struct {
	ID        int       `json:"id" db:"id"`
	CreatedAt time.Time `json:"created_at" db:"created_at"`
	UpdatedAt time.Time `json:"updated_at" db:"updated_at"`
	Name      string    `json:"name" db:"name"`
	Address   string    `json:"address" db:"address"`
	City      string    `json:"city" db:"city"`
	State     string    `json:"state" db:"state"`
	Zip       string    `json:"zip" db:"zip"`
}

Location represents a place for events or other types

func (Location) String

func (l Location) String() string

String is not required by pop and may be deleted

type Locations

type Locations []Location

Locations is not required by pop and may be deleted

func (Locations) String

func (l Locations) String() string

String is not required by pop and may be deleted

type PageListResult

type PageListResult struct {
	Data []content.Page `json:"data"`
}

type Presentation

type Presentation struct {
	Presentation content.Presentation
	Speakers     []content.Speaker
	Slot         content.Slot
}

func GetFullPresentation

func GetFullPresentation(id int) (Presentation, error)

GetFullPresentation returns a full presentation, with the speaker populated.

func GetPresentations

func GetPresentations() []Presentation

type PresentationListResult

type PresentationListResult struct {
	Data []content.Presentation `json:"data"`
}

type SlotListResult

type SlotListResult struct {
	Data []content.Slot `json:"data"`
}

type SpeakerListResult

type SpeakerListResult struct {
	Data []content.Speaker `json:"data"`
}

type SponsorList

type SponsorList struct {
	Diamond  []content.Sponsor
	Platinum []content.Sponsor
	Gold     []content.Sponsor
	Silver   []content.Sponsor
	Bronze   []content.Sponsor
}

func SortedSponsorList

func SortedSponsorList(slr []content.Sponsor) SponsorList

type SponsorListResult

type SponsorListResult struct {
	Data []content.Sponsor `json:"data"`
}

type User

type User struct {
	ID        int       `json:"id" db:"id"`
	FirstName string    `json:"first_name" db:"first_name"`
	LastName  string    `json:"last_name" db:"last_name"`
	Password  string    `json:"password" db:"password"`
	Email     string    `json:"email" db:"email"`
	Role      string    `json:"role" db:"role"`
	CreatedAt time.Time `json:"created_at" db:"created_at"`
	UpdatedAt time.Time `json:"updated_at" db:"updated_at"`
}

User represents a gcon user

func (User) String

func (u User) String() string

String is not required by pop and may be deleted

func (*User) Validate

func (u *User) Validate(tx *pop.Connection) (*validate.Errors, error)

Validate gets run everytime you call a "pop.Validate" method. This method is not required and may be deleted.

func (*User) ValidateSave

func (u *User) ValidateSave(tx *pop.Connection) (*validate.Errors, error)

ValidateSave gets run everytime you call "pop.ValidateSave" method. This method is not required and may be deleted.

func (*User) ValidateUpdate

func (u *User) ValidateUpdate(tx *pop.Connection) (*validate.Errors, error)

ValidateUpdate gets run everytime you call "pop.ValidateUpdate" method. This method is not required and may be deleted.

type Users

type Users []User

Users is not required by pop and may be deleted

func (Users) String

func (u Users) String() string

String is not required by pop and may be deleted

type Workshop

type Workshop struct {
	Workshop content.Workshop
	Speakers []content.Speaker
}

func GetFullWorkshop

func GetFullWorkshop(id int) (Workshop, error)

GetFullWorkshop returns a full presentation, with the speaker populated.

func GetWorkshops

func GetWorkshops() []Workshop

type WorkshopListResult

type WorkshopListResult struct {
	Data []content.Workshop `json:"data"`
}

Jump to

Keyboard shortcuts

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