Versions in this module Expand all Collapse all v0 v0.1.0 May 23, 2021 Changes in this version + func APIGatewayProxyRequestToHTTPRequest(req events.APIGatewayProxyRequest) (*http.Request, error) + func AuthenticateStravaUser(userAuthCode string) (*db.StravaUser, error) + func DeauthorizeStravaForCravackUser(user *db.CravackUser) error + func DeleteActivityMessage(event *db.CravackActivityEvent) error + func DeleteCravackActivityEvent(event *db.StravaEvent) (*db.CravackActivityEvent, error) + func DeleteCravackUser(user *db.CravackUser) error + func GetCravackActivityEvent(event *db.StravaEvent) (*db.CravackActivityEvent, error) + func GetCravackUser(athleteID int) (*db.CravackUser, error) + func GetCravackUserBySlackID(slackUserID string) (*db.CravackUser, error) + func GetStravaActivityForUser(event *db.StravaEvent, user *db.StravaUser) (*db.StravaEventFull, error) + func GetStravaUserRefreshToken(refreshToken string) (*db.StravaRefreshToken, error) + func HandleErrorAndLambdaReturn(err error, statusCode int) (events.APIGatewayProxyResponse, error) + func PostActivityMessage(activity *db.StravaEventFull, user *db.CravackUser) (string, string, error) + func PostCravackAuthenticationSuccess(user *db.CravackUser) (string, error) + func PutCravackActivityEvent(event *db.StravaEvent, slackChannelId, slackMsgTs string) (*dynamodb.PutItemOutput, error) + func PutCravackUser(user *db.CravackUser) (*dynamodb.PutItemOutput, error) + func SendStravaActivityEventMessage(event *db.StravaEvent) (string, error) + func UpdateActivityMessage(activity *db.StravaEventFull, user *db.CravackUser, ...) (string, string, error) + func UpdateCravackStravaToken(refreshedUser *db.StravaRefreshToken, athleteID int) (*db.CravackUser, error) + type SlackSlashCommand struct + APIAppID string + ChannelID string + ChannelName string + Command string + EnterpriseID string + EnterpriseName string + ResponseURL string + TeamDomain string + TeamID string + Text string + Token string + TriggerID string + UserID string + UserName string + func NewSlashCommandFromForm(form *url.Values) *SlackSlashCommand + func (slashCommand *SlackSlashCommand) GetDeauthorizeCravackResponse(host string) (*slack.WebhookMessage, error) + func (slashCommand *SlackSlashCommand) GetStravaConnectResponse(host string) (*slack.WebhookMessage, error) + func (slashCommand *SlackSlashCommand) GetUnknownCommandResponse(host string) (*slack.WebhookMessage, error)