Documentation ¶
Index ¶
- func LoadXMLReadList(path string)
- type ByExecutionOrder
- type Definition
- type Driver
- type DriverFile
- func (d *DriverFile) APIType() string
- func (d *DriverFile) GetAuxXML() string
- func (d *DriverFile) GetDummyLookup() *etree.Element
- func (d *DriverFile) GetInstanceTag() string
- func (d *DriverFile) GetSplitWriteFilesPath(folder string) ([]string, error)
- func (d *DriverFile) GetXML() string
- func (d *DriverFile) GetXMLType() string
- func (d *DriverFile) InitXML(action, folder string) error
- func (d *DriverFile) NeedAuxXML() bool
- func (d *DriverFile) NeedPackageTransform() bool
- func (d *DriverFile) RestAPI() bool
- func (d *DriverFile) RunAuxXML(env *EnvType, soapFunc util.Soap) error
- func (d *DriverFile) RunXML(action, sourceFolder string, environments *Environments, soapFunc util.Soap) error
- func (d *DriverFile) RunXogXML(env *EnvType, soapFunc util.Soap) error
- func (d *DriverFile) SetXML(xml string)
- func (d *DriverFile) TagCDATA() (string, string)
- func (d *DriverFile) Write(folder string)
- type DriverTypesPattern
- type Element
- type EnvType
- type Environments
- type FileReplace
- type Filter
- type HeaderArg
- type MatchExcel
- type Output
- type Package
- type Section
- type SectionField
- type SectionLink
- type Version
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadXMLReadList ¶
func LoadXMLReadList(path string)
LoadXMLReadList loads the list of different types of xog read so it can be used during execution
Types ¶
type ByExecutionOrder ¶
type ByExecutionOrder []DriverFile
ByExecutionOrder used to order the drivers according to the users defined sequence
func (ByExecutionOrder) Len ¶
func (d ByExecutionOrder) Len() int
func (ByExecutionOrder) Less ¶
func (d ByExecutionOrder) Less(i, j int) bool
func (ByExecutionOrder) Swap ¶
func (d ByExecutionOrder) Swap(i, j int)
type Definition ¶
type Definition struct { Action string `xml:"action,attr"` Description string `xml:"description,attr"` Default string `xml:"default,attr"` TransformTypes string `xml:"transformTypes"` From string `xml:"from"` To string `xml:"to"` Value string }
Definition defines the attributes to load the version definitions xml tag
type Driver ¶
type Driver struct { Version string Files []DriverFile PackageDriver bool FilePath string Info os.FileInfo Folder string AutomaticWrite bool }
Driver defines the file with a list of drivers to run
func (*Driver) MaxTypeNameLen ¶
MaxTypeNameLen returns the largest size, number of characters in the type name, from the driver's list
type DriverFile ¶
type DriverFile struct { Code string `xml:"code,attr"` Path string `xml:"path,attr"` Type string `xml:"type,attr"` ID string `xml:"id,attr"` TargetID string `xml:"targetId,attr"` ObjCode string `xml:"objectCode,attr"` ObjType string `xml:"objectType,attr"` IgnoreReading bool `xml:"ignoreReading,attr"` SourcePartition string `xml:"sourcePartition,attr"` TargetPartition string `xml:"targetPartition,attr"` PartitionModel string `xml:"partitionModel,attr"` CopyPermissions string `xml:"copyPermissions,attr"` Template string `xml:"template,attr"` ExcelFile string `xml:"excel,attr"` ExcelStartRow string `xml:"startRow,attr"` InstanceTag string `xml:"instance,attr"` ExportToExcel bool `xml:"exportToExcel,attr"` OnlyStructure bool `xml:"onlyStructure,attr"` PackageTransform bool `xml:"packageTransform,attr"` InstancesPerFile int `xml:"instancesPerFile,attr"` Action string `xml:"action,attr"` NSQL string `xml:"nsql"` Sections []Section `xml:"section"` Elements []Element `xml:"element"` Replace []FileReplace `xml:"replace"` MatchExcel []MatchExcel `xml:"match"` Filters []Filter `xml:"filter"` HeaderArgs []HeaderArg `xml:"args"` ExecutionOrder int // contains filtered or unexported fields }
DriverFile defines the fields to manipulate the xog xml
func (*DriverFile) APIType ¶
func (d *DriverFile) APIType() string
APIType returns the type without api prefix
func (*DriverFile) GetAuxXML ¶
func (d *DriverFile) GetAuxXML() string
GetAuxXML return the auxiliary xog xml
func (*DriverFile) GetDummyLookup ¶
func (d *DriverFile) GetDummyLookup() *etree.Element
GetDummyLookup returns the xml that defines a simple lookup to avoid cross dependencies between objects and their attributes
func (*DriverFile) GetInstanceTag ¶
func (d *DriverFile) GetInstanceTag() string
GetInstanceTag returns the instance tag according to the type of driver
func (*DriverFile) GetSplitWriteFilesPath ¶
func (d *DriverFile) GetSplitWriteFilesPath(folder string) ([]string, error)
GetSplitWriteFilesPath returns a list with write files paths when an instance xog xml is split
func (*DriverFile) GetXMLType ¶
func (d *DriverFile) GetXMLType() string
GetXMLType returns the constant value according to the type of driver
func (*DriverFile) InitXML ¶
func (d *DriverFile) InitXML(action, folder string) error
InitXML loads the properly xog xml to update the environment
func (*DriverFile) NeedAuxXML ¶
func (d *DriverFile) NeedAuxXML() bool
NeedAuxXML validates if the driver needs to use an auxiliary xog xml
func (*DriverFile) NeedPackageTransform ¶
func (d *DriverFile) NeedPackageTransform() bool
NeedPackageTransform validates if a package driver needs to be transformed before install to an environment
func (*DriverFile) RestAPI ¶
func (d *DriverFile) RestAPI() bool
RestAPI validates if the driver uses the rest api
func (*DriverFile) RunAuxXML ¶
func (d *DriverFile) RunAuxXML(env *EnvType, soapFunc util.Soap) error
RunAuxXML executes a soap call to the auxiliary xog xml
func (*DriverFile) RunXML ¶
func (d *DriverFile) RunXML(action, sourceFolder string, environments *Environments, soapFunc util.Soap) error
RunXML executes a soap call to the properly xml (principal or auxiliary) depending on the action and the driver type
func (*DriverFile) RunXogXML ¶
func (d *DriverFile) RunXogXML(env *EnvType, soapFunc util.Soap) error
RunXogXML executes a soap call to the principal xog xml
func (*DriverFile) SetXML ¶
func (d *DriverFile) SetXML(xml string)
SetXML fills the variable with the xog xml
func (*DriverFile) TagCDATA ¶
func (d *DriverFile) TagCDATA() (string, string)
TagCDATA returns the correct tags where should be inserted the CDATA depending on the driver type
func (*DriverFile) Write ¶
func (d *DriverFile) Write(folder string)
Write saves to the file system the content of the principal xog xml
type DriverTypesPattern ¶
type DriverTypesPattern struct { Version string `xml:"version,attr"` AutomaticWrite bool `xml:"autoWrite,attr"` Files []DriverFile `xml:"file"` Objects []DriverFile `xml:"object"` Views []DriverFile `xml:"view"` Processes []DriverFile `xml:"process"` Lookups []DriverFile `xml:"lookup"` Portlets []DriverFile `xml:"portlet"` Queries []DriverFile `xml:"query"` Pages []DriverFile `xml:"page"` Menus []DriverFile `xml:"menu"` CustomObjectInstances []DriverFile `xml:"customObjectInstance"` ResourceClassInstances []DriverFile `xml:"resourceClassInstance"` WipClassInstances []DriverFile `xml:"wipClassInstance"` InvestmentClassInstances []DriverFile `xml:"investmentClassInstance"` TransactionClassInstances []DriverFile `xml:"transactionClassInstance"` ResourceInstances []DriverFile `xml:"resourceInstance"` UserInstances []DriverFile `xml:"userInstance"` ProjectInstances []DriverFile `xml:"projectInstance"` IdeaInstances []DriverFile `xml:"ideaInstance"` ApplicationInstances []DriverFile `xml:"applicationInstance"` AssetInstances []DriverFile `xml:"assetInstance"` OtherInvestmentInstances []DriverFile `xml:"otherInvestmentInstance"` ProductInstances []DriverFile `xml:"productInstance"` ServiceInstances []DriverFile `xml:"serviceInstance"` Migrations []DriverFile `xml:"migration"` BenefitPlanInstances []DriverFile `xml:"benefitPlanInstance"` BudgetPlanInstances []DriverFile `xml:"budgetPlanInstance"` CategoryInstances []DriverFile `xml:"categoryInstance"` ChangeInstances []DriverFile `xml:"changeInstance"` ChargeCodeInstances []DriverFile `xml:"chargeCodeInstance"` CompanyClassInstances []DriverFile `xml:"companyClassInstance"` CostPlanInstances []DriverFile `xml:"costPlanInstance"` CostPlusCodeInstances []DriverFile `xml:"costPlusCodeInstance"` DepartmentInstances []DriverFile `xml:"departmentInstance"` EntityInstances []DriverFile `xml:"entityInstance"` GroupInstances []DriverFile `xml:"groupInstance"` IncidentInstances []DriverFile `xml:"incidentInstance"` IssueInstances []DriverFile `xml:"issueInstance"` OBSInstances []DriverFile `xml:"obsInstance"` PortfolioInstances []DriverFile `xml:"portfolioInstance"` ProgramInstances []DriverFile `xml:"programInstance"` ReleaseInstances []DriverFile `xml:"releaseInstance"` ReleasePlanInstances []DriverFile `xml:"releasePlanInstance"` RequirementInstances []DriverFile `xml:"requirementInstance"` RequisitionInstances []DriverFile `xml:"requisitionInstance"` RiskInstances []DriverFile `xml:"riskInstance"` RoleInstances []DriverFile `xml:"roleInstance"` ThemeInstances []DriverFile `xml:"themeInstance"` VendorInstances []DriverFile `xml:"vendorInstance"` DocumentInstances []DriverFile `xml:"documentInstance"` APIBlueprints []DriverFile `xml:"api.blueprint"` APITeams []DriverFile `xml:"api.team"` }
DriverTypesPattern stores each driver type in an array to make it easier to read the xml file
type Element ¶
type Element struct { Type string `xml:"type,attr"` XPath string `xml:"xpath,attr"` Code string `xml:"code,attr"` Action string `xml:"action,attr"` InsertBefore string `xml:"insertBefore,attr"` Attribute string `xml:"attribute,attr"` Value string `xml:"value,attr"` XMLString string `xml:"xml"` }
Element defines the fields to remove and insert elements from the xog xml file
type EnvType ¶
type EnvType struct { Name string `xml:"name,attr"` URL string `xml:"endpoint"` Username string `xml:"username"` Password string `xml:"password"` Proxy string `xml:"proxy"` Cookie string `xml:"cookie"` Session string AuthToken string Copy bool RequestLogin bool }
EnvType defines an environment attributes
type Environments ¶
Environments defines a list of available environments
func LoadEnvironmentsList ¶
func LoadEnvironmentsList(path string) (*Environments, error)
LoadEnvironmentsList loads the list of user-defined environments to use when executing xog
func (*Environments) CopyTargetFromSource ¶
func (e *Environments) CopyTargetFromSource()
CopyTargetFromSource copy the data from source to target environment
type FileReplace ¶
FileReplace defines the fields to replace strings on the xog xml file
type Filter ¶
type Filter struct { Criteria string `xml:"criteria,attr"` Name string `xml:"name,attr"` Custom bool `xml:"customAttribute,attr"` Value string `xml:",chardata"` }
Filter defines the fields to filter the XOG read
type MatchExcel ¶
type MatchExcel struct { Col int `xml:"col,attr"` XPath string `xml:"xpath,attr"` AttributeName string `xml:"attribute,attr"` MultiValued bool `xml:"multiValued,attr"` RemoveIfNull bool `xml:"removeIfNull,attr"` Separator string `xml:"separator,attr"` }
MatchExcel defines the fields to map the cols on an excel file to attributes and data on the xog xml
type Package ¶
type Package struct { Name string `xml:"name,attr"` Folder string `xml:"folder,attr"` DriverFileName string `xml:"driver,attr"` Versions []Version `xml:"version"` }
Package defines the attributes to load the package xml file
type Section ¶
type Section struct { Code string `xml:"code,attr"` SourcePosition string `xml:"sourcePosition,attr"` TargetPosition string `xml:"targetPosition,attr"` Action string `xml:"action,attr"` Links []SectionLink `xml:"link"` Fields []SectionField `xml:"field"` }
Section defines the fields to describe a section on a view
type SectionField ¶
type SectionField struct { Code string `xml:"code,attr"` Column string `xml:"column,attr"` Remove bool `xml:"remove,attr"` InsertBefore string `xml:"insertBefore,attr"` }
SectionField defines the fields for an attribute on a section attribute
type SectionLink ¶
type SectionLink struct {
Code string `xml:"code,attr"`
}
SectionLink defines the fields for a link on a view section