Versions in this module Expand all Collapse all v0 v0.3.1 Jan 28, 2022 v0.3.0 Dec 6, 2021 v0.2.0 Aug 13, 2021 Changes in this version + const OAuthServerEndpoint + func NewService(db *gorm.DB, httpClient Doer, slackAppConfig domain.SlackApp, ...) (domain.CodeExchangeService, error) + type AccessToken struct + AccessToken string + CreatedAt time.Time + ID uint + UpdatedAt time.Time + Workspace string + type CodeExchangeHTTPResponse struct + AccessToken string + Ok bool + Team struct{ ... } + type Doer interface + Do func(req *http.Request) (*http.Response, error) + type DoerMock struct + func (_m *DoerMock) Do(req *http.Request) (*http.Response, error) + type ExchangeRepository interface + Get func(string) (string, error) + Migrate func() error + Upsert func(*AccessToken) error + type Exchanger interface + Exchange func(string, string, string) (CodeExchangeHTTPResponse, error) + type MockExchangeRepository struct + func (_m *MockExchangeRepository) Get(_a0 string) (string, error) + func (_m *MockExchangeRepository) Migrate() error + func (_m *MockExchangeRepository) Upsert(_a0 *AccessToken) error + type MockExchanger struct + func (_m *MockExchanger) Exchange(_a0 string, _a1 string, _a2 string) (CodeExchangeHTTPResponse, error) + type Repository struct + func NewRepository(db *gorm.DB, encryptionKey string) (*Repository, error) + func (r Repository) Get(workspace string) (string, error) + func (r Repository) Migrate() error + func (r Repository) Upsert(accessToken *AccessToken) error + type Service struct + func (service Service) Exchange(payload domain.OAuthPayload) (*domain.OAuthExchangeResponse, error) + func (service Service) GetToken(workspace string) (string, error) + func (service Service) Migrate() error + type SlackClient struct + func NewSlackClient(doer Doer) *SlackClient + func (c *SlackClient) Exchange(code, clientID, clientSecret string) (CodeExchangeHTTPResponse, error)