resolver

package
v2.8.2 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2020 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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

Directories

Path Synopsis
encoding
hex
Package hex implements hexadecimal encoding and decoding.
Package hex implements hexadecimal encoding and decoding.

Jump to

Keyboard shortcuts

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