2015-09-30 03:21:17 +02:00
|
|
|
package model
|
2015-04-07 10:20:55 +02:00
|
|
|
|
2015-05-11 09:45:31 +02:00
|
|
|
type RepoLite struct {
|
2015-08-11 10:36:07 +02:00
|
|
|
Owner string `json:"owner"`
|
|
|
|
Name string `json:"name"`
|
|
|
|
FullName string `json:"full_name"`
|
2015-09-30 03:21:17 +02:00
|
|
|
Avatar string `json:"avatar_url"`
|
2015-04-07 10:20:55 +02:00
|
|
|
}
|
|
|
|
|
2016-03-30 22:15:28 +02:00
|
|
|
// Repo represents a repository.
|
|
|
|
//
|
|
|
|
// swagger:model repo
|
2015-09-30 03:21:17 +02:00
|
|
|
type Repo struct {
|
2016-06-15 00:20:17 +02:00
|
|
|
ID int64 `json:"id,omitempty" meddler:"repo_id,pk"`
|
|
|
|
UserID int64 `json:"-" meddler:"repo_user_id"`
|
|
|
|
Owner string `json:"owner" meddler:"repo_owner"`
|
|
|
|
Name string `json:"name" meddler:"repo_name"`
|
|
|
|
FullName string `json:"full_name" meddler:"repo_full_name"`
|
|
|
|
Avatar string `json:"avatar_url,omitempty" meddler:"repo_avatar"`
|
|
|
|
Link string `json:"link_url,omitempty" meddler:"repo_link"`
|
|
|
|
Kind string `json:"scm,omitempty" meddler:"repo_scm"`
|
|
|
|
Clone string `json:"clone_url,omitempty" meddler:"repo_clone"`
|
|
|
|
Branch string `json:"default_branch,omitempty" meddler:"repo_branch"`
|
|
|
|
Timeout int64 `json:"timeout,omitempty" meddler:"repo_timeout"`
|
2017-05-22 23:11:29 +02:00
|
|
|
Visibility string `json:"visibility" meddler:"repo_visibility"`
|
2016-06-15 00:20:17 +02:00
|
|
|
IsPrivate bool `json:"private,omitempty" meddler:"repo_private"`
|
|
|
|
IsTrusted bool `json:"trusted" meddler:"repo_trusted"`
|
|
|
|
IsStarred bool `json:"starred,omitempty" meddler:"-"`
|
2017-04-11 19:06:45 +02:00
|
|
|
IsGated bool `json:"gated" meddler:"repo_gated"`
|
2016-06-15 00:20:17 +02:00
|
|
|
AllowPull bool `json:"allow_pr" meddler:"repo_allow_pr"`
|
|
|
|
AllowPush bool `json:"allow_push" meddler:"repo_allow_push"`
|
|
|
|
AllowDeploy bool `json:"allow_deploys" meddler:"repo_allow_deploys"`
|
|
|
|
AllowTag bool `json:"allow_tags" meddler:"repo_allow_tags"`
|
2017-05-23 12:43:58 +02:00
|
|
|
Counter int `json:"last_build" meddler:"repo_counter"`
|
2017-03-19 10:51:12 +02:00
|
|
|
Config string `json:"config_file" meddler:"repo_config_path"`
|
2016-06-15 00:20:17 +02:00
|
|
|
Hash string `json:"-" meddler:"repo_hash"`
|
2015-09-30 03:21:17 +02:00
|
|
|
}
|
2017-04-12 14:12:21 +02:00
|
|
|
|
|
|
|
// RepoPatch represents a repository patch object.
|
|
|
|
type RepoPatch struct {
|
|
|
|
Config *string `json:"config_file,omitempty"`
|
|
|
|
IsTrusted *bool `json:"trusted,omitempty"`
|
|
|
|
IsGated *bool `json:"gated,omitempty"`
|
|
|
|
Timeout *int64 `json:"timeout,omitempty"`
|
2017-05-23 00:44:58 +02:00
|
|
|
Visibility *string `json:"visibility,omitempty"`
|
2017-04-12 14:12:21 +02:00
|
|
|
AllowPull *bool `json:"allow_pr,omitempty"`
|
|
|
|
AllowPush *bool `json:"allow_push,omitempty"`
|
|
|
|
AllowDeploy *bool `json:"allow_deploy,omitempty"`
|
|
|
|
AllowTag *bool `json:"allow_tag,omitempty"`
|
|
|
|
}
|