Documentation
¶
Index ¶
Constants ¶
View Source
const ConfigTagName = "config"
ConfigTagName - Defines the tag name to permit CacheConfig stores your configurations
Variables ¶
This section is empty.
Functions ¶
func GetCurrentConfig ¶
func GetCurrentConfig() string
GetCurrentConfig - Returns the current config
func LoadEnvConfig ¶
func LoadEnvConfig(c CacheConfigInterface)
LoadEnvConfig - Try to init the CacheConfigInterface using DefaultCacheConfig for default config fields and the custom CacheConfig passed as CacheConfigInterface, requires that "c" is a pointer to your custom CacheConfig
Types ¶
type CacheConfigInterface ¶
type CacheConfigInterface interface {
GetDefaultCacheConfig() CacheConfigInterface
}
CacheConfigInterface - Interface to implements CacheConfig No methods, all you need is to define the tag "config" for your Custom CacheConfig
type DefaultCacheConfig ¶
type DefaultCacheConfig struct { AppName string `config:"APP_NAME"` Debug bool `config:"DEBUG"` SQLDriver string `config:"SQL_DRIVER"` StringConnection string `config:"STRING_CONNECTION"` AppPort string `config:"APP_PORT"` }
DefaultCacheConfig - Defines the standard configuration
func (*DefaultCacheConfig) GetDefaultCacheConfig ¶
func (d *DefaultCacheConfig) GetDefaultCacheConfig() CacheConfigInterface
GetDefaultCacheConfig - Return the instance of CacheConfigInterface
Click to show internal directories.
Click to hide internal directories.