assets

package
v5.5.2+incompatible Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2018 License: GPL-3.0 Imports: 7 Imported by: 4

README

How to create and update default chain config binary assets from JSON config defaults.

# Install program to include external JSON files as binary resources
go get github.com/omeid/go-resources/cmd/resources
# Create dir
mkdir config/assets
# Compile JSON to assets package (avoid recompilation with the cache using
package)
~/gocode/src/github.com/ethereumproject/go-ethereum resourceful-json-configs *% ⟠ resources -fmt -declare -var=DEFAULTS -package=assets -output=core/assets/assets.go core/config/*.json core/config/*.csv

When using Makefile, changes in .json and .csv files will trigger rebuilding of binary assets.

Documentation

Overview

Package assets is generated by github.com/omeid/go-resources

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type File

type File struct {
	*bytes.Reader
	// contains filtered or unexported fields
}

File implements http.File

func (*File) Close

func (f *File) Close() error

Close is a noop-closer.

func (*File) Readdir

func (f *File) Readdir(count int) ([]os.FileInfo, error)

Readdir implements http.File.Readdir

func (*File) Stat

func (f *File) Stat() (os.FileInfo, error)

Stat implements http.Stat.Readdir

type FileInfo

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

FileInfo implements the os.FileInfo interface.

func (*FileInfo) IsDir

func (f *FileInfo) IsDir() bool

IsDir implements os.FileInfo.IsDir

func (*FileInfo) ModTime

func (f *FileInfo) ModTime() time.Time

ModTime implements os.FileInfo.ModTime

func (*FileInfo) Mode

func (f *FileInfo) Mode() os.FileMode

Mode implements os.FileInfo.Mode

func (*FileInfo) Name

func (f *FileInfo) Name() string

Name implements os.FileInfo.Name

func (*FileInfo) Readdir

func (f *FileInfo) Readdir(count int) ([]os.FileInfo, error)

Readdir implements os.FileInfo.Readdir

func (*FileInfo) Size

func (f *FileInfo) Size() int64

Size implements os.FileInfo.Size

func (*FileInfo) Sys

func (f *FileInfo) Sys() interface{}

Sys returns the underlying value.

type FileSystem

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

FileSystem is an http.FileSystem implementation.

var DEFAULTS *FileSystem

func (*FileSystem) Open

func (fs *FileSystem) Open(name string) (http.File, error)

Open implements http.FileSystem.Open

func (*FileSystem) String

func (fs *FileSystem) String(name string) (string, bool)

String returns the content of the file as string.

Jump to

Keyboard shortcuts

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