Documentation
¶
Index ¶
- Variables
- type BountyIssue
- type BountyIssueStore
- func (store *BountyIssueStore) Add(ctx context.Context, issue *BountyIssue) error
- func (store *BountyIssueStore) Delete(ctx context.Context, id int64) error
- func (store *BountyIssueStore) Get(ctx context.Context, id int64) (*BountyIssue, error)
- func (u *BountyIssueStore) ListAll(ctx context.Context) ([]*BountyIssue, error)
- func (store *BountyIssueStore) Update(ctx context.Context, issue *BountyIssue) error
- type GithubCommenter
- type GithubService
- type InvoicePageData
- type InvoiceResponse
- type IssueService
- func (srv *IssueService) AddBountyIssue(ctx context.Context, id int64, link string, owner string, repo string, ...) (*BountyIssue, error)
- func (srv *IssueService) CloseIssue(ctx context.Context, id int64) error
- func (srv *IssueService) GetBountyInvoice(ctx context.Context, id, sats int64) (string, error)
- func (srv *IssueService) ListenPayment(issue *BountyIssue, rHash []byte, payreqString string, sats int64)
- func (srv *IssueService) RecoverPayments(ctx context.Context) error
- func (srv *IssueService) RemovePayment(ctx context.Context, issue *BountyIssue, payreqString string) error
- func (srv *IssueService) SettleInvoice(ctx context.Context, issue *BountyIssue, payreqString string, sats int64) error
- type IssueStore
- type WebhookHandler
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrDoesNotExist = fmt.Errorf("does not exist")
)
View Source
var (
InactiveError = fmt.Errorf("Issue is not active")
)
Functions ¶
This section is empty.
Types ¶
type BountyIssue ¶
type BountyIssueStore ¶
type BountyIssueStore struct {
// contains filtered or unexported fields
}
func NewBountyIssueStore ¶
func NewBountyIssueStore(db *bbolt.DB) (*BountyIssueStore, error)
func (*BountyIssueStore) Add ¶
func (store *BountyIssueStore) Add(ctx context.Context, issue *BountyIssue) error
func (*BountyIssueStore) Delete ¶
func (store *BountyIssueStore) Delete(ctx context.Context, id int64) error
func (*BountyIssueStore) Get ¶
func (store *BountyIssueStore) Get(ctx context.Context, id int64) (*BountyIssue, error)
func (*BountyIssueStore) ListAll ¶
func (u *BountyIssueStore) ListAll(ctx context.Context) ([]*BountyIssue, error)
func (*BountyIssueStore) Update ¶
func (store *BountyIssueStore) Update(ctx context.Context, issue *BountyIssue) error
type GithubCommenter ¶
type GithubCommenter interface {
AddComment(ctx context.Context, bountyIssue *BountyIssue) (int64, error)
UpdateBountyComment(ctx context.Context, bountyIssue *BountyIssue) error
CloseBountyComment(ctx context.Context, bountyIssue *BountyIssue) error
}
type GithubService ¶
type GithubService struct {
// contains filtered or unexported fields
}
func NewGithubService ¶
func NewGithubService(baseUrl string, client *github.Client) *GithubService
func (*GithubService) AddComment ¶
func (g *GithubService) AddComment(ctx context.Context, bountyIssue *BountyIssue) (int64, error)
func (*GithubService) CloseBountyComment ¶
func (g *GithubService) CloseBountyComment(ctx context.Context, bountyIssue *BountyIssue) error
func (*GithubService) UpdateBountyComment ¶
func (g *GithubService) UpdateBountyComment(ctx context.Context, bountyIssue *BountyIssue) error
type InvoicePageData ¶
type InvoicePageData struct {
Invoice string
}
type InvoiceResponse ¶
type InvoiceResponse struct {
Invoice string `json:"invoice"`
}
type IssueService ¶
func NewIssueService ¶
func NewIssueService(cfg *config.Config, store IssueStore, ghClient GithubCommenter, lndClient lnrpc.LightningClient) *IssueService
func (*IssueService) AddBountyIssue ¶
func (*IssueService) CloseIssue ¶
func (srv *IssueService) CloseIssue(ctx context.Context, id int64) error
func (*IssueService) GetBountyInvoice ¶
func (*IssueService) ListenPayment ¶
func (srv *IssueService) ListenPayment(issue *BountyIssue, rHash []byte, payreqString string, sats int64)
func (*IssueService) RecoverPayments ¶
func (srv *IssueService) RecoverPayments(ctx context.Context) error
func (*IssueService) RemovePayment ¶
func (srv *IssueService) RemovePayment(ctx context.Context, issue *BountyIssue, payreqString string) error
func (*IssueService) SettleInvoice ¶
func (srv *IssueService) SettleInvoice(ctx context.Context, issue *BountyIssue, payreqString string, sats int64) error
type IssueStore ¶
type WebhookHandler ¶
type WebhookHandler struct {
// contains filtered or unexported fields
}
func NewWebhookHandler ¶
func NewWebhookHandler(cfg *config.Config, is *IssueService, ipRange []string) (*WebhookHandler, error)
func (*WebhookHandler) SetupIpaddress ¶
func (wh *WebhookHandler) SetupIpaddress(ip string)
func (*WebhookHandler) StartHandler ¶
func (wh *WebhookHandler) StartHandler(address string) error
Click to show internal directories.
Click to hide internal directories.