2015-05-17 20:51:42 +00:00
|
|
|
package types
|
2015-04-07 08:20:55 +00:00
|
|
|
|
|
|
|
type Repo struct {
|
2015-05-11 07:45:31 +00:00
|
|
|
ID int64 `meddler:"repo_id,pk" json:"id"`
|
|
|
|
UserID int64 `meddler:"user_id" json:"-"`
|
|
|
|
Owner string `meddler:"repo_owner" json:"owner"`
|
|
|
|
Name string `meddler:"repo_name" json:"name"`
|
|
|
|
FullName string `meddler:"repo_slug" json:"full_name"`
|
|
|
|
Token string `meddler:"repo_token" json:"-"`
|
|
|
|
Language string `meddler:"repo_lang" json:"language"`
|
|
|
|
Private bool `meddler:"repo_private" json:"private"`
|
2015-05-13 06:58:30 +00:00
|
|
|
Self string `meddler:"repo_self" json:"self_url"`
|
2015-05-11 07:45:31 +00:00
|
|
|
Link string `meddler:"repo_link" json:"link_url"`
|
|
|
|
Clone string `meddler:"repo_clone" json:"clone_url"`
|
|
|
|
Branch string `meddler:"repo_branch" json:"default_branch"`
|
|
|
|
Timeout int64 `meddler:"repo_timeout" json:"timeout"`
|
|
|
|
Trusted bool `meddler:"repo_trusted" json:"trusted"`
|
|
|
|
PostCommit bool `meddler:"repo_push" json:"post_commits"`
|
|
|
|
PullRequest bool `meddler:"repo_pull" json:"pull_requests"`
|
|
|
|
PublicKey string `meddler:"repo_public_key" json:"-"`
|
|
|
|
PrivateKey string `meddler:"repo_private_key" json:"-"`
|
|
|
|
Created int64 `meddler:"repo_created" json:"created_at"`
|
|
|
|
Updated int64 `meddler:"repo_updated" json:"updated_at"`
|
|
|
|
|
|
|
|
Params map[string]string `meddler:"repo_params,json" json:"-"`
|
2015-04-07 08:20:55 +00:00
|
|
|
}
|
|
|
|
|
2015-05-11 07:45:31 +00:00
|
|
|
type RepoLite struct {
|
|
|
|
ID int64 `meddler:"repo_id,pk" json:"id"`
|
|
|
|
UserID int64 `meddler:"user_id" json:"-"`
|
|
|
|
Owner string `meddler:"repo_owner" json:"owner"`
|
|
|
|
Name string `meddler:"repo_name" json:"name"`
|
|
|
|
FullName string `meddler:"repo_slug" json:"full_name"`
|
|
|
|
Language string `meddler:"repo_lang" json:"language"`
|
|
|
|
Private bool `meddler:"repo_private" json:"private"`
|
|
|
|
Created int64 `meddler:"repo_created" json:"created_at"`
|
|
|
|
Updated int64 `meddler:"repo_updated" json:"updated_at"`
|
2015-04-07 08:20:55 +00:00
|
|
|
}
|
|
|
|
|
2015-05-11 07:45:31 +00:00
|
|
|
type RepoCommit struct {
|
|
|
|
ID int64 `meddler:"repo_id,pk" json:"id"`
|
|
|
|
Owner string `meddler:"repo_owner" json:"owner"`
|
|
|
|
Name string `meddler:"repo_name" json:"name"`
|
|
|
|
FullName string `meddler:"repo_slug" json:"full_name"`
|
|
|
|
Number int `meddler:"commit_seq" json:"number"`
|
|
|
|
State string `meddler:"commit_state" json:"state"`
|
|
|
|
Started int64 `meddler:"commit_started" json:"started_at"`
|
|
|
|
Finished int64 `meddler:"commit_finished" json:"finished_at"`
|
2015-04-07 08:20:55 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
type Perm struct {
|
2015-05-22 00:00:31 +00:00
|
|
|
Pull bool `json:"pull"`
|
|
|
|
Push bool `json:"push"`
|
|
|
|
Admin bool `json:"admin"`
|
2015-04-07 08:20:55 +00:00
|
|
|
}
|