Initial Commit

This commit is contained in:
2019-09-16 21:36:27 +02:00
commit a86462206b
17 changed files with 771 additions and 0 deletions

6
pkg/types/login.go Normal file
View File

@ -0,0 +1,6 @@
package types
type LoginCredentials struct {
User string `json:"username"`
Password string `json:"password"`
}

29
pkg/types/repository.go Normal file
View File

@ -0,0 +1,29 @@
package types
import "time"
type Repository struct {
User string `json:"user"`
Name string `json:"name"`
Namespcace string `json:"namespace"`
Type string `json:"repository_type"`
Status int `json:"status"`
Description string `json:"description"`
Private bool `json:"is_private"`
Automated bool `json:"is_automated"`
Edit bool `json:"can_edit"`
StarCount int `json:"start_count"`
PullCount int `json:"pull_count"`
LastUpdated time.Time `json:"last_updated"`
IsMigrated bool `json:"is_migrated"`
HasStarred bool `json:"has_starred"`
FullDescription string `json:"full_description"`
Affiliation string `json:"affilition"`
Permissions *Permissions `json:"permissions"`
}
type Permissions struct {
Read bool `json:"read"`
Write bool `json:"write"`
Admin bool `json:"admin"`
}

6
pkg/types/token.go Normal file
View File

@ -0,0 +1,6 @@
package types
type Token struct {
Token string `json:"token"`
}