singleton

package module
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option added in v1.0.1

type Option func(*Singleton) error

func WithRedisClient added in v1.0.1

func WithRedisClient(options *redis.Options) Option

func WithViper added in v1.0.3

func WithViper(options ViperOptions) Option

type Singleton added in v1.0.1

type Singleton struct {
	Redis *redis.Client
	Viper *viper.Viper
}

func (*Singleton) AddPlugin added in v1.0.2

func (s *Singleton) AddPlugin(opts ...Option) (err error)

type ViperOptions added in v1.0.3

type ViperOptions struct {
	Path     string // path to look for the config file in, absolute path start with / and relative path start with .
	FileName string // name of config file (without extension)
	FileType string // REQUIRED if the config file does not have the extension in the name
	EnvName  string // Env to read from the config file
	Target   any
}

Jump to

Keyboard shortcuts

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