gitlabbot

package
v0.0.0-...-3abce5f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 13, 2023 License: BSD-3-Clause, MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DB

type DB struct {
	*base.DB
}

func NewDB

func NewDB(db *sql.DB) *DB

func (*DB) CreateSubscription

func (d *DB) CreateSubscription(convID chat1.ConvIDStr, repo string, oauthIdentifier string) error

func (*DB) DeleteSubscription

func (d *DB) DeleteSubscription(convID chat1.ConvIDStr, repo string) error

func (*DB) DeleteSubscriptionsForRepo

func (d *DB) DeleteSubscriptionsForRepo(convID chat1.ConvIDStr, repo string) error

func (*DB) DeleteToken

func (d *DB) DeleteToken(identifier string) error

func (*DB) GetAllSubscriptionsForConvID

func (d *DB) GetAllSubscriptionsForConvID(convID chat1.ConvIDStr) (res []string, err error)

func (*DB) GetSubscribedConvs

func (d *DB) GetSubscribedConvs(repo string) (res []chat1.ConvIDStr, err error)

func (*DB) GetSubscriptionExists

func (d *DB) GetSubscriptionExists(convID chat1.ConvIDStr, repo string) (exists bool, err error)

func (*DB) GetSubscriptionForRepoExists

func (d *DB) GetSubscriptionForRepoExists(convID chat1.ConvIDStr, repo string) (exists bool, err error)

func (*DB) GetToken

func (d *DB) GetToken(identifier string) (*oauth2.Token, error)

func (*DB) PutToken

func (d *DB) PutToken(identifier string, token *oauth2.Token) error

type HTTPSrv

type HTTPSrv struct {
	*base.HTTPSrv
	// contains filtered or unexported fields
}

func NewHTTPSrv

func NewHTTPSrv(stats *base.StatsRegistry, kbc *kbchat.API, debugConfig *base.ChatDebugOutputConfig,
	db *DB, handler *Handler, 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, httpPrefix string, secret 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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL