Versions in this module Expand all Collapse all v0 v0.10.13 Jun 5, 2019 v0.10.12 May 30, 2019 Changes in this version + var Empty = GenericItem + var ErrDataSource = "!Error" + var ErrDataSourceMissing = errors.New("Missing") + var Unresolved = GenericItem + func AddDataSource(ds DataSource) + func ApplyContentTransforms(data string) string + func ConfigureShortcodeTemplatePath(cfg *Config) + func CreateTemplateView(routeRegistry *RouteRegistry, trans i18n.TranslateFunc, ctx *RenderContext, ...) *jet.Set + func GetCast(f *Film) []string + func GetCountries(f *Film) []string + func GetDataSources() map[string]DataSource + func GetGenres(f *Film) []string + func GetTVSeasonYear(t *TVSeason) []string + func GetTVShowCast(t *TVSeason) []string + func GetTVShowCountries(t *TVSeason) []string + func GetTVShowGenres(t *TVSeason) []string + func GetYear(f *Film) []string + func ReplaceURLArgumentsWithEntityValues(routePrefix string, urlPath string, args []RouteArgument, entity interface{}) string + func ValidateRouteWithDatasource(urlPath string, ds DataSource) error + type BonusContent struct + CustomFields CustomFields + Images ImageSet + Number int + Overview string + Runtime Runtime + Slug string + Subtitles []SubtitleTrack + Title string + func (bonus BonusContent) GetGenericItem() GenericItem + type BonusContentCollection []BonusContent + type Bundle struct + CreatedAt time.Time + Description string + ExternalID string + ID int + Images ImageSet + Items GenericItems + PromoURL string + PublishedDate time.Time + Seo Seo + Slug string + Status string + Tagline string + Title string + TitleSlug string + UpdatedAt time.Time + func (bundle Bundle) GetGenericItem() GenericItem + type BundleCollection []Bundle + func (bundles BundleCollection) FindBundleByID(bundleID int) (*Bundle, error) + func (bundles BundleCollection) FindBundleBySlug(slug string) (*Bundle, error) + type CastMember struct + Character string + Name string + type Collection struct + CreatedAt string + Description string + DisplayName string + ID int + Images ImageSet + ItemLayout string + Items []GenericItem + ItemsPerRow int + SearchQuery string + Seo Seo + Slug string + Title string + TitleSlug string + UpdatedAt string + func (collection Collection) GetGenericItem() GenericItem + type CollectionCollection []Collection + func (collections CollectionCollection) FindCollectionByID(collectionID int) (*Collection, error) + func (collections CollectionCollection) FindCollectionBySlug(slug string) (*Collection, error) + type Config struct + BuilderVersion string + DefaultLanguage string + DisableCache bool + Languages map[string]string + LiveReload LiveReloadConfig + Name string + Private PrivateConfig + ProxyPatterns []string + Routes []Route + RunAsAdmin bool + SiteRootPath string + SiteURL string + SkipLogin bool + Version string + func (cfg *Config) BuildPath() string + func (cfg *Config) FileRootPath() string + func (cfg Config) ShortCodePath() string + func (cfg Config) SourcePath() string + type CrewMember struct + Job string + Name string + type CustomFields map[string]interface + func (fields CustomFields) GetBool(fieldKey string, defaultValue bool) bool + func (fields CustomFields) GetNumber(fieldKey string, defaultValue float64) float64 + func (fields CustomFields) GetString(fieldKey string, defaultValue string) string + type DataSource interface + GetEntityType func() reflect.Type + GetName func() string + GetRouteArguments func() []RouteArgument + GetRouteForEntity func(ctx RenderContext, entity interface{}) string + GetRouteForSlug func(ctx RenderContext, slug string) string + IsSlugMatch func(slug string) bool + Iterator func(ctx RenderContext, renderer Renderer) (errorCount int) + func FindDataSource(name string) DataSource + type FeatureToggles map[string]bool + type Film struct + Bonuses BonusContentCollection + Cast []CastMember + Countries StringCollection + Crew []CrewMember + CustomFields CustomFields + Genres StringCollection + ID int + Images ImageSet + Languages StringCollection + Overview string + Recommendations []GenericItem + ReleaseDate time.Time + Runtime Runtime + Seo Seo + Slug string + Studio []string + Subtitles []SubtitleTrack + Tagline string + Title string + TitleSlug string + Trailers []Trailer + func (film Film) GetGenericItem() GenericItem + type FilmCollection []Film + func (films FilmCollection) FindFilmByID(filmID int) (*Film, bool) + func (films FilmCollection) FindFilmBySlug(slug string) (*Film, bool) + type GenericItem struct + Images ImageSet + InnerItem interface{} + ItemType string + Seo Seo + Slug string + Title string + func (genericItem GenericItem) IsResolved() bool + func (i *GenericItem) GetTitle(T i18n.TranslateFunc) string + func (i GenericItem) GetTranslatedTitle(T i18n.TranslateFunc, i18nKey string) string + type GenericItems []GenericItem + func (slice GenericItems) Len() int + func (slice GenericItems) Less(i, j int) bool + func (slice GenericItems) Swap(i, j int) + type ImageSet struct + Background string + Carousel string + Classification string + Header string + Landscape string + Portrait string + Seo string + type ItemIndex map[string]map[string]GenericItem + func (itemIndex ItemIndex) FindEmptySlugs(slugType string) []string + func (itemIndex ItemIndex) FindUnresolvedSlugs(slugType string) []string + func (itemIndex ItemIndex) Get(slug string) (item GenericItem) + func (itemIndex ItemIndex) MapToUnresolvedItems(items []string) GenericItems + func (itemIndex ItemIndex) Print() + func (itemIndex ItemIndex) PrintStats() + func (itemIndex ItemIndex) Resolve(gItems GenericItems) GenericItems + func (itemIndex ItemIndex) Set(slug string, item GenericItem) + type Language struct + Code string + DefinitionFilePath string + IsDefault bool + Locale string + type LiveReloadConfig struct + IgnoredPaths []string + type Navigation struct + Footer []NavigationItem + Header []NavigationItem + type NavigationItem struct + Items []NavigationItem + Label string + Link struct{ ... } + type OrderedEntries []OrderedEntry + func (t OrderedEntries) Print() + type OrderedEntry struct + Items GenericItems + Key string + type Page struct + Content string + ID int + Images ImageSet + PageCollections []PageCollection + PageType string + Seo Seo + Slug string + Tagline string + Title string + TitleSlug string + URL string + func (page Page) GetGenericItem() GenericItem + type PageCollection struct + DisplayName string + ID int + ItemLayout string + Items []GenericItem + ItemsPerRow int + Layout string + Slug string + TitleSlug string + type Pages []Page + func (pages Pages) FindPageByID(pageID int) (*Page, bool) + func (pages Pages) FindPageBySlug(slug string) (*Page, bool) + type Pagination struct + Index int + NextURL string + PreviousURL string + Size int + Total int + type Plan struct + CreatedAt time.Time + Description string + ID int + Interval string + IntervalCount int + Name string + NameSlug string + Page *Page + PortraitImage string + Slug string + TrialPeriodDays int + UpdatedAt time.Time + type PlanCollection []Plan + type PrivateConfig struct + APIKey string + type RenderContext struct + Language *Language + Route *Route + RoutePrefix string + Site *Site + type Renderer interface + Initialise func() + Render func(templatePath string, filePath string, data jet.VarMap) (errorCount int) + type Route struct + DataSource string + Name string + PageSize int + Pagination Pagination + PartialTemplatePath string + PartialURLPath string + ResolvedDataSouce DataSource + ResolvedEntityType reflect.Type + TemplatePath string + URLPath string + func (r *Route) Clone() *Route + func (r *Route) HasPartial() bool + type RouteArgument struct + Description string + GetValue func(obj interface{}) string + Name string + type RouteRegistry struct + func NewRouteRegistry() *RouteRegistry + func NewRouteRegistryFromConfig(config *Config) *RouteRegistry + func (r *RouteRegistry) FindByName(name string) *Route + func (r *RouteRegistry) FindBySlugAndRouteName(slug string, routeName string) *Route + func (r *RouteRegistry) FindByTypeAndRouteName(entityType reflect.Type, routeName string) *Route + func (r *RouteRegistry) GetAll() []*Route + func (r *RouteRegistry) GetRouteForEntity(ctx RenderContext, entity interface{}, routeName string) string + func (r *RouteRegistry) GetRouteForSlug(ctx RenderContext, slug string, routeName string) string + type Runtime int + func (rt Runtime) Hours() int + func (rt Runtime) Localise(T i18n.TranslateFunc) string + func (rt Runtime) Minutes() int + type Seo struct + Description string + Image string + Keywords string + SiteName string + Title string + VideoURL string + type ServiceConfig map[string]string + func (cfg ServiceConfig) ForceAbsoluteImagePath(url string) string + func (cfg ServiceConfig) GetInt(key string, defaultArgs ...int) int + func (cfg ServiceConfig) GetKeywords(keywords string) string + func (cfg ServiceConfig) GetSEOTitle(seoTitle, title string) string + func (cfg ServiceConfig) GetSiteName() string + func (cfg ServiceConfig) SelectDefaultImageType(landscape, portrait string) string + type Site struct + Bundles BundleCollection + Collections CollectionCollection + Config ServiceConfig + Films FilmCollection + Languages []Language + Navigation Navigation + Pages Pages + Plans PlanCollection + SiteConfig *Config + TVEpisodes TVEpisodeCollection + TVSeasons TVSeasonCollection + TVShows TVShowCollection + Taxonomies Taxonomies + Toggles FeatureToggles + func (s Site) PopulateTaxonomyWithFilms(taxonomy string, finder func(*Film) []string) + func (s Site) PopulateTaxonomyWithTVSeasons(taxonomy string, finder func(*TVSeason) []string) + func (site *Site) LinkItems(itemIndex ItemIndex) + type StringCollection []string + func (strings StringCollection) Join(separator string) string + func (strings StringCollection) String() string + type SubtitleTrack struct + Language string + Name string + Path string + Type string + type TVEpisode struct + CustomFields CustomFields + EpisodeNumber int + Images ImageSet + Overview string + Runtime Runtime + Season *TVSeason + Slug string + Subtitles []SubtitleTrack + Title string + TitleSlug string + func (episode TVEpisode) GetGenericItem() GenericItem + func (episode TVEpisode) GetTitle(T i18n.TranslateFunc) string + func (episode TVEpisode) GetTranslatedTitle(T i18n.TranslateFunc, i18nKey string) string + type TVEpisodeCollection []TVEpisode + func (episodes TVEpisodeCollection) FindTVEpisodeBySlug(slug string) (*TVEpisode, bool) + type TVSeason struct + Bonuses BonusContentCollection + Cast []CastMember + Crew []CrewMember + CustomFields CustomFields + Episodes []TVEpisode + Images ImageSet + Overview string + PublishingState string + Recommendations []GenericItem + SeasonNumber int + Seo Seo + ShowInfo *TVShow + Slug string + Tagline string + Title string + Trailers []Trailer + func (season TVSeason) GetGenericItem() GenericItem + func (season TVSeason) GetTitle(T i18n.TranslateFunc) string + func (season TVSeason) GetTranslatedTitle(T i18n.TranslateFunc, i18nKey string) string + type TVSeasonCollection []TVSeason + func (tvSeasons TVSeasonCollection) FindTVSeasonBySlug(slug string) (*TVSeason, bool) + type TVShow struct + AvailableSeasons []string + Countries StringCollection + Genres StringCollection + ID int + Images ImageSet + Languages StringCollection + Overview string + ReleaseDate time.Time + Seasons TVSeasonCollection + Slug string + Studio []string + Tagline string + Title string + TitleSlug string + Trailers []Trailer + func (show TVShow) GetGenericItem() GenericItem + type TVShowCollection []TVShow + func (shows TVShowCollection) FindTVShowByID(showID int) (*TVShow, bool) + func (shows TVShowCollection) FindTVShowBySlug(slug string) (*TVShow, bool) + type Taxonomies map[string]Taxonomy + type Taxonomy map[string]GenericItems + func (t Taxonomy) Alphabetical() OrderedEntries + func (t Taxonomy) Print() + type Trailer struct + Type string + URL string