Documentation ¶
Index ¶
Constants ¶
View Source
const ( // DatastoreAuthorizations collection AUTHORIZATION DatastoreAuthorizations string = "AUTHORIZATIONS" // BackgroundWorkQueue is the default background job queue BackgroundWorkQueue string = "background-work" // DefaultCacheDuration default time to keep stuff in memory DefaultCacheDuration string = "15m" // SchedulerBaseURL is the prefix for all scheduller/cron tasks SchedulerBaseURL string = "/_i/1/scheduler" // JobsBaseURL is the prefix for all scheduled jobs JobsBaseURL string = "/_i/1/jobs" )
Variables ¶
This section is empty.
Functions ¶
func AuthorizationKey ¶
AuthorizationKey creates a datastore key for a workspace authorization based on the team_id.
func DumpPayload ¶
DumpPayload just prints the entire request body to STDOUT
func GetAuthToken ¶
GetAuthToken returns the oauth token of the workspace integration
Types ¶
type AuthorizationDS ¶
type AuthorizationDS struct { ID string Name string AccessToken string TokenType string AppID string BotUserID string Scope string // internal Created int64 Updated int64 }
AuthorizationDS holds basic information about a Slack team/workspace and the OAuth given at installtion time.
func GetAuthorization ¶
func GetAuthorization(ctx context.Context, id string) (*AuthorizationDS, error)
GetAuthorization returns the authorization granted to an app
Click to show internal directories.
Click to hide internal directories.