configmock

package
v0.0.0-...-60b29a0 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthConfig

type AuthConfig struct {
	AccessTokenDuration  time.Duration
	RefreshTokenDuration time.Duration
	PasetoSymmetricKey   string
}

type ConfigMock

type ConfigMock struct {
	Redis RedisConfig
	Auth  AuthConfig
	DB    DBConfig
}

func New

func New() *ConfigMock

func (*ConfigMock) GetCacheManager

func (c *ConfigMock) GetCacheManager(ctrl *gomock.Controller) *mocks.MockCacheManager

func (*ConfigMock) GetCrypto

func (c *ConfigMock) GetCrypto(ctrl *gomock.Controller) *mocks.MockCrypto

func (*ConfigMock) GetLogger

func (c *ConfigMock) GetLogger() logger.Logger

func (*ConfigMock) GetMysqlDNS

func (c *ConfigMock) GetMysqlDNS() string

func (*ConfigMock) GetMysqlDSN

func (c *ConfigMock) GetMysqlDSN() string

func (*ConfigMock) GetValidator

func (c *ConfigMock) GetValidator(t *testing.T) validator.Validator

func (*ConfigMock) SetMySQLHostAndPort

func (c *ConfigMock) SetMySQLHostAndPort(host, port string)

func (*ConfigMock) SetRedisHost

func (c *ConfigMock) SetRedisHost(host, port string)

type DBConfig

type DBConfig struct {
	MySQL MySQLConfig
}

type MySQLConfig

type MySQLConfig struct {
	Host     string
	Port     string
	Username string
	Password string
	DBName   string
}

type RedisConfig

type RedisConfig struct {
	Host              string
	Password          string
	DB                int
	DefaultExpiration time.Duration
}

Jump to

Keyboard shortcuts

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