pdiutil

package module
v1.9.16 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 7, 2019 License: MIT Imports: 21 Imported by: 0

README

SAP PDI Util Tools

CircleCI GitHub tag (latest SemVer)

Docker Automated build Size

Cli for SAP PDI.

Latest Build

Just download latest binary files from the Github Release page

Features

  • list all solutions
  • static check & export results to excel
  • download current sources in solution
  • download assembled package (in history)
  • view single file history
  • activate, assemble and download assembled package
  • create patch solution
  • check all Work Center Views have been assigned to WC
  • deploy solution
  • static text spell check
  • CI/CD Jenkinsfile provided
  • code ast parser (in progress)

Help

run with --help to show command help

Almost all options can be configured in the system environment variables.

To Do

  • Documents

CHANGELOG

LICENSE

Documentation

Overview

Package pdiutil provides APIs of SAP PDI

Just create a new pdi client to start your operations

pdiClient, err := pdiutil.NewPDIClient(username, password, hostname, release)

Index

Constants

View Source
const (
	// DefaultDownloadConcurrnet value
	//
	// used to limit the download concurrent
	DefaultDownloadConcurrnet = 20
	// SuffixWCV
	//
	// Work Center View suffix
	SuffixWCV = "WCVIEW.uiwocview"
	// SuffixWoC
	//
	// Work Center suffix
	SuffixWoC = "WCF.uiwoc"
)
View Source
const (
	// Successful
	Successful OverviewStatus = "Successful"
	// Warning
	Warning = "Warning"
	// FatalError
	FatalError = "Fatal Error"
)
View Source
const DefaultPackageCheckInterval = 20

DefaultPackageCheckInterval for set the default interval for status checking unit is second

View Source
const DefaultRelease = "1902"

DefaultRelease version

View Source
const S_PHASE_ACTIVATION = SolutionPhase("ACT")

S_PHASE_ACTIVATION

View Source
const S_PHASE_DATA_UPDATE = SolutionPhase("POS")

S_PHASE_DATA_UPDATE

View Source
const S_PHASE_DEVELOPMENT = SolutionPhase("DEV")

S_PHASE_DEVELOPMENT

View Source
const S_PHASE_IMPORT = SolutionPhase("IMP")

S_PHASE_IMPORT

View Source
const S_PHASE_STATUS_RUNNING = SolutionPhaseStatus("R")

S_PHASE_STATUS_RUNNING

View Source
const S_PHASE_STATUS_SUCCESSFUL = SolutionPhaseStatus("S")

S_PHASE_STATUS_SUCCESSFUL

View Source
const S_STATUS_ASSEMBLED = SolutionStatus("2")

S_STATUS_ASSEMBLED Assembled

View Source
const S_STATUS_DEPLOYED = SolutionStatus("4")

S_STATUS_DEPLOYED Deployed

View Source
const S_STATUS_IN_DEPLOYMENT = SolutionStatus("3")

S_STATUS_IN_DEPLOYMENT In Deployment

View Source
const S_STATUS_IN_DEV = SolutionStatus("1")

S_STATUS_IN_DEV Solution In Development

Variables

View Source
var AddOverviewSheetTo = addOverviewSheetTo

AddOverviewSheetTo internal usage

View Source
var AddSheetTo = addSheetTo

AddSheetTo internal usage

View Source
var DefaultRapidAPIToken = "92227c001emsh8847b5b6c9eced3p1163b0jsnc6a4f3a23aaa"

DefaultRapidAPIToken test key, maybe deprecated

View Source
var ShortenPath2 = shortenPath2

ShortenPath2 exported

View Source
var UISuffixs = []string{".uicomponent", ".uiwoc", ".uiwocview"}

UISuffixs list

Functions

func FindTextPoolFromSource added in v1.7.1

func FindTextPoolFromSource(s []byte) []string

FindTextPoolFromSource func

func ParseXrepDateString added in v1.0.23

func ParseXrepDateString(input string) time.Time

ParseXrepDateString func

input as '20181231092019.5268080' format

func SpellCheckAPI added in v1.7.1

func SpellCheckAPI(token string, words []string) ([]string, error)

SpellCheckAPI provided by Rapid API

API Key required

func TrimSuffix added in v1.0.12

func TrimSuffix(s, suffix string) string

TrimSuffix string

Types

type BCInformation added in v1.5.4

type BCInformation struct {
	XMLName xml.Name `xml:"abap"`
	Text    string   `xml:",chardata"`
	Version string   `xml:"version,attr"`
	Asx     string   `xml:"asx,attr"`
	Values  struct {
		Text      string `xml:",chardata"`
		RESULTSET struct {
			Text          string `xml:",chardata"`
			RELEASE       string `xml:"RELEASE"`
			DATATYPESTYPE struct {
				Text string `xml:",chardata"`
				Item struct {
					Text string `xml:",chardata"`
					// NAMESPACE
					// <NAMESPACE>http://0007042773-one-off.sap.com/Y7NLADCSY_</NAMESPACE>
					NAMESPACE string `xml:"NAMESPACE"`
					DATATYPES struct {
						Text string `xml:",chardata"`
						// <item>
						// 	<NODE_ID>00163E703A9E1EE997B7D4A29DBA98DC</NODE_ID>
						// 	<NAME>BCO_1ElementsQueryElements</NAME>
						// 	<PROXYNAME>Y7NLADCSY_BCTS720E0DE0CA1EB53D</PROXYNAME>
						// 	<LAST_CHANGED_DATE_TIME>2019-04-13T07:35:02Z</LAST_CHANGED_DATE_TIME>
						// 	<BASE_DT_KEY_NAME/>
						// 	<USAGE_CATEGORY>6</USAGE_CATEGORY>
						// 	<EXTENSIBLE/>
						// 	<REP_TERM>26</REP_TERM>
						// 	<TRANSITIVE_HASH>KSDjTUkBnkWvoVJhggkzgg==</TRANSITIVE_HASH>
						// </item>
						Item []struct {
							Text   string `xml:",chardata"`
							NODEID string `xml:"NODE_ID"`
							NAME   string `xml:"NAME"`
							// PROXYNAME, like
							PROXYNAME           string `xml:"PROXYNAME"`
							LASTCHANGEDDATETIME string `xml:"LAST_CHANGED_DATE_TIME"`
							BASEDTKEYNAME       string `xml:"BASE_DT_KEY_NAME"`
							USAGECATEGORY       string `xml:"USAGE_CATEGORY"`
							EXTENSIBLE          string `xml:"EXTENSIBLE"`
							REPTERM             string `xml:"REP_TERM"`
							TRANSITIVEHASH      string `xml:"TRANSITIVE_HASH"`
						} `xml:"item"`
					} `xml:"DATATYPES"`
				} `xml:"item"`
			} `xml:"DATATYPESTYPE"`
		} `xml:"RESULT_SET"`
	} `xml:"values"`
}

BCInformation struct

type BCPartnerSolution added in v1.5.4

type BCPartnerSolution struct {
	XMLName xml.Name `xml:"BCPartnerSolution"`
	Text    string   `xml:",chardata"`
	Xsi     string   `xml:"xsi,attr"`
	Xsd     string   `xml:"xsd,attr"`
	Xmlns   string   `xml:"xmlns,attr"`
	Head    struct {
		Text        string `xml:",chardata"`
		Xmlns       string `xml:"xmlns,attr"`
		ElementID   string `xml:"ElementID"`
		ElementType string `xml:"ElementType"`
	} `xml:"Head"`
	Bac struct {
		Text                      string `xml:",chardata"`
		Xmlns                     string `xml:"xmlns,attr"`
		ElementID                 string `xml:"ElementID"`
		ParentID                  string `xml:"ParentID"`
		VisibleFineTuning         string `xml:"VisibleFineTuning"`
		Description               string `xml:"Description"`
		ScopingQuestion           string `xml:"ScopingQuestion"`
		Type                      string `xml:"Type"`
		GoLiveActivityDescription string `xml:"GoLiveActivityDescription"`
		KTOverview                string `xml:"KTOverview"`
		KTRelevance               string `xml:"KTRelevance"`
	} `xml:"Bac"`
	Content []struct {
		Text        string `xml:",chardata"`
		Xmlns       string `xml:"xmlns,attr"`
		ID          string `xml:"ID"`
		Type        string `xml:"Type"`
		Description string `xml:"Description"`
		ElementID   string `xml:"ElementID"`
		Internal    string `xml:"Internal"`
	} `xml:"Content"`
}

BCPartnerSolution struct

type BOInformation added in v1.5.4

type BOInformation struct {
	XMLName xml.Name `xml:"abap"`
	Text    string   `xml:",chardata"`
	Version string   `xml:"version,attr"`
	Asx     string   `xml:"asx,attr"`
	Values  struct {
		Text      string `xml:",chardata"`
		RESULTSET struct {
			Text string `xml:",chardata"`
			Item []struct {
				Text      string `xml:",chardata"`
				NODEID    string `xml:"NODE_ID"`
				NAME      string `xml:"NAME"`
				NAMESPACE string `xml:"NAMESPACE"`
				UUID      string `xml:"UUID"`
				PROXYNAME string `xml:"PROXYNAME"`
				NODE      struct {
					Text string `xml:",chardata"`
					Item struct {
						Text           string `xml:",chardata"`
						NODEID         string `xml:"NODE_ID"`
						NAME           string `xml:"NAME"`
						UUID           string `xml:"UUID"`
						PROXYNAME      string `xml:"PROXYNAME"`
						PARENTNODENAME string `xml:"PARENT_NODE_NAME"`
						WRITEACCESS    string `xml:"WRITE_ACCESS"`
						CATEGORY       string `xml:"CATEGORY"`
					} `xml:"item"`
				} `xml:"NODE"`
				LASTCHANGEDDATETIME string `xml:"LAST_CHANGED_DATE_TIME"`
				OBJECTCATEGORY      string `xml:"OBJECT_CATEGORY"`
				TECHCATEGORY        string `xml:"TECH_CATEGORY"`
				LIFECYCLESTAT       string `xml:"LIFE_CYCLE_STAT"`
				DUNAME              string `xml:"DU_NAME"`
				WRITEACCESS         string `xml:"WRITE_ACCESS"`
				DEPRECATED          string `xml:"DEPRECATED"`
				TRANSITIVEHASH      string `xml:"TRANSITIVE_HASH"`
				OFFLINEENABLED      string `xml:"OFFLINE_ENABLED"`
			} `xml:"item"`
		} `xml:"RESULT_SET"`
	} `xml:"values"`
}

BOInformation struct

type BPUserNameMapping added in v1.0.23

type BPUserNameMapping = map[string]string

BPUserNameMapping func

name is tech id, value is business user id for cache usage

type CheckMessage added in v1.0.14

type CheckMessage struct {
	Column   string
	Row      string
	Severity string
	FileName string
	Message  string
}

CheckMessage is backend check result

func (CheckMessage) GetMessageCategory added in v1.0.18

func (m CheckMessage) GetMessageCategory() string

GetMessageCategory string

func (CheckMessage) GetMessageLevel added in v1.0.15

func (m CheckMessage) GetMessageLevel() string

GetMessageLevel formatted level Warning or Error

func (CheckMessage) IsError added in v1.5.0

func (m CheckMessage) IsError() bool

IsError message

type CopyRightHeaderCheckResult added in v1.0.19

type CopyRightHeaderCheckResult struct {
	File        XrepFileAttrs
	FileContent XrepFile
	HaveHeader  bool
}

CopyRightHeaderCheckResult struct

type EtLock added in v1.0.23

type EtLock struct {
	FileName     string
	FilePath     string
	EditBy       string
	EditByUserID string
	EditOn       string
	EditOnDate   time.Time
}

EtLock information

type FileVersion added in v1.1.0

type FileVersion struct {
	Solution   string
	Branch     string
	Timestamp  string
	Action     string
	ContentID  string
	User       string
	ObjectType string
	FilePath   string
	// contains filtered or unexported fields
}

FileVersion describe a file version information

func (*FileVersion) GetModificationDateTime added in v1.1.0

func (v *FileVersion) GetModificationDateTime() time.Time

GetModificationDateTime obj

func (*FileVersion) GetUserName added in v1.1.0

func (v *FileVersion) GetUserName() string

func (*FileVersion) GetVersionContent added in v1.1.0

func (v *FileVersion) GetVersionContent() *XrepFile

type IvAlias added in v1.0.12

type IvAlias struct {
	Useralias string `json:"USERALIAS"`
}

type IvUserImporting added in v1.0.12

type IvUserImporting struct {
	IvAlias IvAlias `json:"IV_ALIAS"`
}

type IvUserRequest added in v1.0.12

type IvUserRequest struct {
	Importing IvUserImporting `json:"IMPORTING"`
}

type JSONObject added in v1.0.23

type JSONObject = map[string]interface{}

type LoginResponse added in v1.0.12

type LoginResponse struct {
	XMLName  xml.Name `xml:"Login"`
	Text     string   `xml:",chardata"`
	Messages struct {
		Text    string `xml:",chardata"`
		Message []struct {
			Text     string `xml:",chardata"`
			Type     string `xml:"type,attr"`
			AttrText string `xml:"text,attr"`
		} `xml:"Message"`
	} `xml:"Messages"`
	Actions struct {
		Text   string `xml:",chardata"`
		Action struct {
			Text string `xml:",chardata"`
			Name string `xml:"name,attr"`
		} `xml:"Action"`
	} `xml:"Actions"`
	SimpleTypes struct {
		Text       string `xml:",chardata"`
		SimpleType struct {
			Text string `xml:",chardata"`
			Name string `xml:"name,attr"`
			Enum []struct {
				Text        string `xml:",chardata"`
				AttrText    string `xml:"text,attr"`
				Value       string `xml:"value,attr"`
				JaproSuffix string `xml:"japroSuffix,attr"`
			} `xml:"Enum"`
		} `xml:"SimpleType"`
	} `xml:"SimpleTypes"`
	Data struct {
		Text    string `xml:",chardata"`
		Element []struct {
			Text  string `xml:",chardata"`
			Name  string `xml:"name,attr"`
			Value string `xml:"value,attr"`
		} `xml:"Element"`
	} `xml:"Data"`
	Sessions struct {
		Text    string `xml:",chardata"`
		Session struct {
			Text     string `xml:",chardata"`
			Client   string `xml:"client,attr"`
			User     string `xml:"user,attr"`
			Terminal string `xml:"terminal,attr"`
			Time     string `xml:"time,attr"`
		} `xml:"Session"`
	} `xml:"Sessions"`
	Config struct {
		Text      string `xml:",chardata"`
		Parameter []struct {
			Text  string `xml:",chardata"`
			Name  string `xml:"name,attr"`
			Value string `xml:"value,attr"`
		} `xml:"Parameter"`
	} `xml:"Config"`
}

LoginResponse struct

type NameConventionCheckResult added in v1.0.19

type NameConventionCheckResult struct {
	Correct     bool
	IncludePath string
	CorrectName string
	File        XrepFileAttrs
}

NameConventionCheckResult type

type OverviewItem added in v1.0.20

type OverviewItem struct {
	ItemName        string
	ItemDescription string
	ItemStatus      OverviewStatus
}

type OverviewStatus added in v1.0.20

type OverviewStatus string

OverviewStatus enum

type PDIClient added in v1.0.12

type PDIClient struct {
	// contains filtered or unexported fields
}

PDIClient for programming

func NewPDIClient added in v1.0.12

func NewPDIClient(username, password, hostname, release string) (c *PDIClient, err error)

NewPDIClient instance

func (*PDIClient) ActivateDeployedSolution added in v1.7.0

func (c *PDIClient) ActivateDeployedSolution(solution string) (err error)

ActivateDeployedSolution func after deploy a solution to target tenant, when uploading progress finished, please active it.

func (*PDIClient) ActivationSolution added in v1.4.0

func (c *PDIClient) ActivationSolution(solution string) (err error)

ActivationSolution sync

func (*PDIClient) AssembleSolution added in v1.4.0

func (c *PDIClient) AssembleSolution(solution string) (err error)

AssembleSolution from server

func (*PDIClient) CheckBacOutOfDate added in v1.5.4

func (c *PDIClient) CheckBacOutOfDate(solution string) (outofdate bool, errors []error)

CheckBacOutOfDate func if the BAC file out of date, assemble will be failed

func (*PDIClient) CheckBackendMessage added in v1.0.14

func (c *PDIClient) CheckBackendMessage(solution string, concurrent int)

CheckBackendMessage information

func (*PDIClient) CheckBackendMessageAPI added in v1.0.15

func (c *PDIClient) CheckBackendMessageAPI(solution string, concurrent int) []CheckMessage

CheckBackendMessageAPI information

func (*PDIClient) CheckInActiveFilesAPI added in v1.0.20

func (c *PDIClient) CheckInActiveFilesAPI(solutionName string) []XrepActivateCheckResult

CheckInActiveFilesAPI return all in active files

func (*PDIClient) CheckLockedFilesAPI added in v1.0.23

func (c *PDIClient) CheckLockedFilesAPI(solution string) []EtLock

CheckLockedFilesAPI to get locked files

func (*PDIClient) CheckNameConvention added in v1.0.13

func (c *PDIClient) CheckNameConvention(solution string)

CheckNameConvention of the solution

func (*PDIClient) CheckNameConventionAPI added in v1.0.19

func (c *PDIClient) CheckNameConventionAPI(solution string) []NameConventionCheckResult

CheckNameConventionAPI of the solution

func (*PDIClient) CheckSolutionCopyrightHeader added in v1.0.12

func (c *PDIClient) CheckSolutionCopyrightHeader(solutionName string, concurrent int)

CheckSolutionCopyrightHeader content

func (*PDIClient) CheckSolutionCopyrightHeaderAPI added in v1.0.19

func (c *PDIClient) CheckSolutionCopyrightHeaderAPI(solutionName string, concurrent int) []CopyRightHeaderCheckResult

CheckSolutionCopyrightHeaderAPI content

func (*PDIClient) CheckSpellErrorAPI added in v1.7.1

func (c *PDIClient) CheckSpellErrorAPI(solution, apiToken string, concurrent int) []*SpellErrorCheckResult

CheckSpellErrorAPI func

func (*PDIClient) CheckTranslation added in v1.0.15

func (c *PDIClient) CheckTranslation(solution string, concurrent int, language string)

CheckTranslation information

func (*PDIClient) CheckTranslationAPI added in v1.0.15

func (c *PDIClient) CheckTranslationAPI(solution string, concurrent int) []TranslationStatus

CheckTranslationAPI used for programming

func (*PDIClient) CreatePatch added in v1.4.0

func (c *PDIClient) CreatePatch(solution string) (err error)

CreatePatch solution

func (*PDIClient) DeploySolution added in v1.6.0

func (c *PDIClient) DeploySolution(solutionBase64String string) (err error)

DeploySolution to CURRENT tenant

maybe you need two PDIClient instance to do CD operation

func (*PDIClient) DiffFileVersion added in v1.1.3

func (c *PDIClient) DiffFileVersion(from, to FileVersion)

DiffFileVersion

func (*PDIClient) DownloadAllSourceTo added in v1.0.12

func (c *PDIClient) DownloadAllSourceTo(solutionName, targetPath string, concurrent int, pretty bool)

DownloadAllSourceTo directory

func (*PDIClient) DownloadFileSource added in v1.0.12

func (c *PDIClient) DownloadFileSource(xrepPath string) *XrepFile

DownloadFileSource will return the remote file content

func (*PDIClient) DownloadSolution added in v1.4.0

func (c *PDIClient) DownloadSolution(solution, version string) (err error, output string)

DownloadSolution from tenant return base64 binary zip file

func (*PDIClient) DownloadVersionFileSource added in v1.1.0

func (c *PDIClient) DownloadVersionFileSource(path, branch, solution, timestamp string) *XrepFile

DownloadVersionFileSource will return the remote file content with version information

func (*PDIClient) FindBACAndActivateIt added in v1.4.0

func (c *PDIClient) FindBACAndActivateIt(solution string) (err error)

FindBACAndActivateIt

func (*PDIClient) FindUnAssignedWCV added in v1.6.0

func (c *PDIClient) FindUnAssignedWCV(solution string) *WCVAssignCheckResult

FindUnAssignedWCV api

func (*PDIClient) GetAUserIDNameByTechID added in v1.0.23

func (c *PDIClient) GetAUserIDNameByTechID(techID string) string

GetAUserIDNameByTechID func

func (*PDIClient) GetBPUserNameByTechID added in v1.0.23

func (c *PDIClient) GetBPUserNameByTechID(techIDs []string) BPUserNameMapping

GetBPUserNameByTechID

func (*PDIClient) GetExitCode added in v1.3.0

func (c *PDIClient) GetExitCode() int

GetExitCode for client

func (*PDIClient) GetSessionID added in v1.4.0

func (c *PDIClient) GetSessionID(release string) (sessionID string, err error)

GetSessionID from server will be triggerred at login

func (*PDIClient) GetSolutionBACFile added in v1.5.4

func (c *PDIClient) GetSolutionBACFile(solution string) *BCPartnerSolution

GetSolutionBACFile content

func (*PDIClient) GetSolutionByIDOrDescription added in v1.0.24

func (c *PDIClient) GetSolutionByIDOrDescription(input string) Solution

GetSolutionByIDOrDescription exported

func (*PDIClient) GetSolutionFileAttrs added in v1.0.20

func (c *PDIClient) GetSolutionFileAttrs(solutionName string) map[string]XrepFileAttrs

GetSolutionFileAttrs from xrep

func (*PDIClient) GetSolutionFileList added in v1.0.12

func (c *PDIClient) GetSolutionFileList(solutionName string) *Project

GetSolutionFileList from vs project file with cache

func (*PDIClient) GetSolutionIDByString added in v1.0.22

func (c *PDIClient) GetSolutionIDByString(input string) string

GetSolutionIDByString for ensure solution ID

func (*PDIClient) GetSolutionNamespace added in v1.5.4

func (c *PDIClient) GetSolutionNamespace(solution string) string

GetSolutionNamespace func e.g. http://0007042773-one-off.sap.com/Y7NLADCSY_

func (*PDIClient) GetSolutionStatus added in v1.4.0

func (c *PDIClient) GetSolutionStatus(solution string) *SolutionHeader

GetSolutionStatus exported

func (*PDIClient) GetSolutionXrepFileList added in v1.0.14

func (c *PDIClient) GetSolutionXrepFileList(solutionName string) []string

GetSolutionXrepFileList in xrep

func (*PDIClient) GetSolutionsAPI added in v1.0.22

func (c *PDIClient) GetSolutionsAPI() []Solution

GetSolutionsAPI list

func (*PDIClient) GetVersionByFuzzyVersion added in v1.1.0

func (c *PDIClient) GetVersionByFuzzyVersion(xrepPath, sVersion string) (rt FileVersion, existAndUnique bool)

func (*PDIClient) GetXrepPathByFuzzyName added in v1.1.0

func (c *PDIClient) GetXrepPathByFuzzyName(solution, s string) (xrepPath string, existAndUnique bool)

GetXrepPathByFuzzyName func

func (*PDIClient) IsHotFixNow added in v1.7.1

func (c *PDIClient) IsHotFixNow(solution string) (bool, error)

IsHotFixNow func

check solution if enable hot fix now

func (*PDIClient) IsSolutionExist added in v1.7.1

func (c *PDIClient) IsSolutionExist(solutionName string) bool

IsSolutionExist func

func (*PDIClient) ListAllLockedFile added in v1.0.13

func (c *PDIClient) ListAllLockedFile(solutionName string) []string

ListAllLockedFile list all checked out files name

func (*PDIClient) ListFileVersions added in v1.1.0

func (c *PDIClient) ListFileVersions(xrepPath string)

ListFileVersions to console

func (*PDIClient) ListFileVersionsAPI added in v1.1.0

func (c *PDIClient) ListFileVersionsAPI(xrepPath string) []FileVersion

ListFileVersionsAPI information

func (*PDIClient) ListSolutionAllFiles added in v1.0.12

func (c *PDIClient) ListSolutionAllFiles(solutionName string) *PDIClient

ListSolutionAllFiles names

func (*PDIClient) ListSolutions added in v1.0.12

func (c *PDIClient) ListSolutions() *PDIClient

ListSolutions detail information

func (*PDIClient) QueryBCInformation added in v1.5.4

func (c *PDIClient) QueryBCInformation(solution string) *BCInformation

QueryBCInformation

func (*PDIClient) QueryBOInformation added in v1.5.4

func (c *PDIClient) QueryBOInformation(solution string) *BOInformation

QueryBOInformation func

func (*PDIClient) Statistics added in v1.9.16

func (c *PDIClient) Statistics(solution string, concurrent int) *SolutionStatisticsResult

Statistics solution

func (*PDIClient) ViewFileVersionContent added in v1.9.16

func (c *PDIClient) ViewFileVersionContent(version FileVersion)

ViewFileVersionContent text

print it to stdout

type Project added in v1.0.12

type Project struct {
	XMLName        xml.Name `xml:"Project"`
	Text           string   `xml:",chardata"`
	DefaultTargets string   `xml:"DefaultTargets,attr"`
	Xmlns          string   `xml:"xmlns,attr"`
	PropertyGroup  []struct {
		Text          string `xml:",chardata"`
		Condition     string `xml:"Condition,attr"`
		SchemaVersion string `xml:"SchemaVersion"`
		ProjectGUID   string `xml:"ProjectGuid"`
		ProjectType   string `xml:"ProjectType"`
		Configuration struct {
			Text      string `xml:",chardata"`
			Condition string `xml:"Condition,attr"`
		} `xml:"Configuration"`
		Name                      string `xml:"Name"`
		RootNamespace             string `xml:"RootNamespace"`
		RepositoryNamespace       string `xml:"RepositoryNamespace"`
		RuntimeNamespacePrefix    string `xml:"RuntimeNamespacePrefix"`
		RepositoryRootFolder      string `xml:"RepositoryRootFolder"`
		DefaultProcessComponent   string `xml:"DefaultProcessComponent"`
		DevelopmentPackage        string `xml:"DevelopmentPackage"`
		XRepSolution              string `xml:"XRepSolution"`
		BCSourceFolderInXRep      string `xml:"BCSourceFolderInXRep"`
		ProjectSourceFolderinXRep string `xml:"ProjectSourceFolderinXRep"`
		DeploymentUnit            string `xml:"DeploymentUnit"`
		CompilerVersion           string `xml:"CompilerVersion"`
		OutputPath                string `xml:"OutputPath"`
	} `xml:"PropertyGroup"`
	ItemGroup []struct {
		Text   string `xml:",chardata"`
		Folder []struct {
			Text    string `xml:",chardata"`
			Include string `xml:"Include,attr"`
		} `xml:"Folder"`
		BCSet []struct {
			Text    string `xml:",chardata"`
			Include string `xml:"Include,attr"`
			SubType string `xml:"SubType"`
		} `xml:"BCSet"`
		Content []struct {
			Text          string `xml:",chardata"`
			Include       string `xml:"Include,attr"`
			DependentUpon string `xml:"DependentUpon"`
			SubType       string `xml:"SubType"`
			IsHidden      string `xml:"IsHidden"`
		} `xml:"Content"`
	} `xml:"ItemGroup"`
	Import struct {
		Text    string `xml:",chardata"`
		Project string `xml:"Project,attr"`
	} `xml:"Import"`
}

Project struct for pdi project xml

type Solution added in v1.0.22

type Solution struct {
	// Solution ID
	Name string
	// Solution Name
	Description   string
	PatchSolution bool
	Status        string
	Customer      string
	Contact       string
	Email         string
}

Solution information

type SolutionHeader added in v1.4.0

type SolutionHeader struct {
	ChangeDateTime     time.Time
	SolutionID         string
	SolutionName       string
	OriginSolutionID   string
	OriginSolutionName string
	Version            int64
	Status             SolutionStatus
	StatusText         string
	Phase              SolutionPhase
	PhaseStatus        SolutionPhaseStatus
	CanActivation      bool
	CanAssemble        bool
	CanDownload        bool
	NeedCreatePatch    bool
	IsSplitEnabled     bool
	IsRunningJob       bool
	IsCreatingPatch    bool
	// Help Text on PDI UI
	HelpText string
	// Is Solution Enabled
	Enabled bool
}

SolutionHeader information

includes some status/text information

func (*SolutionHeader) GetSolutionLatestAssembledVersion added in v1.9.10

func (h *SolutionHeader) GetSolutionLatestAssembledVersion() int64

GetSolutionLatestAssembledVersion id

func (*SolutionHeader) IsRunningActivation added in v1.6.0

func (h *SolutionHeader) IsRunningActivation() bool

IsRunningActivation process

just used for deployment scenario

func (*SolutionHeader) IsRunningDataUpdate added in v1.7.4

func (h *SolutionHeader) IsRunningDataUpdate() bool

IsRunningDataUpdate process

func (*SolutionHeader) IsRunningUploading added in v1.6.0

func (h *SolutionHeader) IsRunningUploading() bool

IsRunningUploading file upload process

func (*SolutionHeader) IsUploadingSuccessful added in v1.7.0

func (h *SolutionHeader) IsUploadingSuccessful() bool

IsUploadingSuccessful file upload finished

type SolutionPhase added in v1.5.0

type SolutionPhase string

type SolutionPhaseStatus added in v1.6.0

type SolutionPhaseStatus string

type SolutionStatisticsResult added in v1.9.16

type SolutionStatisticsResult struct {
	Solution         *Solution
	ABSLCodeLines    int
	ABSLFileCount    int64
	WebServicesCount int64
	UIComponentCount int64
	BOCount          int64
	// not use now
	BOFieldsCount              int64
	CommunicationScenarioCount int64
	CodeListCount              int64
	BCOCount                   int64
}

SolutionStatisticsResult type

type SolutionStatus added in v1.4.0

type SolutionStatus string

type SpellErrorCheckResult added in v1.7.1

type SpellErrorCheckResult struct {
	// File xrep file information
	File *XrepFile
	// These words maybe misspelling
	ErrorSpellingWords []string
}

SpellErrorCheckResult type

type TranslationStatus added in v1.0.15

type TranslationStatus struct {
	FileName     string
	AllTextCount string
	Info         map[string]TranslationStatusInfo
}

TranslationStatus message

type TranslationStatusInfo added in v1.0.15

type TranslationStatusInfo struct {
	Language        string
	TranslatedCount string
}

TranslationStatusInfo detail

type UXComponent added in v1.6.0

type UXComponent struct {
	XMLName                         xml.Name `xml:"UXComponent"`
	Text                            string   `xml:",chardata"`
	Base                            string   `xml:"base,attr"`
	Uxv                             string   `xml:"uxv,attr"`
	Uxc                             string   `xml:"uxc,attr"`
	ID                              string   `xml:"id,attr"`
	Name                            string   `xml:"name,attr"`
	ComponentType                   string   `xml:"componentType,attr"`
	AuthorizationClassificationCode string   `xml:"AuthorizationClassificationCode,attr"`
	HelpId                          string   `xml:"helpId,attr"`
	EnableBackendOperationsClubbing string   `xml:"enableBackendOperationsClubbing,attr"`
	DesigntimeVersion               string   `xml:"designtimeVersion,attr"`
	ModelVersion                    string   `xml:"modelVersion,attr"`
	UseUIController                 string   `xml:"useUIController,attr"`
	Xmlns                           string   `xml:"xmlns,attr"`
	Interface                       struct {
		Text          string `xml:",chardata"`
		ID            string `xml:"id,attr"`
		Configuration struct {
			Text string `xml:",chardata"`
			ID   string `xml:"id,attr"`
		} `xml:"Configuration"`
	} `xml:"Interface"`
	Implementation struct {
		Text      string `xml:",chardata"`
		ID        string `xml:"id,attr"`
		DataModel struct {
			Text        string `xml:",chardata"`
			ID          string `xml:"id,attr"`
			Name        string `xml:"name,attr"`
			PropertyBag struct {
				Text     string `xml:",chardata"`
				ID       string `xml:"id,attr"`
				Property []struct {
					Text  string `xml:",chardata"`
					ID    string `xml:"id,attr"`
					Name  string `xml:"name,attr"`
					Value string `xml:"value,attr"`
				} `xml:"Property"`
			} `xml:"PropertyBag"`
			DataField []struct {
				Text        string `xml:",chardata"`
				ID          string `xml:"id,attr"`
				Name        string `xml:"name,attr"`
				Type        string `xml:"type,attr"`
				PropertyBag struct {
					Text     string `xml:",chardata"`
					ID       string `xml:"id,attr"`
					Property []struct {
						Text  string `xml:",chardata"`
						ID    string `xml:"id,attr"`
						Name  string `xml:"name,attr"`
						Value string `xml:"value,attr"`
					} `xml:"Property"`
				} `xml:"PropertyBag"`
			} `xml:"DataField"`
			Structure []struct {
				Text        string `xml:",chardata"`
				ID          string `xml:"id,attr"`
				Name        string `xml:"name,attr"`
				PropertyBag struct {
					Text     string `xml:",chardata"`
					ID       string `xml:"id,attr"`
					Property []struct {
						Text  string `xml:",chardata"`
						ID    string `xml:"id,attr"`
						Name  string `xml:"name,attr"`
						Value string `xml:"value,attr"`
					} `xml:"Property"`
				} `xml:"PropertyBag"`
				DataField []struct {
					Text         string `xml:",chardata"`
					ID           string `xml:"id,attr"`
					Name         string `xml:"name,attr"`
					Type         string `xml:"type,attr"`
					InitialValue string `xml:"initialValue,attr"`
					PropertyBag  struct {
						Text     string `xml:",chardata"`
						ID       string `xml:"id,attr"`
						Property []struct {
							Text  string `xml:",chardata"`
							ID    string `xml:"id,attr"`
							Name  string `xml:"name,attr"`
							Value string `xml:"value,attr"`
						} `xml:"Property"`
					} `xml:"PropertyBag"`
				} `xml:"DataField"`
			} `xml:"Structure"`
		} `xml:"DataModel"`
		ModelChanges string `xml:"ModelChanges"`
	} `xml:"Implementation"`
	Navigation struct {
		Text string `xml:",chardata"`
		ID   string `xml:"id,attr"`
	} `xml:"Navigation"`
	CenterStructure struct {
		Text  string `xml:",chardata"`
		ID    string `xml:"id,attr"`
		Title struct {
			Text       string `xml:",chardata"`
			ID         string `xml:"id,attr"`
			TextPoolId string `xml:"textPoolId,attr"`
		} `xml:"Title"`
		ViewSwitches struct {
			Text       string `xml:",chardata"`
			ID         string `xml:"id,attr"`
			ViewSwitch []struct {
				Chardata    string `xml:",chardata"`
				ID          string `xml:"id,attr"`
				PropertyBag struct {
					Text     string `xml:",chardata"`
					ID       string `xml:"id,attr"`
					Property struct {
						Text  string `xml:",chardata"`
						ID    string `xml:"id,attr"`
						Name  string `xml:"name,attr"`
						Value string `xml:"value,attr"`
					} `xml:"Property"`
				} `xml:"PropertyBag"`
				Text struct {
					Text       string `xml:",chardata"`
					ID         string `xml:"id,attr"`
					TextPoolId string `xml:"textPoolId,attr"`
				} `xml:"Text"`
				SubViewSwitches struct {
					Text       string `xml:",chardata"`
					ID         string `xml:"id,attr"`
					ViewSwitch []struct {
						Chardata    string `xml:",chardata"`
						ID          string `xml:"id,attr"`
						EmbedName   string `xml:"embedName,attr"`
						PropertyBag struct {
							Text     string `xml:",chardata"`
							ID       string `xml:"id,attr"`
							Property struct {
								Text  string `xml:",chardata"`
								ID    string `xml:"id,attr"`
								Name  string `xml:"name,attr"`
								Value string `xml:"value,attr"`
							} `xml:"Property"`
						} `xml:"PropertyBag"`
						Text struct {
							Text       string `xml:",chardata"`
							ID         string `xml:"id,attr"`
							TextPoolId string `xml:"textPoolId,attr"`
						} `xml:"Text"`
					} `xml:"ViewSwitch"`
				} `xml:"SubViewSwitches"`
			} `xml:"ViewSwitch"`
		} `xml:"ViewSwitches"`
		Attributes struct {
			Text  string `xml:",chardata"`
			ID    string `xml:"id,attr"`
			Name  string `xml:"name,attr"`
			Value string `xml:"value,attr"`
		} `xml:"Attributes"`
	} `xml:"CenterStructure"`
	EmbeddedComponents struct {
		Text              string `xml:",chardata"`
		ID                string `xml:"id,attr"`
		EmbeddedComponent []struct {
			Text              string `xml:",chardata"`
			ID                string `xml:"id,attr"`
			EmbedName         string `xml:"embedName,attr"`
			TargetComponentID string `xml:"targetComponentID,attr"`
			LazyLoad          string `xml:"lazyLoad,attr"`
		} `xml:"EmbeddedComponent"`
	} `xml:"EmbeddedComponents"`
	Description struct {
		Text       string `xml:",chardata"`
		ID         string `xml:"id,attr"`
		TextPoolId string `xml:"textPoolId,attr"`
	} `xml:"Description"`
	Prerequisites      string `xml:"Prerequisites"`
	TechnicalConflicts string `xml:"TechnicalConflicts"`
	SoDConflicts       string `xml:"SoDConflicts"`
	TextPool           struct {
		Text      string `xml:",chardata"`
		TextBlock struct {
			Text            string `xml:",chardata"`
			Language        string `xml:"language,attr"`
			MasterLanguage  string `xml:"masterLanguage,attr"`
			CurrentLanguage string `xml:"currentLanguage,attr"`
			TextPoolEntry   []struct {
				Text         string `xml:",chardata"`
				ID           string `xml:"id,attr"`
				TextUuid     string `xml:"textUuid,attr"`
				AttrText     string `xml:"text,attr"`
				TextCategory string `xml:"textCategory,attr"`
			} `xml:"TextPoolEntry"`
		} `xml:"TextBlock"`
	} `xml:"TextPool"`
}

UXComponent for WoC

type WCVAssignCheckResult added in v1.6.0

type WCVAssignCheckResult struct {
	WCCount            int
	WCVCount           int
	AssignedWCVCount   int
	UnAssignedWCVCount int
	UnAssignedWCVs     []string
}

WCVAssignCheckResult type

type XrepActivateCheckResult added in v1.0.20

type XrepActivateCheckResult struct {
	File                string
	FilePath            string
	LastChangedBy       string
	LastChangedByUserID string
	LastChangedOn       string
	LastChangedOnTime   time.Time
}

type XrepAddionalActiveCheckResult added in v1.0.20

type XrepAddionalActiveCheckResult struct {
	FileName string
	FilePath string
	Active   bool
}

type XrepDownloadTask added in v1.0.12

type XrepDownloadTask struct {
	// contains filtered or unexported fields
}

XrepDownloadTask is download & write task

type XrepFile added in v1.0.13

type XrepFile struct {
	XrepPath   string
	Source     []byte
	Attributes map[string]string
}

XrepFile type

func (*XrepFile) String added in v1.9.16

func (f *XrepFile) String() string

type XrepFileAttrs added in v1.0.20

type XrepFileAttrs struct {
	FileName          string
	FilePath          string
	EntityType        string
	CreatedBy         string
	LastChangedBy     string
	CreatedOn         string
	CreatedOnDate     time.Time
	LastChangedOn     string
	LastChangedOnDate time.Time
	FileSize          string
	MimeType          string
	IsFolder          bool
	Solution          string
	Branch            string
	ActiveFlag        string
	Active            bool
	ContID            string
	IsLink            bool
}

XrepFileAttrs type

Directories

Path Synopsis
ast

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL