oauthService

package
v0.0.0-...-27c9e6d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 13, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL