Documentation
¶
Index ¶
- Constants
- Variables
- func ApproveClaim(userID, bountyOwnerID uint, claimID uint, ownerCheck models.ClaimCheck) error
- func CheckUserVerifCode(verifCode string) error
- func ClaimBounty(claimerID uint, issueID uint, pullRequestURL string, claimDetails string, ...) error
- func CreateBounty(bounty *models.Bounty) error
- func CreateHost(host models.Host) error
- func CreateIdentity(identity *models.Identity) error
- func CreateIssue(issue models.Issue) (models.Issue, error)
- func CreateIssueFromGitHub(url string) (*models.Issue, error)
- func CreateOrganization(organization models.Organization) error
- func CreateRepository(repository models.Repository) error
- func CreateStripeSetupIntent(bounty *models.Bounty, ownerID uint, bountyOwnerStripeID string, ...) (*stripe.SetupIntent, error)
- func CreateUser(user models.User) error
- func CreateUserPassword(pwd, code string) error
- func DeleteBounty(bountyID, userID uint) error
- func DeleteClaim(claimID string) error
- func DeleteHost(hostID string) error
- func DeleteIssue(issueID string) error
- func DeleteOrganization(organizationID string) error
- func DeleteRepository(repositoryID string) error
- func FinalizeBounty(bountyID string) error
- func GenerateOAuthState(userID uint, oAuthHost string) (string, error)
- func GetAllUnconfirmedBounties() ([]models.Bounty, error)
- func GetAllUsers() ([]models.User, error)
- func GetBounties() ([]models.Bounty, error)
- func GetBounty(bountyID string) (models.Bounty, error)
- func GetBountyByID(bountyID uint) (models.Bounty, error)
- func GetClaim(claimID string) (models.Claim, error)
- func GetClaimByCaimCheck(claimerCheckID uint) (models.Claim, error)
- func GetClaims() ([]models.Claim, error)
- func GetCurrentBountyAmount(bountyID uint) (float64, error)
- func GetExternalIdentityByUserIDAndHostID(claimerID, hostID uint) (models.Identity, error)
- func GetGitHubAvatarURL(username string) (string, error)
- func GetHost(hostID string) (models.Host, error)
- func GetHostFromAddress(hostAddress string) (models.Host, error)
- func GetHostIdentitiesFromAddress(hostAddress string) ([]models.Identity, error)
- func GetHosts() ([]models.Host, error)
- func GetIssue(issueID string) (models.Issue, error)
- func GetIssueBounties(issueID string) (models.Issue, error)
- func GetIssueByID(issueID uint) (models.Issue, error)
- func GetIssueByURL(url string) (*models.Issue, error)
- func GetIssueByUrl(issueUrl string) (models.Issue, error)
- func GetIssues() ([]models.Issue, error)
- func GetMyIssues(userID uint) ([]models.Issue, error)
- func GetOrCreateCustomerID(accessToken, stripeAccountID, email string) (string, error)
- func GetOrganization(organizationID string) (models.Organization, error)
- func GetOrganizations() ([]models.Organization, error)
- func GetPaymentMethods(userID uint) ([]models.PaymentMethod, error)
- func GetPublicBountiesByIssue() ([]models.Issue, error)
- func GetRepositories() ([]models.Repository, error)
- func GetRepository(repositoryID string) (models.Repository, error)
- func GetUserByEmail(email string) (models.User, error)
- func GetUserByID(id uint) (models.User, error)
- func GetUserIdentities(userID uint) ([]models.Identity, error)
- func ParseGitHubURL(url string) (owner, repo string, err error)
- func PayoutBounty(bounty models.Bounty, ...) error
- func ProcessPayment(claimerID uint, bountyID uint) error
- func RemovePaymentMethod(userID uint, paymentMethodID string) error
- func SavePaymentMethod(userID uint, pm *stripe.PaymentMethod) error
- func SaveStripeConnectedAccountID(stateUserID uint, stripeUserAccountID, stripeUserCustomerID string) error
- func UpdateBounty(bounty models.Bounty) error
- func UpdateClaim(claim models.Claim) error
- func UpdateHost(host models.Host) error
- func UpdateIssue(issue models.Issue) error
- func UpdateOrganization(organization models.Organization) error
- func UpdateRepository(repository models.Repository) error
- func UpdateUserStripeID(id uint, stripeUserId string) error
- func ValidateBountyData(bounty models.Bounty, variables []models.BountyVariable) error
- type GitHubController
- type GitHubUser
- type OAuthState
Constants ¶
View Source
const ( Crescendo string = "crescendo" Flat string = "flat" Decrescendo string = "decrescendo" )
Variables ¶
Functions ¶
func ApproveClaim ¶
func ApproveClaim(userID, bountyOwnerID uint, claimID uint, ownerCheck models.ClaimCheck) error
func CheckUserVerifCode ¶
func ClaimBounty ¶
func CreateBounty ¶
func CreateHost ¶
func CreateIdentity ¶
func CreateOrganization ¶
func CreateOrganization(organization models.Organization) error
func CreateRepository ¶
func CreateRepository(repository models.Repository) error
func CreateStripeSetupIntent ¶
func CreateUser ¶
func CreateUserPassword ¶
func DeleteBounty ¶
func DeleteClaim ¶
func DeleteHost ¶
func DeleteIssue ¶
func DeleteOrganization ¶
func DeleteRepository ¶
func FinalizeBounty ¶
func GenerateOAuthState ¶
GenerateOAuthState generates an encrypted OAuth state
func GetAllUsers ¶
func GetBounties ¶
func GetCurrentBountyAmount ¶
func GetGitHubAvatarURL ¶
func GetOrCreateCustomerID ¶
func GetOrganization ¶
func GetOrganization(organizationID string) (models.Organization, error)
func GetOrganizations ¶
func GetOrganizations() ([]models.Organization, error)
func GetPaymentMethods ¶
func GetPaymentMethods(userID uint) ([]models.PaymentMethod, error)
func GetRepositories ¶
func GetRepositories() ([]models.Repository, error)
func GetRepository ¶
func GetRepository(repositoryID string) (models.Repository, error)
func ParseGitHubURL ¶
First, let's add a method to extract owner and repo from the URL
func PayoutBounty ¶
func ProcessPayment ¶
func RemovePaymentMethod ¶
func SavePaymentMethod ¶
func UpdateBounty ¶
func UpdateClaim ¶
func UpdateHost ¶
func UpdateIssue ¶
func UpdateOrganization ¶
func UpdateOrganization(organization models.Organization) error
func UpdateRepository ¶
func UpdateRepository(repository models.Repository) error
func UpdateUserStripeID ¶
func ValidateBountyData ¶
func ValidateBountyData(bounty models.Bounty, variables []models.BountyVariable) error
Types ¶
type GitHubController ¶
type GitHubController struct {
// contains filtered or unexported fields
}
func NewGitHubController ¶
func NewGitHubController() *GitHubController
func (*GitHubController) FetchGitHubIssue ¶
func (gc *GitHubController) FetchGitHubIssue(url string) (*models.GitHubIssue, error)
type GitHubUser ¶
type GitHubUser struct {
AvatarURL string `json:"avatar_url"`
}
type OAuthState ¶
type OAuthState struct { State string `json:"state"` ExpiresAt time.Time `json:"expires_at"` UserID uint `json:"user_id"` OAuthHost string `json:"oauth_host"` }
func DecryptAndReadOAuthState ¶
func DecryptAndReadOAuthState(encryptedState string, oAuthHost string) (*OAuthState, error)
DecryptAndReadOAuthState decrypts and parses the OAuth state
Click to show internal directories.
Click to hide internal directories.