data

package
v0.54.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Assets embed.FS
View Source
var Icons []byte
View Source
var Pages embed.FS
View Source
var Presets, _ = fs.Sub(filterData, "filters/presets")
View Source
var Templates, _ = fs.Sub(filterData, "filters/templates")

Functions

func HashFiles added in v0.31.1

func HashFiles(input ...fs.FS) (string, error)

HashFiles computes a fnv hash of the given filesystems, for cache invalidation purposes

func Walk

func Walk(input fs.FS, suffix string, fn func(string, io.Reader) error) error

Walk warps fs.WalkDir with simpler invocation pattern:

  • only files with a given suffix are passed opened
  • the file is automatically opened and closed
  • only the shortened file name (no folder, no suffix) and io.Reader are passed down

Types

type AssetHashes added in v0.36.0

type AssetHashes struct {
	// contains filtered or unexported fields
}

func ParseAssetHashes added in v0.36.0

func ParseAssetHashes() (*AssetHashes, error)

func (*AssetHashes) BuildURL added in v0.36.0

func (h *AssetHashes) BuildURL(path string) string

type Contributor added in v0.36.0

type Contributor struct {
	Login         string
	Name          string
	AvatarUrl     string `json:"avatar_url"`
	Profile       string
	Contributions []string
}

type Contributors added in v0.36.0

type Contributors struct {
	// contains filtered or unexported fields
}

func ParseContributors added in v0.36.0

func ParseContributors() (*Contributors, error)

func (*Contributors) Get added in v0.36.0

func (c *Contributors) Get(login string) (*Contributor, bool)

func (*Contributors) GetAll added in v0.36.0

func (c *Contributors) GetAll() []*Contributor

func (*Contributors) GetSponsors added in v0.36.0

func (c *Contributors) GetSponsors() []*Contributor

Jump to

Keyboard shortcuts

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