Skip to content

Commit

Permalink
Merge pull request #1 from v8platform/fix
Browse files Browse the repository at this point in the history
вернул типы к первоначальному виду
  • Loading branch information
khorevaa authored Apr 28, 2021
2 parents 218745c + f30609d commit 6492e2d
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 45 deletions.
2 changes: 1 addition & 1 deletion classes/catalog.go → catalog.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package classes
package mdclasses

import "encoding/xml"

Expand Down
77 changes: 37 additions & 40 deletions configuration.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package mdclasses
import (
"encoding/xml"
"github.com/khorevaa/logos"
"github.com/v8platform/mdclasses/classes"
)

var log = logos.New("github.com/v8platform/mdclasses").Sugar()
Expand Down Expand Up @@ -83,46 +82,44 @@ type Configuration struct {
Subsystems []Subsystem `xml:"-"`
SubsystemsNames []string `xml:"subsystems"`

StyleItems []string `xml:"styleItems"`
CommonPictures []string `xml:"commonPictures"`
SessionParameters []string `xml:"sessionParameters"`
Roles []string `xml:"roles"`
CommonTemplates []string `xml:"commonTemplates"`
FilterCriteria []string `xml:"filterCriteria"`
CommonModules []string `xml:"commonModules"`
CommonAttributes []string `xml:"commonAttributes"`
ExchangePlans []string `xml:"exchangePlans"`
XDTOPackages []string `xml:"xDTOPackages"`
WebServices []string `xml:"webServices"`
HttpServices []string `xml:"httpServices"`
WsReferences []string `xml:"wsReferences"`
EventSubscriptions []string `xml:"eventSubscriptions"`
ScheduledJobs []string `xml:"scheduledJobs"`
SettingsStorages []string `xml:"settingsStorages"`
FunctionalOptions []string `xml:"functionalOptions"`
FunctionalOptionsParameters []string `xml:"functionalOptionsParameters"`
DefinedTypes []string `xml:"definedTypes"`
CommonCommands []string `xml:"commonCommands"`
CommandGroups []string `xml:"commandGroups"`
Constants []string `xml:"constants"`
CommonForms []string `xml:"commonForms"`
CatalogsNames []string `xml:"catalogs"`
Catalogs []classes.Catalog `xml:"-"`
Documents []string `xml:"documents"`
DocumentNumerators []string `xml:"documentNumerators"`
DocumentJournals []string `xml:"documentJournals"`
Enums []string `xml:"enums"`
Reports []string `xml:"reports"`
DataProcessors []string `xml:"dataProcessors"`
InformationRegisters []string `xml:"informationRegisters"`
AccumulationRegisters []string `xml:"accumulationRegisters"`
ChartsOfCharacteristicTypes []string `xml:"chartsOfCharacteristicTypes"`
BusinessProcesses []string `xml:"businessProcesses"`
Tasks []string `xml:"tasks"`
StyleItems []string `xml:"styleItems"`
CommonPictures []string `xml:"commonPictures"`
SessionParameters []string `xml:"sessionParameters"`
Roles []string `xml:"roles"`
CommonTemplates []string `xml:"commonTemplates"`
FilterCriteria []string `xml:"filterCriteria"`
CommonModules []string `xml:"commonModules"`
CommonAttributes []string `xml:"commonAttributes"`
ExchangePlans []string `xml:"exchangePlans"`
XDTOPackages []string `xml:"xDTOPackages"`
WebServices []string `xml:"webServices"`
HttpServices []string `xml:"httpServices"`
WsReferences []string `xml:"wsReferences"`
EventSubscriptions []string `xml:"eventSubscriptions"`
ScheduledJobs []string `xml:"scheduledJobs"`
SettingsStorages []string `xml:"settingsStorages"`
FunctionalOptions []string `xml:"functionalOptions"`
FunctionalOptionsParameters []string `xml:"functionalOptionsParameters"`
DefinedTypes []string `xml:"definedTypes"`
CommonCommands []string `xml:"commonCommands"`
CommandGroups []string `xml:"commandGroups"`
Constants []string `xml:"constants"`
CommonForms []string `xml:"commonForms"`
CatalogsNames []string `xml:"catalogs"`
Catalogs []Catalog `xml:"-"`
Documents []string `xml:"documents"`
DocumentNumerators []string `xml:"documentNumerators"`
DocumentJournals []string `xml:"documentJournals"`
Enums []string `xml:"enums"`
Reports []string `xml:"reports"`
DataProcessors []string `xml:"dataProcessors"`
InformationRegisters []string `xml:"informationRegisters"`
AccumulationRegisters []string `xml:"accumulationRegisters"`
ChartsOfCharacteristicTypes []string `xml:"chartsOfCharacteristicTypes"`
BusinessProcesses []string `xml:"businessProcesses"`
Tasks []string `xml:"tasks"`
}

const ConfigurationFile = "Configuration.mdo"

func (conf *Configuration) Unpack(cfg UnpackConfig) error {

for _, name := range conf.SubsystemsNames {
Expand All @@ -138,7 +135,7 @@ func (conf *Configuration) Unpack(cfg UnpackConfig) error {

for _, name := range conf.CatalogsNames {

value := classes.Catalog{}
value := Catalog{}
err := Unpack(cfg.WithName(name, "Catalog"), &value)
if err != nil {
return err
Expand Down
2 changes: 1 addition & 1 deletion classes/document.go → document.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package classes
package mdclasses

type Document struct {
}
5 changes: 2 additions & 3 deletions subsystem.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package mdclasses

import (
"encoding/xml"
"github.com/v8platform/mdclasses/classes"
"strings"
)

Expand Down Expand Up @@ -68,9 +67,9 @@ func objectByType(contentType string) interface{} {
case "businessprocess":
return nil
case "catalog":
return &classes.Catalog{}
return &Catalog{}
case "document":
return &classes.Document{}
return &Document{}
default:
log.Warnf("Unknown content type: %s", contentType)
}
Expand Down

0 comments on commit 6492e2d

Please sign in to comment.