Browse Source

Add support for git push messages

main
Sam 6 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 {
type chatInBulkaddtoconv struct { type chatInBulkaddtoconv struct {
Usernames []string `json:"usernames"` 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 { type chatInSystem struct {
SystemType int `json:"systemType"` SystemType int `json:"systemType"`
Addedtoteam chatInAddedtoteam `json:"addedtoteam"` Addedtoteam chatInAddedtoteam `json:"addedtoteam"`
Bulkaddtoconv chatInBulkaddtoconv `json:"bulkaddtoconv"` Bulkaddtoconv chatInBulkaddtoconv `json:"bulkaddtoconv"`
Gitpush chatInGitpush `json:"gitpush"`
} }
type chatInResult struct { type chatInResult struct {
ResultTyp int `json:"resultTyp"` ResultTyp int `json:"resultTyp"`

10
chatOut.go

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

2
keybase.go

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

Loading…
Cancel
Save