entity

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Fs

type Fs struct {
	*OriginFs

	Content    *valueobject.ComponentFs
	Data       *valueobject.ComponentFs
	I18n       *valueobject.ComponentFs
	Layouts    *valueobject.ComponentFs
	Archetypes *valueobject.ComponentFs
	Assets     *valueobject.ComponentFs

	AssetsWithDuplicatesPreserved *valueobject.ComponentFs

	// The work folder (may be a composite of project and theme components).
	Work afero.Fs

	// When in multihost we have one static filesystem per language. The sync
	// static files is currently done outside of the Hugo build (where there is
	// a concept of a site per language).
	// When in non-multihost mode there will be one entry in this map with a blank key.
	Static map[string]*valueobject.ComponentFs

	// Writable filesystem on top the project's resources directory,
	// with any sub module's resource fs layered below.
	ResourcesCache afero.Fs

	RootFss []*valueobject.RootMappingFs

	*Service
}

func (*Fs) AssetsFs

func (f *Fs) AssetsFs() afero.Fs

func (*Fs) AssetsFsMakePathRelative

func (f *Fs) AssetsFsMakePathRelative(filename string, checkExists bool) (string, bool)

func (*Fs) AssetsFsRealDirs

func (f *Fs) AssetsFsRealDirs(from string) []string

func (*Fs) AssetsFsRealFilename

func (f *Fs) AssetsFsRealFilename(rel string) string

func (*Fs) ContentFs

func (f *Fs) ContentFs() afero.Fs

func (*Fs) Glob

func (f *Fs) Glob(fs afero.Fs, pattern string, handle func(fi fs.FileMetaInfo) (bool, error)) error

func (*Fs) LayoutFs

func (f *Fs) LayoutFs() afero.Fs

func (*Fs) NewBasePathFs

func (f *Fs) NewBasePathFs(source afero.Fs, path string) afero.Fs

func (*Fs) RelPathify

func (f *Fs) RelPathify(filename string, workingDir string) string

RelPathify trims any WorkingDir prefix from the given filename. If the filename is not considered to be absolute, the path is just cleaned.

func (*Fs) ResourcesCacheFs

func (f *Fs) ResourcesCacheFs() afero.Fs

func (*Fs) Walk

func (f *Fs) Walk(fs afero.Fs, start string, cb fs.WalkCallback, conf fs.WalkwayConfig) error

func (*Fs) WalkAssets

func (f *Fs) WalkAssets(start string, cb fs.WalkCallback, conf fs.WalkwayConfig) error

func (*Fs) WalkContent

func (f *Fs) WalkContent(start string, cb fs.WalkCallback, conf fs.WalkwayConfig) error

func (*Fs) WalkLayouts

func (f *Fs) WalkLayouts(start string, cb fs.WalkCallback, conf fs.WalkwayConfig) error

func (*Fs) WorkFs

func (f *Fs) WorkFs() afero.Fs

type OriginFs

type OriginFs struct {
	// Source is Hugo's source file system.
	// Note that this will always be a "plain" Afero filesystem:
	// * afero.OsFs when running in production
	// * afero.MemMapFs for many of the tests.
	Source afero.Fs

	// PublishDir is where Hugo publishes its rendered content.
	// It's mounted inside publishDir (default /public).
	PublishDir afero.Fs

	// WorkingDirReadOnly is a read-only file system
	// restricted to the project working dir.
	WorkingDirReadOnly afero.Fs

	// WorkingDirWritable is a writable file system
	// restricted to the project working dir.
	WorkingDirWritable afero.Fs

	// Directories to store Resource related artifacts.
	AbsResourcesDir string
}

func (*OriginFs) Origin

func (f *OriginFs) Origin() afero.Fs

func (*OriginFs) Publish

func (f *OriginFs) Publish() afero.Fs

func (*OriginFs) PublishDirStatic

func (f *OriginFs) PublishDirStatic() afero.Fs

func (*OriginFs) PublishFs

func (f *OriginFs) PublishFs() afero.Fs

func (*OriginFs) SourceFs

func (f *OriginFs) SourceFs() afero.Fs

func (*OriginFs) Working

func (f *OriginFs) Working() afero.Fs

type Service

type Service struct {
}

func (*Service) NewFileMetaInfo

func (s *Service) NewFileMetaInfo(filename string) fs.FileMetaInfo

Jump to

Keyboard shortcuts

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