Documentation ¶
Index ¶
- Variables
- type OAuthInfoService
- func (o *OAuthInfoService) CreateOAuthInfo(ctx context.Context, authorization string, userID uint, ...) error
- func (o *OAuthInfoService) GetAllAuthenticatedPlatforms(userID uint) ([]*domain.MeetingPlatform, error)
- func (o *OAuthInfoService) GetOAuthInfo(userID uint, platform *domain.MeetingPlatform) (*domain.OAuthInfo, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ProviderProductionSet provides an OAuthInfoService for use in production. ProviderProductionSet = wire.NewSet(Provide, wire.Bind(new(domain.OAuthInfoService), new(*OAuthInfoService))) )
Functions ¶
This section is empty.
Types ¶
type OAuthInfoService ¶
type OAuthInfoService struct {
// contains filtered or unexported fields
}
OAuthInfoService processes information about OAuthInfos.
func Provide ¶
func Provide(platformService domain.MeetingPlatformService, repo domain.OAuthInfoRepository) *OAuthInfoService
Provide returns an OAuthInfoService configured with the provided MeetingPlatformService and OAuthInfoRepository.
func (*OAuthInfoService) CreateOAuthInfo ¶
func (o *OAuthInfoService) CreateOAuthInfo(ctx context.Context, authorization string, userID uint, platform *domain.MeetingPlatform) error
CreateOAuthInfo creates an OAuthInfo in the repository by exchanging the given authorization with the MeetingPlatform.
func (*OAuthInfoService) GetAllAuthenticatedPlatforms ¶
func (o *OAuthInfoService) GetAllAuthenticatedPlatforms(userID uint) ([]*domain.MeetingPlatform, error)
GetAllAuthenticatedPlatforms gets all MeetingPlatforms a User with the provided userID has authenticated with.
func (*OAuthInfoService) GetOAuthInfo ¶
func (o *OAuthInfoService) GetOAuthInfo(userID uint, platform *domain.MeetingPlatform) (*domain.OAuthInfo, error)
GetOAuthInfo retrieves the OAuthInfo from the repository for the given User and MeetingPlatform combination. If the access tokens contained withing the OAuthInfo is expired, it is automatically refreshed.
Click to show internal directories.
Click to hide internal directories.