models

package
v0.0.0-...-f5eb620 Latest Latest
Warning

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

Go to latest
Published: May 23, 2016 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ContentImageStorage

type ContentImageStorage struct{ SimpleImageStorage }

type HeaderImageStorage

type HeaderImageStorage struct{ SimpleImageStorage }

type LogoImageStorage

type LogoImageStorage struct{ SimpleImageStorage }

func (LogoImageStorage) GetSizes

func (LogoImageStorage) GetSizes() map[string]media_library.Size

type Page

type Page struct {
	gorm.Model

	Path string

	MenuWeight uint
	Links      []PageLink

	Name string

	SEO PageMeta

	ContentColumns []PageContentColumn
	// contains filtered or unexported fields
}

func (*Page) AfterDelete

func (p *Page) AfterDelete() error

func (*Page) AfterFind

func (p *Page) AfterFind() error

func (*Page) AfterSave

func (p *Page) AfterSave() error

func (*Page) PrevSlug

func (p *Page) PrevSlug() string

func (*Page) Slug

func (p *Page) Slug() string

type PageContentColumn

type PageContentColumn struct {
	gorm.Model

	PageID uint

	ColumnWidth   string
	ColumnHeading string
	ColumnText    string                   `sql:"size:2000"`
	ColumnImage   []PageContentColumnImage // We only use 1 image but a slice allows image removal
	VideoID       uint
	Video         Video
	SlideshowID   uint
	Slideshow     Slideshow
	ColumnLink    string
}

type PageContentColumnImage

type PageContentColumnImage struct {
	gorm.Model

	PageContentColumnID uint

	Image     ContentImageStorage `sql:"type:varchar(4096)"`
	Alt       string
	Alignment string
}
type PageLink struct {
	gorm.Model

	PageID uint

	LinkText string `sql:"size:2000"`
	Link     string
}

type PageMeta

type PageMeta struct {
	gorm.Model

	PageID uint

	PageTitle   string
	Description string
}

type Release

type Release struct {
	gorm.Model

	Comment string
	Date    *time.Time
	Log     string
}

func (*Release) BeforeCreate

func (r *Release) BeforeCreate() error

type ResponsiveImageStorage

type ResponsiveImageStorage struct{ media_library.FileSystem }

func (ResponsiveImageStorage) GetSizes

type Settings

type Settings struct {
	gorm.Model

	ContactDetails SettingsContactDetails
	Header         SettingsHeader
	CallToAction   SettingsCallToAction
	IntroVideo     SettingsIntroVideo
	Sidebar        []SettingsSidebarContent
	Copyright      string
	Footer         string `sql:"size:2000"`
	APIKeys        SettingsAPIKey
}

func (*Settings) AfterSave

func (s *Settings) AfterSave() error

type SettingsAPIKey

type SettingsAPIKey struct {
	gorm.Model

	SettingsID uint

	Analytics string
	Tracking  string
	LiveChat  string
}

type SettingsCallToAction

type SettingsCallToAction struct {
	gorm.Model

	SettingsID uint

	ActionText string `sql:"size:2000"`
	Link       string
}

type SettingsContactDetails

type SettingsContactDetails struct {
	gorm.Model

	SettingsID uint

	Title               string
	Tel                 string
	Email               string
	OpeningHoursDesktop string `sql:"size:2000"`
	OpeningHoursMobile  string
}

type SettingsHeader

type SettingsHeader struct {
	gorm.Model

	SettingsID uint
	Image      HeaderImageStorage `sql:"type:varchar(4096)"`
	Alt        string
	Link       string
}

type SettingsIntroVideo

type SettingsIntroVideo struct {
	gorm.Model
	SettingsID uint
	VideoID    uint
	Video      Video
	SEO        SettingsIntroVideoMeta
}

type SettingsIntroVideoMeta

type SettingsIntroVideoMeta struct {
	gorm.Model

	SettingsIntroVideoID uint

	PageTitle   string
	Description string
}
type SettingsLogo struct {
	gorm.Model

	SettingsID uint

	Image LogoImageStorage `sql:"type:varchar(4096)"`
	Alt   string
}

type SettingsSidebarContent

type SettingsSidebarContent struct {
	gorm.Model

	SettingsID uint

	Image SidebarImageStorage `sql:"type:varchar(4096)"`
	Alt   string
	Link  string
}

type SidebarImageStorage

type SidebarImageStorage struct{ SimpleImageStorage }

type SimpleImageStorage

type SimpleImageStorage struct{ media_library.Base }

func (SimpleImageStorage) GetFullPath

func (s SimpleImageStorage) GetFullPath(url string, option *media_library.Option) (path string, err error)

func (SimpleImageStorage) Retrieve

func (s SimpleImageStorage) Retrieve(url string) (*os.File, error)

func (SimpleImageStorage) Store

func (s SimpleImageStorage) Store(url string, option *media_library.Option, reader io.Reader) error

type Slideshow

type Slideshow struct {
	gorm.Model

	Name     string
	Interval int
	Slides   []SlideshowSlide
}

type SlideshowSlide

type SlideshowSlide struct {
	gorm.Model

	SlideshowID uint
	Image       SimpleImageStorage `sql:"type:varchar(4096)"`
	Alt         string
}

type Video

type Video struct {
	gorm.Model

	Name           string
	YouTubeID      string
	Title          string
	Length         string
	ThumbnailImage VideoImageStorage `sql:"type:varchar(4096)"`
	Alt            string
}

func (*Video) DisplayName

func (v *Video) DisplayName() string

type VideoImageStorage

type VideoImageStorage struct{ SimpleImageStorage }

Jump to

Keyboard shortcuts

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