1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131
|
package entities
import (
"repodiff/constants"
)
type Project struct {
URL string `json:"url"`
Branch string `json:"branch"`
}
type DiffTarget struct {
Upstream Project `json:"upstream"`
Downstream Project `json:"downstream"`
}
type ApplicationConfig struct {
OutputDirectory string `json:"output_directory"`
AndroidProjectDir string `json:"android_project_dir"`
DiffScript string `json:"diff_script"`
DiffTargets []DiffTarget `json:"diff_targets"`
Port int `json:"port"`
CommonUpstream Project `json:"common_upstream"`
}
type DiffRow struct {
Date string
DownstreamProject string
UpstreamProject string
DiffStatus int
FilesChanged int
LineInsertions int
LineDeletions int
LineChanges int
CommitsNotUpstreamed int
DBInsertTimestamp int64
}
type AnalyzedDiffRow struct {
DiffRow
Type constants.ProjectType
}
type CommitRow struct {
Date string
Commit string
DownstreamProject string
Author string
Subject string
}
type AnalyzedCommitRow struct {
CommitRow
Type constants.ProjectType
}
type MappedDiffTarget struct {
UpstreamTarget int16
DownstreamTarget int16
}
type StatusMessage struct {
JobStatus string
Meta string
}
type remote struct {
Text string `xml:",chardata"`
Fetch string `xml:"fetch,attr"`
Name string `xml:"name,attr"`
Review string `xml:"review,attr"`
}
// "default" is the actual corresponding name in the XML tree but is also a reserved keyword in Golang; renamed as "defaultXML"
type defaultXML struct {
Text string `xml:",chardata"`
DestBranch string `xml:"dest-branch,attr"`
Remote string `xml:"remote,attr"`
Revision string `xml:"revision,attr"`
SyncJ string `xml:"sync-j,attr"`
}
type manifestServer struct {
Text string `xml:",chardata"`
URL string `xml:"url,attr"`
}
type copyFile struct {
Text string `xml:",chardata"`
Dest string `xml:"dest,attr"`
Src string `xml:"src,attr"`
}
type linkFile struct {
Text string `xml:",chardata"`
Dest string `xml:"dest,attr"`
Src string `xml:"src,attr"`
}
type ManifestProject struct {
Text string `xml:",chardata"`
Groups string `xml:"groups,attr"`
Name string `xml:"name,attr"`
CloneDepth string `xml:"clone-depth,attr"`
Path string `xml:"path,attr"`
Copyfile copyFile `xml:"copyfile"`
Linkfile []linkFile `xml:"linkfile"`
}
type repoHooks struct {
Text string `xml:",chardata"`
EnabledList string `xml:"enabled-list,attr"`
InProject string `xml:"in-project,attr"`
}
type ManifestFile struct {
Text string `xml:",chardata"`
Remote remote `xml:"remote"`
Default defaultXML `xml:"default"`
ManifestServer manifestServer `xml:"manifest-server"`
Projects []ManifestProject `xml:"project"`
RepoHooks repoHooks `xml:"repo-hooks"`
}
type ManifestFileGroup struct {
Common ManifestFile
Upstream ManifestFile
Downstream ManifestFile
}
type RepoTimestamp int64
|