Versions in this module Expand all Collapse all v1 v1.0.1 Jul 11, 2023 Changes in this version + var ErrDataSetNotFound = errors.New("data set not found") + func FindUUID(path string) string + func IsContactPath(path string) bool + func IsExternalDoc(path string) bool + func IsFlowPath(path string) bool + func IsFlowPropertyPath(path string) bool + func IsMethodPath(path string) bool + func IsModelPath(path string) bool + func IsProcessPath(path string) bool + func IsSourcePath(path string) bool + func IsUnitGroupPath(path string) bool + type Category struct + Childs []Category + ID string + Name string + type CategoryList struct + Categories []Category + DataType string + type CategorySystem struct + CategoryLists []CategoryList + Name string + XMLName xml.Name + func ReadCategoryFile(filePath string) (*CategorySystem, error) + type Class struct + ID string + Level int + Name string + type Classification struct + Classes []Class + Name string + func (c *Classification) GetClass(level int) *Class + type CommonDataEntry struct + DataFormats []Ref + TimeStamp string + type CommonPublication struct + URI string + Version string + type Compartment struct + Level int + Name string + type Contact struct + DataEntry *CommonDataEntry + Info *ContactInfo + Publication *CommonPublication + XMLName xml.Name + func ReadContact(data []byte) (*Contact, error) + func ReadContactFile(filePath string) (*Contact, error) + func (c *Contact) UUID() string + func (c *Contact) Version() string + type ContactInfo struct + Address LangString + Classifications []Classification + Comment LangString + Email string + Name LangString + ShortName LangString + URL string + UUID string + type DataSet interface + UUID func() string + Version func() string + type DataSetType int + const Asset + const ContactDataSet + const ExternalDoc + const FlowDataSet + const FlowPropertyDataSet + const MethodDataSet + const ModelDataSet + const ProcessDataSet + const SourceDataSet + const UnitGroupDataSet + func DataSetTypes() []DataSetType + func Type(ds DataSet) DataSetType + func (t DataSetType) Folder() string + func (t DataSetType) String() string + type DownstreamLink struct + InputFlow string + IsDominant *bool + Location string + ProcessID int + type Exchange struct + Direction string + Flow *Ref + InternalID int + Location string + MeanAmount float64 + ResultingAmount float64 + Variable string + type Flow struct + DataEntry *CommonDataEntry + FlowProperties []FlowPropertyRef + Info *FlowInfo + Publication *CommonPublication + QRef int + Type string + XMLName xml.Name + func ReadFlow(data []byte) (*Flow, error) + func ReadFlowFile(filePath string) (*Flow, error) + func (f *Flow) FlowType() FlowType + func (f *Flow) ReferenceFlowProperty() *FlowPropertyRef + func (f *Flow) UUID() string + func (f *Flow) Version() string + type FlowInfo struct + CAS string + Classifications []Classification + Comment LangString + Compartments []Compartment + Name *FlowName + Synonyms LangString + UUID string + type FlowName struct + BaseName LangString + MixAndLocation LangString + Properties LangString + Treatment LangString + type FlowProperty struct + DataEntry *CommonDataEntry + Info *FlowPropertyInfo + Publication *CommonPublication + UnitGroup *Ref + XMLName xml.Name + func ReadFlowProperty(data []byte) (*FlowProperty, error) + func ReadFlowPropertyFile(filePath string) (*FlowProperty, error) + func (fp *FlowProperty) UUID() string + func (fp *FlowProperty) Version() string + type FlowPropertyInfo struct + Classifications []Classification + Comment LangString + Name LangString + UUID string + type FlowPropertyRef struct + Comment LangString + FlowProperty *Ref + ID int + Mean float64 + type FlowType int + const ElementaryFlow + const OtherFlow + const ProductFlow + const WasteFlow + func (ft FlowType) String() string + type ImpactFactor struct + DataDerivation string + Direction string + Flow *Ref + Location string + MeanValue float64 + type LangString []LangStringItem + func (ls LangString) Default() string + func (ls LangString) Get(lang string) string + type LangStringItem struct + Lang string + Value string + type MemStore struct + func NewMemStore() *MemStore + func (store *MemStore) Contact(id string) *Contact + func (store *MemStore) Contacts() []*Contact + func (store *MemStore) EachContact(fn func(*Contact) bool) + func (store *MemStore) EachFlow(fn func(*Flow) bool) + func (store *MemStore) EachFlowProperty(fn func(*FlowProperty) bool) + func (store *MemStore) EachMethod(fn func(*Method) bool) + func (store *MemStore) EachModel(fn func(*Model) bool) + func (store *MemStore) EachProcess(fn func(*Process) bool) + func (store *MemStore) EachSource(fn func(*Source) bool) + func (store *MemStore) EachUnitGroup(fn func(*UnitGroup) bool) + func (store *MemStore) FillFromZip(reader *ZipReader) error + func (store *MemStore) Flow(id string) *Flow + func (store *MemStore) FlowProperties() []*FlowProperty + func (store *MemStore) FlowProperty(id string) *FlowProperty + func (store *MemStore) Flows() []*Flow + func (store *MemStore) Method(id string) *Method + func (store *MemStore) Methods() []*Method + func (store *MemStore) Model(id string) *Model + func (store *MemStore) Models() []*Model + func (store *MemStore) Process(id string) *Process + func (store *MemStore) Processes() []*Process + func (store *MemStore) Source(id string) *Source + func (store *MemStore) Sources() []*Source + func (store *MemStore) UnitGroup(id string) *UnitGroup + func (store *MemStore) UnitGroups() []*UnitGroup + type Method struct + DataEntry *CommonDataEntry + Factors []ImpactFactor + Info *MethodInfo + Publication *CommonPublication + RefQuantity *Ref + XMLName xml.Name + func ReadMethod(data []byte) (*Method, error) + func ReadMethodFile(filePath string) (*Method, error) + func (m *Method) UUID() string + func (m *Method) Version() string + type MethodInfo struct + Comment LangString + ExternalDocs []Ref + ImpactCategory string + ImpactIndicator string + Methodology string + Name LangString + UUID string + type Model struct + DataEntry *CommonDataEntry + Info *ProcessInfo + Processes []ProcessInstance + Publication *CommonPublication + QRef *int + XMLName xml.Name + func ReadModel(data []byte) (*Model, error) + func ReadModelFile(filePath string) (*Model, error) + func (m *Model) FindProviders(pi *ProcessInstance) []*ProcessInstance + func (m *Model) FullName(lang string) string + func (m *Model) RefProcess() *ProcessInstance + func (m *Model) UUID() string + func (m *Model) Version() string + type ModelParameter struct + Name string + Value float64 + type Parameter struct + Comment LangString + Formula string + Name string + SD95 float64 + Value float64 + type Process struct + DataEntry *CommonDataEntry + Exchanges []Exchange + Info *ProcessInfo + Location *ProcessLocation + Parameters []Parameter + Publication *CommonPublication + QRefs []int + XMLName xml.Name + func ReadProcess(data []byte) (*Process, error) + func ReadProcessFile(filePath string) (*Process, error) + func (p *Process) FullName(lang string) string + func (p *Process) RefFlows() []*Exchange + func (p *Process) UUID() string + func (p *Process) Version() string + type ProcessConnection struct + IsDominant *bool + Links []DownstreamLink + OutputFlow string + type ProcessInfo struct + Classifications []Classification + Comment LangString + Name *ProcessName + Synonyms LangString + UUID string + type ProcessInstance struct + Connections []ProcessConnection + InternalID int + MultiplicationFactor float64 + Parameters []ModelParameter + Process *Ref + ScalingFactor *float64 + type ProcessLocation struct + Code string + Description LangString + LatLong string + type ProcessName struct + BaseName LangString + MixAndLocation LangString + Properties LangString + Treatment LangString + type Ref struct + Name LangString + Type string + URI string + UUID string + Version string + func (ref *Ref) DataSetType() DataSetType + type Source struct + DataEntry *CommonDataEntry + Info *SourceInfo + Publication *CommonPublication + XMLName xml.Name + func ReadSource(data []byte) (*Source, error) + func ReadSourceFile(filePath string) (*Source, error) + func (s *Source) UUID() string + func (s *Source) Version() string + type SourceInfo struct + Citation string + Classifications []Classification + PublicationType string + ShortName LangString + UUID string + type Unit struct + Factor float64 + InternalID int + Name string + type UnitGroup struct + DataEntry *CommonDataEntry + Info *UnitGroupInfo + Publication *CommonPublication + QRef int + Units []Unit + XMLName xml.Name + func ReadUnitGroup(data []byte) (*UnitGroup, error) + func ReadUnitGroupFile(filePath string) (*UnitGroup, error) + func (ug *UnitGroup) ReferenceUnit() *Unit + func (ug *UnitGroup) UUID() string + func (ug *UnitGroup) Version() string + type UnitGroupInfo struct + Classifications []Classification + Comment LangString + Name LangString + UUID string + type ZipFile struct + func (f *ZipFile) Path() string + func (f *ZipFile) Read() ([]byte, error) + func (f *ZipFile) ReadContact() (*Contact, error) + func (f *ZipFile) ReadFlow() (*Flow, error) + func (f *ZipFile) ReadFlowProperty() (*FlowProperty, error) + func (f *ZipFile) ReadMethod() (*Method, error) + func (f *ZipFile) ReadModel() (*Model, error) + func (f *ZipFile) ReadProcess() (*Process, error) + func (f *ZipFile) ReadSource() (*Source, error) + func (f *ZipFile) ReadUnitGroup() (*UnitGroup, error) + func (f *ZipFile) Type() DataSetType + type ZipReader struct + func NewZipReader(filePath string) (*ZipReader, error) + func (r *ZipReader) Close() error + func (r *ZipReader) EachContact(fn func(*Contact) bool) error + func (r *ZipReader) EachFile(fn func(f *ZipFile) bool) + func (r *ZipReader) EachFlow(fn func(*Flow) bool) error + func (r *ZipReader) EachFlowProperty(fn func(*FlowProperty) bool) error + func (r *ZipReader) EachMethod(fn func(*Method) bool) error + func (r *ZipReader) EachModel(fn func(*Model) bool) error + func (r *ZipReader) EachProcess(fn func(*Process) bool) error + func (r *ZipReader) EachSource(fn func(*Source) bool) error + func (r *ZipReader) EachUnitGroup(fn func(*UnitGroup) bool) error + func (r *ZipReader) FindDataSet(dsType DataSetType, uuid string) *ZipFile + func (r *ZipReader) Map(w *ZipWriter, fn func(file *ZipFile) (string, []byte)) + type ZipWriter struct + func NewZipWriter(filePath string) (*ZipWriter, error) + func (w *ZipWriter) Close() error + func (w *ZipWriter) Path(ds DataSet) string + func (w *ZipWriter) Write(path string, data []byte) error + func (w *ZipWriter) WriteDataSet(ds DataSet) error + func (w *ZipWriter) WriteFile(f *ZipFile) error