assetbindata

package
v0.0.0-...-4656ec9 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2022 License: MIT Imports: 7 Imported by: 0

README

Build

assetmanager/assetbindata/example
▶ sh build.sh
main init
AssetBindData is map[]
work with files
generateAsset called
map[index.html:[105 110 100 101 120 46 104 116 109 108] index.php:[105 110 100 101 120 46 112 104 112] main.tpl:[109 97 105 110 46 116 112 108]]

Run build file

assetmanager/assetbindata/example/build 
▶ ./example
assetgenerated
main init
AssetBindData is map[mainAsset:0xc42000a060]
work with binary
map[index.html:[105 110 100 101 120 46 104 116 109 108] index.php:[105 110 100 101 120 46 112 104 112] main.tpl:[109 97 105 110 46 116 112 108]]

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GeneratedCache = make(map[string]*assetmanager.AssetManager)

GeneratedCache assetmanager

Functions

func Compress

func Compress(asset *assetmanager.AssetManager) []byte

Compress assetmanager

func DecodeJSON

func DecodeJSON(d []byte, asset *assetmanager.AssetManager)

DecodeJSON to assetmanager

func EncodeJSON

func EncodeJSON(asset *assetmanager.AssetManager) []byte

EncodeJSON to assetmanager

func GUnzipData

func GUnzipData(data []byte) (resData []byte, err error)

GUnzipData file

func GZipData

func GZipData(data []byte) (compressedData []byte, err error)

GZipData file

func Generate

func Generate(opt GenerateOPT)

Generate file

func MakeWritable

func MakeWritable(data []byte) *bytes.Buffer

MakeWritable data

Types

type GenerateOPT

type GenerateOPT struct {
	File      string
	Namespace string
	Asset     *assetmanager.AssetManager
	CacheKey  string
}

GenerateOPT options

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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