Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Postgres ¶
type Postgres struct {
// contains filtered or unexported fields
}
Postgres implements the verifier store functions using Postgresql as the persistence layer
func NewPostgres ¶
func NewPostgres(cfg *PostgresConfig) (*Postgres, error)
NewPostgres returns a new instance of Postgres with all the required fields initialized
type PostgresConfig ¶
type PostgresConfig struct {
Host string `json:"host,omitempty"`
Port string `json:"port,omitempty"`
Username string `json:"username,omitempty"`
Password string `json:"password,omitempty"`
StoreName string `json:"storeName,omitempty"`
PoolSize int `json:"poolSize,omitempty"`
SSLMode string `json:"sslMode,omitempty"`
DialTimeout time.Duration `json:"dialTimeoutSecs,omitempty"`
ReadTimeout time.Duration `json:"readTimeoutSecs,omitempty"`
WriteTimeout time.Duration `json:"writeTimeoutSecs,omitempty"`
IdleTimeout time.Duration `json:"idleTimeoutSecs,omitempty"`
TableName string `json:"tableName,omitempty"`
}
PostgresConfig holds all configuration required for postgres
func (*PostgresConfig) ConnURL ¶
func (pgcfg *PostgresConfig) ConnURL() string
ConnURL returns the connection URL
type Redis ¶
type Redis struct {
// contains filtered or unexported fields
}
Redis struct exposes all the store functionalities required for verifier
func NewRedis ¶
func NewRedis(cfg *RedisConfig) (*Redis, error)
NewRedis returns a newly initialized redis store
type RedisConfig ¶
type RedisConfig struct {
Hosts []string `json:"hosts,omitempty"`
Username string `json:"username,omitempty"`
Password string `json:"password,omitempty"`
DialTimeout time.Duration `json:"dialTimeoutSecs,omitempty"`
ReadTimeout time.Duration `json:"readTimeoutSecs,omitempty"`
WriteTimeout time.Duration `json:"writeTimeoutSecs,omitempty"`
}
RedisConfig holds all the configuration required for the redis handler
Click to show internal directories.
Click to hide internal directories.