entity

package
v0.2.21 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2026 License: Apache-2.0 Imports: 7 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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) Os

func (f *Fs) Os() 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) ResolveJSConfigFile

func (f *Fs) ResolveJSConfigFile(name string) string

ResolveJSConfigFile resolves the JS-related config file to a absolute filename. One example of such would be postcss.config.js.

func (*Fs) ResourcesCacheFs

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

func (*Fs) ReverseLookupContent

func (f *Fs) ReverseLookupContent(filename string, checkExists bool) ([]fs.ComponentPath, error)

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) WalkI18n

func (f *Fs) WalkI18n(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

	AbsWorkingDir   string
	AbsPublishDir   string
	AbsResourcesDir string
}

func (*OriginFs) Origin

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

func (*OriginFs) Publish

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

func (*OriginFs) PublishDirAbs

func (f *OriginFs) PublishDirAbs() string

func (*OriginFs) PublishDirStatic

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

func (*OriginFs) PublishFs

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

func (*OriginFs) ResourcesDirAbs

func (f *OriginFs) ResourcesDirAbs() string

func (*OriginFs) SourceFs

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

func (*OriginFs) Working

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

func (*OriginFs) WorkingDirAbs

func (f *OriginFs) WorkingDirAbs() string

type Service

type Service struct {
}

func (*Service) NewFileMetaInfo

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

func (*Service) NewFileMetaInfoWithContent

func (s *Service) NewFileMetaInfoWithContent(content string) fs.FileMetaInfo

Jump to

Keyboard shortcuts

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