Changeset 6374fc553797…
Parent 358f734e0b18…
by Benjamin Pollack <benjamin@fogcreek.com>
Changes to 2 files · Browse files at 6374fc553797 Showing diff from parent 358f734e0b18 Diff from another changeset...
|
@@ -1,0 +1,50 @@ + package kiln
+
+// Represents the error JSON returned by Kiln API requests
+type KilnError struct {
+ // Guaranteed-unique code for Kiln errors
+ Code string `json:"codeError"`
+ // Human-readable description
+ Description string `json:"sError"`
+}
+
+// Represents the project JSON returned from the Kiln API
+type KilnProject struct {
+ Id int64 `json:"ixProject"`
+ Slug string `json:"sSlug"`
+ Name string `json:"sName"`
+ Description string `json:"sDescription"`
+ DefaultPermission string `json:"permissionDefault"`
+ RepoGroups []KilnRepoGroup
+}
+
+type KilnRepoGroup struct {
+ Id int64 `json:"ixRepoGroup"`
+ ProjectId int64 `json:"ixProject"`
+ Slug string `json:"sSlug"`
+ Name string `json:"sName"`
+ Repos []KilnRepo
+}
+
+type KilnRepo struct {
+ Id int64 `json:"ixRepo"`
+ RepoGroupId int64 `json:"ixRepoGroup"`
+ ParentId int64 `json:"ixParent"`
+ IsCentral bool `json:"fCentral"`
+ Slug string `json:"sSlug"`
+ GroupSlug string `json:"sGroupSlug"`
+ ProjectSlug string `json:"sProjectSlug"`
+ Name string `json:"sName"`
+ Description string `json:"sDescription"`
+ Status string `json:"sStatus"`
+ Size int64 `json:"bytesSize"`
+ Creator KilnPerson `json:"personCreator"`
+ DefaultPermission string `json:"permissionDefault"`
+ Branches []KilnRepo `json:"repoBranches"`
+}
+
+type KilnPerson struct {
+ Id int64 `json:"ixPerson"`
+ Name string `json:"sName"`
+ Email string `json:"sEmail"`
+}
|
@@ -17,14 +17,6 @@ "strings"
)
-// Represents the error JSON returned by Kiln API requests
-type KilnError struct {
- // Guaranteed-unique code for Kiln errors
- Code string `json:"codeError"`
- // Human-readable description
- Description string `json:"sError"`
-}
-
// Holds the bare minimum amount of information required to talk to a Kiln instance
type KilnClient struct {
credentials *kilnCredential
|
Loading...