v0.125.1 Latest Latest

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

Go to latest
Published: Apr 18, 2024 License: Apache-2.0 Imports: 5 Imported by: 0




This section is empty.


This section is empty.


This section is empty.


type ResourcePaths added in v0.123.0

type ResourcePaths struct {
	// This is the directory component for the target file or link.
	Dir string

	// Any base directory for the target file. Will be prepended to Dir.
	BaseDirTarget string

	// This is the directory component for the link will be prepended to Dir.
	BaseDirLink string

	// Set when publishing in a multihost setup.
	TargetBasePaths []string

	// This is the File component, e.g. "data.json".
	File string

ResourcePaths holds path information for a resource. All directories in here have Unix-style slashes, with leading slash, but no trailing slash. Empty directories are represented with an empty string.

func (ResourcePaths) FromTargetPath added in v0.123.0

func (d ResourcePaths) FromTargetPath(targetPath string) ResourcePaths

func (ResourcePaths) Path added in v0.123.0

func (d ResourcePaths) Path() string

func (ResourcePaths) TargetFilenames added in v0.123.0

func (d ResourcePaths) TargetFilenames() []string
func (d ResourcePaths) TargetLink() string

func (ResourcePaths) TargetPath added in v0.123.0

func (d ResourcePaths) TargetPath() string

func (ResourcePaths) TargetPaths added in v0.123.0

func (d ResourcePaths) TargetPaths() []string

type ResourceTransformationKey added in v0.58.0

type ResourceTransformationKey struct {
	Name string
	// contains filtered or unexported fields

ResourceTransformationKey are provided by the different transformation implementations. It identifies the transformation (name) and its configuration (elements). We combine this in a chain with the rest of the transformations with the target filename and a content hash of the origin to use as cache key.

func NewResourceTransformationKey added in v0.58.0

func NewResourceTransformationKey(name string, elements ...any) ResourceTransformationKey

NewResourceTransformationKey creates a new ResourceTransformationKey from the transformation name and elements. We will create a 64 bit FNV hash from the elements, which when combined with the other key elements should be unique for all practical applications.

func (ResourceTransformationKey) Value added in v0.58.0

Value returns the Key as a string. Do not change this without good reasons.

Jump to

Keyboard shortcuts

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