Documentation ¶
Index ¶
- type OauthManager
- func (manager *OauthManager) AddUserProvider(userProvider models.UserProvider) error
- func (manager *OauthManager) DeleteUserProvider(accountId, userProviderName string) error
- func (manager *OauthManager) GetAllUserProviders(accountId string) (providers []models.UserProvider, err error)
- func (manager *OauthManager) GetRedisPairValue(key string) (exist bool, value string, err error)
- func (manager *OauthManager) GetUserProviderByName(accountId, name string) (models.UserProvider, error)
- func (manager *OauthManager) GetUserProviderByTag(tag string) (models.UserProvider, error)
- func (manager *OauthManager) SetRedisPair(key, value string, ttl time.Duration) (err error)
- func (manager *OauthManager) UpdateUserProvider(userProvider models.UserProvider) error
- type OauthService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OauthManager ¶
type OauthManager struct { Store oauthStore.OauthStore RedisStore redisStore.RedisStore }
func (*OauthManager) AddUserProvider ¶
func (manager *OauthManager) AddUserProvider(userProvider models.UserProvider) error
func (*OauthManager) DeleteUserProvider ¶
func (manager *OauthManager) DeleteUserProvider(accountId, userProviderName string) error
func (*OauthManager) GetAllUserProviders ¶
func (manager *OauthManager) GetAllUserProviders(accountId string) (providers []models.UserProvider, err error)
func (*OauthManager) GetRedisPairValue ¶
func (manager *OauthManager) GetRedisPairValue(key string) (exist bool, value string, err error)
func (*OauthManager) GetUserProviderByName ¶
func (manager *OauthManager) GetUserProviderByName(accountId, name string) (models.UserProvider, error)
func (*OauthManager) GetUserProviderByTag ¶
func (manager *OauthManager) GetUserProviderByTag(tag string) (models.UserProvider, error)
func (*OauthManager) SetRedisPair ¶
func (manager *OauthManager) SetRedisPair(key, value string, ttl time.Duration) (err error)
func (*OauthManager) UpdateUserProvider ¶
func (manager *OauthManager) UpdateUserProvider(userProvider models.UserProvider) error
type OauthService ¶
type OauthService interface { GetRedisPairValue(key string) (exist bool, value string, err error) SetRedisPair(key, value string, ttl time.Duration) (err error) AddUserProvider(userProvider models.UserProvider) error DeleteUserProvider(accountId, userProviderName string) error GetUserProviderByName(accountId, name string) (models.UserProvider, error) GetUserProviderByTag(tag string) (models.UserProvider, error) UpdateUserProvider(userProvider models.UserProvider) error GetAllUserProviders(accountId string) ([]models.UserProvider, error) }
func NewOauthService ¶
func NewOauthService(store oauthStore.OauthStore, redisStore redisStore.RedisStore) OauthService
Click to show internal directories.
Click to hide internal directories.