Versions in this module Expand all Collapse all v1 v1.0.1 Jan 10, 2021 Changes in this version + const MetaMemoryboxKey v1.0.0 May 27, 2020 Changes in this version + const MetaFileMaxSize + const MetaFilePrefix + const MetaKey + const MetaKeyFileName + const MetaKeyImport + const MetaKeyImportSet + const MetaKeyImportSource + func DataNameFrom(source string) string + func IsMetaFileName(source string) bool + func MetaNameFrom(source string) string + func Sha256(source io.Reader) (string, int64, error) + func ValidateMeta(bytes []byte) error + type File struct + Body io.Reader + LastModified time.Time + Meta *Meta + Name string + Size int64 + Source string + func New(source string, body io.ReadSeeker, lastModified time.Time, hash HashFn) (*File, error) + func NewSha256(source string, body io.ReadSeeker, lastModified time.Time) (*File, error) + func NewStub(name string, size int64, lastModified time.Time) *File + func (f *File) Close() error + func (f *File) CurrentWith(other *File) bool + func (f *File) Read(p []byte) (int, error) + type HashFn func(io.Reader) (string, int64, error) + type List []*File + func (l List) ByName() map[string]*File + func (l List) Data() List + func (l List) Filter(fn func(*File) bool) List + func (l List) Invalid() List + func (l List) Len() int + func (l List) Less(i, j int) bool + func (l List) Meta() List + func (l List) Names() []string + func (l List) Swap(i, j int) + func (l List) Valid() List + type Meta []byte + func NewMetaFromFile(file *File) *Meta + func (m *Meta) Delete(key string) + func (m *Meta) Get(key string) interface{} + func (m *Meta) Merge(data string) error + func (m *Meta) Set(key string, value string) + func (m *Meta) String() string + func (m Meta) DataFileName() string + func (m Meta) Source() string