index

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2018 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WatchForUpdates

func WatchForUpdates(ctx context.Context, idxChan chan *Index, indexPath string, dataPath string, interval time.Duration, deleteOldIndex bool) error

Types

type Collection

type Collection struct {
	Title    string `json:"title"`
	Slug     string
	Sessions []*Session
}

type Index

type Index struct {
	Index bleve.Index
	Path  string
}

func LoadIndex

func LoadIndex(ctx context.Context, indexPath string, dataFolder string, forceRebuild bool, deleteOld bool) (*Index, error)

LoadIndex attempts to load an index from a given path or build it based on the data folder. If the index already exists then you can enforce a rebuild using the forceRebuild parameter.

func (*Index) Close

func (i *Index) Close() error

func (*Index) Destroy

func (i *Index) Destroy() error

type IndexedSession

type IndexedSession struct {
	Title             string    `json:"title"`
	Description       string    `json:"description"`
	URL               string    `json:"url"`
	CollectionTitle   string    `json:"collection_title"`
	CollectionURL     string    `json:"collection_url"`
	Speakers          []Speaker `json:"speakers"`
	ThumbnailURL      string    `json:"thumbnail_url"`
	Recorded          time.Time `json:"recorded"`
	RecordedFormatted string    `json:"recorded_formatted"`
}

func (IndexedSession) Type

func (s IndexedSession) Type() string

type Session

type Session struct {
	Title        string
	Description  string
	Speakers     []string
	Recorded     string
	Videos       []Video
	Slug         string
	ThumbnailURL string `json:"thumbnail_url"`
}

type Speaker

type Speaker struct {
	Name string `json:"name"`
	Slug string `json:"slug"`
}

type State

type State struct {
	Ref   string
	Index string
}

type Video

type Video struct {
	Type string
	URL  string
}

Jump to

Keyboard shortcuts

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