Versions in this module Expand all Collapse all v0 v0.1.1 Oct 6, 2021 v0.1.0 Feb 22, 2020 Changes in this version + const AttributeETag + const AttributeEncoding + const AttributeExpires + const AttributeLabel + const AttributeLastModified + const AttributeLength + const AttributeType + const EncodingGZIP + const EncodingIdentity + const InfoRevision + const TypeApplicationJSON + const TypeApplicationPDF + const TypeApplicationXML + const TypeImageJPEG + const TypeImagePNG + const TypeImageSVG + const TypeTextCSV + const TypeTextHTML + const TypeTextPlain + func LoadJSON(a *Archive, id string, v interface{}) error + func LoadXML(a *Archive, id string, v interface{}) error + type Archive struct + func Open(dsn string) (*Archive, error) + func (a *Archive) Attributes(id string) (Attributes, error) + func (a *Archive) Close() error + func (a *Archive) Delete(id string) error + func (a *Archive) ExportFile(id string, file string) error + func (a *Archive) ImportFile(id string, file string) error + func (a *Archive) List() ([]Descriptor, error) + func (a *Archive) ListWithPrefix(prefix string) ([]Descriptor, error) + func (a *Archive) Load(id string) (Resource, error) + func (a *Archive) Revision() int + func (a *Archive) Store(r Resource) error + type Attributes map[string]string + func ParseAttributes(data string) (Attributes, error) + func (as Attributes) Clone() Attributes + func (as Attributes) Entries() Entries + func (as Attributes) String() string + type Descriptor struct + Attributes Attributes + ID string + type Entries []Entry + func (s Entries) Len() int + func (s Entries) Less(i, j int) bool + func (s Entries) Swap(i, j int) + type Entry struct + Key string + Value string + type Resource struct + Attributes Attributes + Data []byte + ID string + func GenericJSON(id string, v interface{}) Resource + func GenericXML(id string, v interface{}) (Resource, error) + func JPEG(id string, data []byte) Resource + func JSON(id string, t string, v interface{}) Resource + func MakeResource(id string, as Attributes, data []byte) Resource + func TextPlain(id string, text string) Resource + func XML(id string, t string, v interface{}) (Resource, error) + func (r Resource) String() string