package resolver

import "github.com/gobuffalo/packr/v2/file/resolver"

Index

Variables

var DefaultResolver = defaultResolver()

Functions

func HexGzipString

func HexGzipString(s string) (string, error)

func Key

func Key(s string) string

func OsPath

func OsPath(s string) string

func ResolvePathInBase

func ResolvePathInBase(base, path string) (string, error)

ResolvePathInBase returns a path that is guaranteed to be inside of the base directory or an error

func String

func String(r Resolver) string

func UnHexGzipString

func UnHexGzipString(packed string) (string, error)

Types

type Disk

type Disk struct {
	Root string
}

func (*Disk) FileMap

func (d *Disk) FileMap() map[string]file.File

func (*Disk) Resolve

func (d *Disk) Resolve(box string, name string) (file.File, error)

func (Disk) String

func (d Disk) String() string

type HexGzip

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

func NewHexGzip

func NewHexGzip(files map[string]string) (*HexGzip, error)

func (*HexGzip) FileMap

func (hg *HexGzip) FileMap() map[string]file.File

func (*HexGzip) Resolve

func (hg *HexGzip) Resolve(box string, name string) (file.File, error)

func (HexGzip) String

func (hg HexGzip) String() string

type InMemory

type InMemory struct {
	*packd.MemoryBox
}

func NewInMemory

func NewInMemory(files map[string]file.File) *InMemory

func (*InMemory) FileMap

func (d *InMemory) FileMap() map[string]file.File

func (*InMemory) Pack

func (d *InMemory) Pack(name string, f file.File) error

func (*InMemory) Resolve

func (d *InMemory) Resolve(box string, name string) (file.File, error)

func (InMemory) String

func (d InMemory) String() string

type Packable

type Packable interface {
	Pack(name string, f file.File) error
}

type Resolver

type Resolver interface {
	Resolve(string, string) (file.File, error)
}

Source Files

disk.go hex_gzip.go ident.go in_memory.go packable.go resolver.go

Directories

PathSynopsis
file/resolver/encoding
file/resolver/encoding/hexPackage hex implements hexadecimal encoding and decoding.
Version
v2.8.3 (latest)
Published
Nov 23, 2021
Platform
linux/amd64
Imports
16 packages
Last checked
10 hours ago

Tools for package owners.