Documentation
¶
Overview ¶
Package data provides functions to manage persistent data storage. It is entirely inefficient and should be replaced with a proper solution.
Index ¶
- func AddBitbucketUser(accountID, email string) error
- func AddGitHubUser(username, email string) error
- func AddSlackUser(userID, email string) error
- func BitbucketUserEmailByID(accountID string) (string, error)
- func BitbucketUserIDByEmail(email string) (string, error)
- func DeleteBitbucketPR(url string) error
- func DeleteSlackBotIDs(botID string) error
- func DeleteURLAndIDMapping(key string) error
- func GetSlackBotUserID(botID string) (string, error)
- func GitHubUserEmailByID(username string) (string, error)
- func GitHubUserIDByEmail(email string) (string, error)
- func IsOptedIn(email string) (bool, error)
- func LoadBitbucketPR(url string) (any, error)
- func MapURLAndID(url, id string) error
- func OptInBitbucketUser(slackUserID, accountID, email string) error
- func OptInGitHubUser(slackUserID, username, email string) error
- func OptOut(email string) error
- func RemoveBitbucketUser(email string) error
- func RemoveGitHubUser(email string) error
- func RemoveSlackUser(email string) error
- func SetSlackBotUserID(botID, userID string) error
- func SlackUserEmailByID(userID string) (string, error)
- func SlackUserIDByEmail(email string) (string, error)
- func StoreBitbucketPR(url string, pr any) error
- func SwitchURLAndID(key string) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddBitbucketUser ¶
AddBitbucketUser saves a 2-way mapping between a Bitbucket user's account ID and email address.
func AddGitHubUser ¶
AddBitbucketUser saves a 2-way mapping between a GitHub user's username and email address.
func AddSlackUser ¶
AddBitbucketUser saves a 2-way mapping between a Slack user's user ID and email address.
func BitbucketUserEmailByID ¶
BitbucketUserEmailByID returns a Bitbucket user's email based on their account ID. Returns an empty string if the user is not found.
func BitbucketUserIDByEmail ¶
BitbucketUserIDByEmail returns a Bitbucket user's account ID based on their email. Returns an empty string if the user is not found.
func DeleteBitbucketPR ¶ added in v0.2.0
DeleteBitbucketPR deletes the snapshot of a Bitbucket pull request when it becomes obsolete (i.e. when the PR is merged, closed, or marked as a draft).
func DeleteSlackBotIDs ¶ added in v0.4.0
func DeleteURLAndIDMapping ¶ added in v0.2.0
DeleteURLAndIDMapping deletes the 2-way mapping between PR URLs and chat channel and thread IDs when they become obsolete (i.e. when the PR is merged, closed, or marked as a draft).
func GetSlackBotUserID ¶ added in v0.4.0
func GitHubUserEmailByID ¶
GitHubUserEmailByID returns a GitHub user's email based on their username. Returns an empty string if the user is not found.
func GitHubUserIDByEmail ¶
GitHubUserIDByEmail returns a GitHub user's username based on their email. Returns an empty string if the user is not found.
func LoadBitbucketPR ¶ added in v0.2.0
LoadBitbucketPR loads a snapshot of a Bitbucket pull request. This is used to detect changes in the pull request over time.
func MapURLAndID ¶ added in v0.2.0
MapURLAndID saves a 2-way mapping between a PR URL and its dedicated chat channel or thread IDs.
func OptInBitbucketUser ¶
func OptInGitHubUser ¶
func RemoveBitbucketUser ¶
RemoveBitbucketUser forgets a Bitbucket user's account ID and email.
func RemoveGitHubUser ¶
RemoveGitHubUser forgets a GitHub user's username and email.
func RemoveSlackUser ¶
RemoveSlackUser forgets a Slack user's user ID and email.
func SetSlackBotUserID ¶ added in v0.4.0
func SlackUserEmailByID ¶
SlackUserEmailByID returns a Slack user's email based on their user ID. Returns an empty string if the user is not found.
func SlackUserIDByEmail ¶
SlackUserIDByEmail returns a Slack user's user ID based on their email. Returns an empty string if the user is not found.
func StoreBitbucketPR ¶ added in v0.2.0
StoreBitbucketPR saves a snapshot of a Bitbucket pull request. This is used to detect changes in the pull request over time.
func SwitchURLAndID ¶ added in v0.2.0
SwitchURLAndID converts a PR URL to its mapped chat channel or thread IDs, and vice versa.
Types ¶
This section is empty.