Documentation ¶
Overview ¶
Package app manages main application server.
Index ¶
- type App
- type BitcaskStore
- func (s *BitcaskStore) Close() error
- func (s *BitcaskStore) GetViews(id string) (int64, error)
- func (s *BitcaskStore) GetViews_(collection, id string) (int64, error)
- func (s *BitcaskStore) IncView_(collection, id string) error
- func (s *BitcaskStore) IncViews(id string) error
- func (s *BitcaskStore) Migrate(collection, id string) error
- type Config
- type FeedConfig
- type PathConfig
- type ServerConfig
- type Sizes
- type Store
- type ThumbnailerConfig
- type TranscoderConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type App ¶
type App struct { Config *Config Library *media.Library Store Store Watcher *fsnotify.Watcher Templates *templateStore Feed []byte Listener net.Listener Router *mux.Router }
App represents main application.
type BitcaskStore ¶
type BitcaskStore struct {
// contains filtered or unexported fields
}
BitcaskStore ...
func (*BitcaskStore) GetViews ¶
func (s *BitcaskStore) GetViews(id string) (int64, error)
GetViews ...
func (*BitcaskStore) GetViews_ ¶
func (s *BitcaskStore) GetViews_(collection, id string) (int64, error)
GetViews_ ...
func (*BitcaskStore) IncView_ ¶
func (s *BitcaskStore) IncView_(collection, id string) error
IncView_ ...
func (*BitcaskStore) Migrate ¶
func (s *BitcaskStore) Migrate(collection, id string) error
Migrate ...
type Config ¶
type Config struct { Library []*PathConfig `json:"library"` Server *ServerConfig `json:"server"` Thumbnailer *ThumbnailerConfig `json:"thumbnailer"` Transcoder *TranscoderConfig `json:"transcoder"` Feed *FeedConfig `json:"feed"` }
Config settings for main App.
func DefaultConfig ¶
func DefaultConfig() *Config
DefaultConfig returns Config initialized with default values.
type FeedConfig ¶
type FeedConfig struct { ExternalURL string `json:"external_url"` Title string `json:"title"` Link string `json:"link"` Description string `json:"description"` Author struct { Name string `json:"name"` Email string `json:"email"` } `json:"author"` Copyright string `json:"copyright"` }
FeedConfig settings for App Feed.
type PathConfig ¶
PathConfig settings for media library path.
type ServerConfig ¶
type ServerConfig struct { Host string `json:"host"` Port int `json:"port"` StorePath string `json:"store_path"` UploadPath string `json:"upload_path"` MaxUploadSize int64 `json:"max_upload_size"` }
ServerConfig settings for App Server.
type Store ¶
type Store interface { Close() error Migrate(collection, id string) error GetViews_(collection, id string) (int64, error) IncView_(collection, id string) error GetViews(id string) (int64, error) IncViews(id string) error }
Store ...
type ThumbnailerConfig ¶
type ThumbnailerConfig struct {
Timeout int `json:"timeout"`
}
ThumbnailerConfig settings for Transcoder
type TranscoderConfig ¶
TranscoderConfig settings for Transcoder
Click to show internal directories.
Click to hide internal directories.