Documentation ¶
Overview ¶
Package storage provides storage implementations.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RepositoryProvider ¶
type RepositoryProvider struct { PostgresUserRepository *storagepostgres.UserRepository RedisRefreshTokenRepository *storageredis.RefreshTokenRepository }
RepositoryProvider is a provider for the PostgresUserRepository and RedisRefreshTokenRepository.
func NewRepositoryProvider ¶
func NewRepositoryProvider(options ...RepositoryProviderOption) *RepositoryProvider
NewRepositoryProvider creates a new instance of the RepositoryProvider. It takes one or more options that can be used to configure the provider.
type RepositoryProviderOption ¶
type RepositoryProviderOption func(rp *RepositoryProvider)
RepositoryProviderOption is a functional option for the RepositoryProvider.
func WithPostgreSQLUserRepository ¶
func WithPostgreSQLUserRepository(db *sqlx.DB) RepositoryProviderOption
WithPostgreSQLUserRepository is a functional option that sets the PostgresUserRepository of the RepositoryProvider to a new instance of `postgres.UserRepository`.
func WithRedisRefreshTokenRepository ¶
func WithRedisRefreshTokenRepository(db *redis.Client) RepositoryProviderOption
WithRedisRefreshTokenRepository is a functional option that sets the RedisRefreshTokenRepository of the RepositoryProvider to a new instance of `redis.RefreshTokenRepository`.
Directories ¶
Path | Synopsis |
---|---|
Package postgres provides a PostgreSQL repository implementation for storing and managing users.
|
Package postgres provides a PostgreSQL repository implementation for storing and managing users. |
Package redis provides a Redis repository implementation for storing and managing refresh tokens.
|
Package redis provides a Redis repository implementation for storing and managing refresh tokens. |