assets

package
v0.0.0-...-1c33fca Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2017 License: BSD-2-Clause Imports: 13 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var PkgLogger logger

Functions

func LoadFromFile

func LoadFromFile(folder string) (*core.Directory, error)

func SetNodeAttr

func SetNodeAttr(node fs.Node, k string, v *reflect.Value) error

Types

type Component

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

func (*Component) Base

func (c *Component) Base() string

func (*Component) Bases

func (c *Component) Bases() []*Component

func (*Component) Name

func (c *Component) Name() string

func (*Component) Type

func (c *Component) Type() ComponentType

type ComponentType

type ComponentType int
const (
	UnknownComponent ComponentType = iota // initial component state is invalid
	FileComponent                         // file component used to create file entities
	DirComponent                          // directory component used to create directory entities
	BaseComponent                         // only able to extend file/dir components
)

type Components

type Components map[string]*Component

func (Components) LookupBaseType

func (c Components) LookupBaseType(t string) (*Component, bool)

type Entity

type Entity interface {
	fs.Node
}

type Level

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

func NewLevel

func NewLevel(root Entity, objects map[string]Entity) *Level

func (*Level) AddProperty

func (l *Level) AddProperty(node fs.Node, attrName string, v interface{}) error

func (*Level) GetProperties

func (l *Level) GetProperties(key string) (map[string]PropertyFunc, bool)

func (*Level) Root

func (l *Level) Root() *core.Directory

type PropertyFunc

type PropertyFunc func() (*reflect.Value, error)

type Resources

type Resources struct {
	*Level
	// contains filtered or unexported fields
}

func New

func New() *Resources

func (*Resources) GetObject

func (r *Resources) GetObject(key string) Entity

func (*Resources) LoadDir

func (r *Resources) LoadDir(folder string) (*core.Directory, error)

func (*Resources) LoadFile

func (r *Resources) LoadFile(f string) error

Jump to

Keyboard shortcuts

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