Documentation ¶
Index ¶
- Variables
- func DefaultCtx() context.Context
- func ShutdownWebHookListener()
- type AppCtrl
- type Bot
- func (b *Bot) HandleBountyRelease(issuePayload gwb.IssueCommentPayload, bounty *models.Bounty, ...)
- func (b *Bot) HandleBountyTransfer(issuePayload gwb.IssueCommentPayload, bounty *models.Bounty, ...)
- func (b *Bot) HandleIssueComment(issuePayload gwb.IssueCommentPayload, bounty *models.Bounty, ...)
- func (b *Bot) Init() error
- func (b *Bot) InstallWebHooks()
- func (b *Bot) ListenToWebHooks()
- func (b *Bot) PostBountyDeletedFromPlatformMessage(owner string, repo string, bounty *models.Bounty) error
- func (b *Bot) PostBountyReceiverUpdatedMessage(owner string, repo string, bounty *models.Bounty) error
- func (b *Bot) PostBountyReleasedMessage(owner string, repo string, bounty *models.Bounty) error
- func (b *Bot) PostBountySentMessage(owner string, repo string, bounty *models.Bounty, value uint64, ...) error
- func (b *Bot) PostNewBountyMessage(owner string, repo string, bounty *models.Bounty) error
- func (b *Bot) Run()
- func (b *Bot) Sync()
- type BountyCtrl
- func (bc *BountyCtrl) Add(owner string, repoName string, issueID int) (*models.Bounty, error)
- func (bc *BountyCtrl) Delete(id int64, repo ...*models.Repository) error
- func (bc *BountyCtrl) GetAccountBalance(seed string) (uint64, error)
- func (bc *BountyCtrl) GetAll() ([]models.Bounty, error)
- func (bc *BountyCtrl) GetByID(id int64) (*models.Bounty, error)
- func (bc *BountyCtrl) GetByIssueNumber(repoID int64, issueID int) (*models.Bounty, error)
- func (bc *BountyCtrl) GetOfRepository(owner string, name string) ([]models.Bounty, error)
- func (bc *BountyCtrl) Init() error
- func (bc *BountyCtrl) LoadAccount(seed string) (account.Account, error)
- func (bc *BountyCtrl) LoadAccountForSending(seed string) (account.Account, error)
- func (bc *BountyCtrl) ReleaseBounty(bounty *models.Bounty, receiverID int64) error
- func (bc *BountyCtrl) SyncBounties()
- func (bc *BountyCtrl) SyncBounty(bounty *models.Bounty) error
- func (bc *BountyCtrl) TransferBounty(bounty *models.Bounty, addr string) (bundle.Bundle, uint64, error)
- type Controller
- type RepoCtrl
- func (rc *RepoCtrl) Add(owner string, name string) (*models.Repository, error)
- func (rc *RepoCtrl) AddViaURL(url string) (*models.Repository, error)
- func (rc *RepoCtrl) Delete(id int64) error
- func (rc *RepoCtrl) GetAll() ([]models.Repository, error)
- func (rc *RepoCtrl) GetByID(id int64) (*models.Repository, error)
- func (rc *RepoCtrl) GetByOwnerAndName(owner string, name string) (*models.Repository, error)
- func (rc *RepoCtrl) Init() error
- func (rc *RepoCtrl) SyncRepo(repo *models.Repository) error
- func (rc *RepoCtrl) SyncRepositories()
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultTimeout = time.Duration(5) * time.Second
View Source
var ErrAlreadyConfirmed = errors.New("user is already confirmed")
View Source
var ErrBountyAddrEmpty = errors.New("the bounty address has no funds")
View Source
var ErrInternalError = errors.New("internal error occurred")
View Source
var ErrInvalidConfirmationCode = errors.New("invalid confirmation code")
View Source
var ErrInvalidID = errors.New("invalid object id")
View Source
var ErrInvalidModel = errors.New("invalid model")
View Source
var ErrInvalidModelDeletion = errors.New("invalid model deletion")
View Source
var ErrInvalidModelUpdate = errors.New("invalid model update")
View Source
var ErrInvalidQuery = errors.New("invalid query")
View Source
var ErrIssueDoesntExist = errors.New("issue doesn't exist")
View Source
var ErrIssueIsClosed = errors.New("issue is closed")
View Source
var ErrIssuesDeactivated = errors.New("repository has issues deactivated")
View Source
var ErrRepositoryNotInPlatform = errors.New("repository not added to platform")
Functions ¶
func DefaultCtx ¶
func ShutdownWebHookListener ¶
func ShutdownWebHookListener()
Types ¶
type Bot ¶
type Bot struct { Config *config.Configuration `inject:""` GHClient *github.Client `inject:""` RepoCtrl *RepoCtrl `inject:""` BountyCtrl *BountyCtrl `inject:""` Mongo *mongo.Client `inject:""` // contains filtered or unexported fields }
func (*Bot) HandleBountyRelease ¶
func (b *Bot) HandleBountyRelease(issuePayload gwb.IssueCommentPayload, bounty *models.Bounty, repo *models.Repository, comment string)
func (*Bot) HandleBountyTransfer ¶
func (b *Bot) HandleBountyTransfer(issuePayload gwb.IssueCommentPayload, bounty *models.Bounty, repo *models.Repository, addr string)
func (*Bot) HandleIssueComment ¶
func (b *Bot) HandleIssueComment(issuePayload gwb.IssueCommentPayload, bounty *models.Bounty, repo *models.Repository)
func (*Bot) InstallWebHooks ¶
func (b *Bot) InstallWebHooks()
func (*Bot) ListenToWebHooks ¶
func (b *Bot) ListenToWebHooks()
func (*Bot) PostBountyDeletedFromPlatformMessage ¶
func (*Bot) PostBountyReceiverUpdatedMessage ¶
func (*Bot) PostBountyReleasedMessage ¶
func (*Bot) PostBountySentMessage ¶
func (*Bot) PostNewBountyMessage ¶
type BountyCtrl ¶
type BountyCtrl struct { Config *config.Configuration `inject:""` GHClient *github.Client `inject:""` RepoCtrl *RepoCtrl `inject:""` Mongo *mongo.Client `inject:""` Coll *mongo.Collection DelColl *mongo.Collection Bot *Bot `inject:""` // contains filtered or unexported fields }
func (*BountyCtrl) Delete ¶
func (bc *BountyCtrl) Delete(id int64, repo ...*models.Repository) error
func (*BountyCtrl) GetAccountBalance ¶
func (bc *BountyCtrl) GetAccountBalance(seed string) (uint64, error)
func (*BountyCtrl) GetByIssueNumber ¶
func (*BountyCtrl) GetOfRepository ¶
func (*BountyCtrl) Init ¶
func (bc *BountyCtrl) Init() error
func (*BountyCtrl) LoadAccount ¶
func (bc *BountyCtrl) LoadAccount(seed string) (account.Account, error)
func (*BountyCtrl) LoadAccountForSending ¶
func (bc *BountyCtrl) LoadAccountForSending(seed string) (account.Account, error)
func (*BountyCtrl) ReleaseBounty ¶
func (bc *BountyCtrl) ReleaseBounty(bounty *models.Bounty, receiverID int64) error
func (*BountyCtrl) SyncBounties ¶
func (bc *BountyCtrl) SyncBounties()
func (*BountyCtrl) SyncBounty ¶
func (bc *BountyCtrl) SyncBounty(bounty *models.Bounty) error
func (*BountyCtrl) TransferBounty ¶
type Controller ¶
type Controller interface {
Init() error
}
type RepoCtrl ¶
type RepoCtrl struct { Config *config.Configuration `inject:""` BountyCtrl *BountyCtrl `inject:""` Bot *Bot `inject:""` GHClient *github.Client `inject:""` Mongo *mongo.Client `inject:""` Coll *mongo.Collection DelColl *mongo.Collection // contains filtered or unexported fields }
func (*RepoCtrl) GetByOwnerAndName ¶
func (*RepoCtrl) SyncRepositories ¶
func (rc *RepoCtrl) SyncRepositories()
Click to show internal directories.
Click to hide internal directories.