deps

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2021 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {

	// The database layer
	Store *store.Repository

	// Env
	Env *environment.Env

	// Config
	Config *domain.ThemeConfig

	Paths paths.Paths

	Installed bool

	System sys.System

	Running bool
}

type Deps

type Deps struct {
	Env *environment.Env

	// The database layer
	Store *store.Repository

	// Configuration file of the site
	Config *domain.ThemeConfig

	// Site
	Site site.Repository

	// Theme
	Theme theme.Repository

	Watcher *watchers.Batch

	// Options
	Options *domain.Options

	// Paths
	Paths paths.Paths

	// File System (Web and SPA)
	FS *verbisfs.FileSystem

	// Webp
	WebP webp.Execer

	System sys.System

	Installed bool

	Running bool
	// contains filtered or unexported fields
}

Deps holds dependencies used by many. There will be normally only one instance of deps in play at a given time, i.e. one per Site built.

func New

func New(cfg Config) *Deps

func (*Deps) SetOptions

func (d *Deps) SetOptions(options *domain.Options)

func (*Deps) SetTheme

func (d *Deps) SetTheme(name string) error

func (*Deps) SetTmpl

func (d *Deps) SetTmpl(tmpl tpl.TemplateHandler)

func (*Deps) ThemePath

func (d *Deps) ThemePath() string

func (*Deps) Tmpl

func (d *Deps) Tmpl() tpl.TemplateHandler

Jump to

Keyboard shortcuts

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