Back to godoc.org

Package resolver

v2.8.0
Latest Go to latest

The latest major version is v2.

Published: Mar 8, 2020 | License: MIT | Module: github.com/gobuffalo/packr/v2

Index

Variables

var DefaultResolver = defaultResolver()

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)

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

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier