authrepository

package
v0.0.0-...-fd201ba Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthCache

type AuthCache struct {
	// contains filtered or unexported fields
}

func NewAuthCache

func NewAuthCache(log logger.Logger, conf config.Redis, driver *redis.Client) *AuthCache

func (AuthCache) GetTokenState

func (r AuthCache) GetTokenState(ctx context.Context, key string) (string, error)

func (AuthCache) SetTokenState

func (r AuthCache) SetTokenState(ctx context.Context, key string, value string, expiration time.Duration) error

type MockAuthCache

type MockAuthCache struct {
	mock.Mock
}

func (*MockAuthCache) GetTokenState

func (r *MockAuthCache) GetTokenState(ctx context.Context, key string) (string, error)

func (*MockAuthCache) SetTokenState

func (r *MockAuthCache) SetTokenState(ctx context.Context, key string, value string, expiration time.Duration) error

type MockOTPCache

type MockOTPCache struct {
	mock.Mock
}

func (*MockOTPCache) Get

func (r *MockOTPCache) Get(ctx context.Context, key string) (*domain.OTP, error)

func (*MockOTPCache) Set

func (r *MockOTPCache) Set(ctx context.Context, key string, value *domain.OTP, expiration time.Duration) error

type MockRoleCache

type MockRoleCache struct {
	mock.Mock
}

func (*MockRoleCache) Get

func (*MockRoleCache) Set

func (r *MockRoleCache) Set(ctx context.Context, key string, value *domain.RoleKeyType, expiration time.Duration) error

type OTPCache

type OTPCache struct {
	// contains filtered or unexported fields
}

func NewOTPCache

func NewOTPCache(log logger.Logger, conf config.Redis, driver *redis.Client) *OTPCache

func (OTPCache) Get

func (r OTPCache) Get(ctx context.Context, key string) (*domain.OTP, error)

func (OTPCache) Set

func (r OTPCache) Set(ctx context.Context, key string, value *domain.OTP, expiration time.Duration) error

type RoleCache

type RoleCache struct {
	// contains filtered or unexported fields
}

func NewRoleCache

func NewRoleCache(log logger.Logger, conf config.Redis, driver *redis.Client) *RoleCache

func (RoleCache) Get

func (r RoleCache) Get(ctx context.Context, key string) (*domain.RoleKeyType, error)

func (RoleCache) Set

func (r RoleCache) Set(ctx context.Context, key string, value *domain.RoleKeyType, expiration time.Duration) error

Jump to

Keyboard shortcuts

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