Browse Source

Add support for git push messages

main
Sam 5 years ago
parent
commit
a3c0fbf447
  1. 23
      chatIn.go
  2. 10
      chatOut.go
  3. 2
      keybase.go

23
chatIn.go

@ -30,10 +30,33 @@ type chatInAddedtoteam struct { @@ -30,10 +30,33 @@ type chatInAddedtoteam struct {
type chatInBulkaddtoconv struct {
Usernames []string `json:"usernames"`
}
type chatInCommits struct {
CommitHash string `json:"commitHash"`
Message string `json:"message"`
AuthorName string `json:"authorName"`
AuthorEmail string `json:"authorEmail"`
Ctime int `json:"ctime"`
}
type chatInRefs struct {
RefName string `json:"refName"`
Commits []chatInCommits `json:"commits"`
MoreCommitsAvailable bool `json:"moreCommitsAvailable"`
IsDelete bool `json:"isDelete"`
}
type chatInGitpush struct {
Team string `json:"team"`
Pusher string `json:"pusher"`
RepoName string `json:"repoName"`
RepoID string `json:"repoID"`
Refs []chatInRefs `json:"refs"`
PushType int `json:"pushType"`
PreviousRepoName string `json:"previousRepoName"`
}
type chatInSystem struct {
SystemType int `json:"systemType"`
Addedtoteam chatInAddedtoteam `json:"addedtoteam"`
Bulkaddtoconv chatInBulkaddtoconv `json:"bulkaddtoconv"`
Gitpush chatInGitpush `json:"gitpush"`
}
type chatInResult struct {
ResultTyp int `json:"resultTyp"`

10
chatOut.go

@ -43,12 +43,12 @@ type chatOutResultRatelimits struct { @@ -43,12 +43,12 @@ type chatOutResultRatelimits struct {
Gas int `json:"gas,omitempty"`
}
type conversation struct {
ID string `json:"id"`
ID string `json:"id"`
Channel Channel `json:"channel"`
Unread bool `json:"unread"`
ActiveAt int `json:"active_at"`
ActiveAtMs int64 `json:"active_at_ms"`
MemberStatus string `json:"member_status"`
Unread bool `json:"unread"`
ActiveAt int `json:"active_at"`
ActiveAtMs int64 `json:"active_at_ms"`
MemberStatus string `json:"member_status"`
}
type ChatOut struct {
Message string `json:"message,omitempty"`

2
keybase.go

@ -27,7 +27,7 @@ type Keybase struct { @@ -27,7 +27,7 @@ type Keybase struct {
// Chat holds basic information about a specific conversation
type Chat struct {
keybase Keybase
keybase Keybase
Channel Channel
}

Loading…
Cancel
Save