Documentation ¶
Overview ¶
Simple program to generate index files for a directory or S3 bucket.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BackendSetup ¶
type Config ¶
type Config struct { BaseURL string `yaml:"base_url" mapstructure:"base_url"` DateFormat string `yaml:"date_format" mapstructure:"date_format"` DirsFirst bool `yaml:"dirs_first" mapstructure:"dirs_first"` IndexFile string `yaml:"index_file" mapstructure:"index_file"` LinkToIndexes bool `yaml:"link_to_index" mapstructure:"link_to_index"` LogLevel string `yaml:"log_level" mapstructure:"log_level"` LogFile string `yaml:"log_file" mapstructure:"log_file"` Minify bool `yaml:"minify" mapstructure:"minify"` Order string `yaml:"order" mapstructure:"order"` Quiet bool `yaml:"quiet" mapstructure:"quiet"` Recursive bool `yaml:"recursive" mapstructure:"recursive"` Skips []string `yaml:"skips" mapstructure:"skips"` SortBy string `yaml:"sort_by" mapstructure:"sort_by"` Source string `yaml:"source" mapstructure:"source"` Target string `yaml:"target" mapstructure:"target"` Template string `yaml:"template" mapstructure:"template"` Title string `yaml:"title" mapstructure:"title"` CfgFile string `yaml:"-"` BasePath string `yaml:"-"` }
func (Config) OrderByValue ¶
func (Config) SortByValue ¶
type Data ¶
type Data struct { Title string Path string RootPath string RelativePath string URL string Items []Item Parent string HasParent bool }
Data holds the template data.
type FileSource ¶
type FileSource interface { Read(path string) ([]Item, error) Write(data Data, content string) error }
FileSource is an interface for listing the contents of a directory or S3 bucket.
type Indexer ¶
type Indexer struct { Cfg Config Source FileSource Target FileSource BackendSetup BackendSetup // contains filtered or unexported fields }
Indexer is the main struct for the webindexer package.
type LocalBackend ¶
type LocalBackend struct {
// contains filtered or unexported fields
}
type S3API ¶
type S3API interface { ListObjectsV2(input *s3.ListObjectsV2Input) (*s3.ListObjectsV2Output, error) PutObject(input *s3.PutObjectInput) (*s3.PutObjectOutput, error) }
Click to show internal directories.
Click to hide internal directories.