Kiln » gitkiln Read More
Clone URL:  
Pushed to one repository · View In Graph Contained in master

add more Kiln API JSON structs

Changeset 6374fc553797

Parent 358f734e0b18

by Profile picture of User 12Benjamin Pollack <benjamin@fogcreek.com>

Changes to 2 files · Browse files at 6374fc553797 Showing diff from parent 358f734e0b18 Diff from another changeset...

Change 1 of 1 Show Entire File kiln/​api.go Stacked
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
@@ -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"` +}
Change 1 of 1 Show Entire File kiln/​kiln.go Stacked
 
17
18
19
20
21
22
23
24
25
26
27
28
29
30
 
17
18
19
 
 
 
 
 
 
 
 
20
21
22
@@ -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