catalog

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2016 License: BSD-2-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Catalog

type Catalog struct {
	// Unsorted contains the list of resources created by Lua
	Unsorted []resource.Resource `luar:"-"`
	// contains filtered or unexported fields
}

Catalog type contains a collection of resources

func New added in v0.3.0

func New(config *Config) *Catalog

New creates a new empty catalog with the provided configuration

func (*Catalog) Add added in v0.3.0

func (c *Catalog) Add(resources ...resource.Resource)

Add adds a resource to the catalog. This method is called from Lua when adding new resources

func (*Catalog) Load added in v0.3.0

func (c *Catalog) Load() error

Load loads resources into the catalog

func (*Catalog) Run

func (c *Catalog) Run() error

Run processes the resources from catalog

type Config

type Config struct {
	// Name of the Lua module to load and execute
	Module string

	// Do not take any actions, just report what would be done
	DryRun bool

	// Writer used to log events
	Logger *log.Logger

	// Path to the site repo containing module and data files
	SiteRepo string

	// The Lua state
	L *lua.LState

	// Number of goroutines to use for concurrent processing
	Concurrency int
}

Config type represents a set of settings to use when creating and processing the catalog

Jump to

Keyboard shortcuts

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