Documentation ¶
Index ¶
- func GetDefaultBranch(repo string, client *github.Client) (branch string, err error)
- type DB
- func (d *DB) CreateSubscription(convID chat1.ConvIDStr, repo string, installationID int64) error
- func (d *DB) DeleteBranchesForRepo(convID chat1.ConvIDStr, repo string) error
- func (d *DB) DeleteFeaturesForRepo(convID chat1.ConvIDStr, repo string) error
- func (d *DB) DeleteSubscription(convID chat1.ConvIDStr, repo string) error
- func (d *DB) DeleteSubscriptionsForRepo(convID chat1.ConvIDStr, repo string) error
- func (d *DB) DeleteToken(identifier string) error
- func (d *DB) GetAllBranchesForRepo(convID chat1.ConvIDStr, repo string) ([]string, error)
- func (d *DB) GetAllSubscriptions() (res []DBSubscription, err error)
- func (d *DB) GetConvIDsFromRepoInstallation(repo string, installationID int64) (res []chat1.ConvIDStr, err error)
- func (d *DB) GetFeatures(convID chat1.ConvIDStr, repo string) (*Features, error)
- func (d *DB) GetFeaturesForAllRepos(convID chat1.ConvIDStr) (map[string]Features, error)
- func (d *DB) GetSubscriptionForBranchExists(convID chat1.ConvIDStr, repo string, branch string) (exists bool, err error)
- func (d *DB) GetSubscriptionForRepoExists(convID chat1.ConvIDStr, repo string) (exists bool, err error)
- func (d *DB) GetToken(identifier string) (*oauth2.Token, error)
- func (d *DB) GetUserPreferences(username string, convID chat1.ConvIDStr) (*UserPreferences, error)
- func (d *DB) PutToken(identifier string, token *oauth2.Token) error
- func (d *DB) SetFeatures(convID chat1.ConvIDStr, repo string, features *Features) error
- func (d *DB) SetUserPreferences(username string, convID chat1.ConvIDStr, prefs *UserPreferences) error
- func (d *DB) UnwatchBranch(convID chat1.ConvIDStr, repo string, branch string) error
- func (d *DB) WatchBranch(convID chat1.ConvIDStr, repo string, branch string) error
- type DBSubscription
- type Features
- type HTTPSrv
- type Handler
- type UserPreferences
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DB ¶
type DB struct {
*base.BaseOAuthDB
}
func (*DB) CreateSubscription ¶
func (*DB) DeleteBranchesForRepo ¶
func (*DB) DeleteFeaturesForRepo ¶
func (*DB) DeleteSubscription ¶
func (*DB) DeleteSubscriptionsForRepo ¶
func (*DB) DeleteToken ¶
func (*DB) GetAllBranchesForRepo ¶
func (*DB) GetAllSubscriptions ¶
func (d *DB) GetAllSubscriptions() (res []DBSubscription, err error)
func (*DB) GetConvIDsFromRepoInstallation ¶
func (*DB) GetFeatures ¶
func (*DB) GetFeaturesForAllRepos ¶
func (*DB) GetSubscriptionForBranchExists ¶
func (*DB) GetSubscriptionForRepoExists ¶
func (*DB) GetUserPreferences ¶
func (*DB) SetFeatures ¶
func (*DB) SetUserPreferences ¶
func (*DB) UnwatchBranch ¶
type DBSubscription ¶
util
type HTTPSrv ¶
type HTTPSrv struct { *base.OAuthHTTPSrv // contains filtered or unexported fields }
func NewHTTPSrv ¶
func NewHTTPSrv(stats *base.StatsRegistry, kbc *kbchat.API, debugConfig *base.ChatDebugOutputConfig, db *DB, handler *Handler, oauthConfig *oauth2.Config, atr *ghinstallation.AppsTransport, secret string) *HTTPSrv
type Handler ¶
type Handler struct { *base.DebugOutput // contains filtered or unexported fields }
func NewHandler ¶
func NewHandler(stats *base.StatsRegistry, kbc *kbchat.API, debugConfig *base.ChatDebugOutputConfig, db *DB, oauthConfig *oauth2.Config, atr *ghinstallation.AppsTransport, httpPrefix, appName string) *Handler
func (*Handler) HandleAuth ¶
func (h *Handler) HandleAuth(msg chat1.MsgSummary, _ string) error
func (*Handler) HandleCommand ¶
func (h *Handler) HandleCommand(msg chat1.MsgSummary) error
func (*Handler) HandleNewConv ¶
func (h *Handler) HandleNewConv(conv chat1.ConvSummary) error
type UserPreferences ¶
type UserPreferences struct {
Mention bool
}
Click to show internal directories.
Click to hide internal directories.