Documentation ¶
Index ¶
- Variables
- func BoolOption(key string) bool
- func CaptureException(err error, logMessage bool)
- func CaptureExceptionFromGin(gc *gin.Context, err error, logMessage bool)
- func CaptureMessage(msg string, logMessage bool)
- func CreateContext(value interface{}) gin.HandlerFunc
- func CreateLocation(host, scheme, headersScheme, headersHost string) gin.HandlerFunc
- func CreateSession(appname string) gin.HandlerFunc
- func DefaultSession(gc *gin.Context) sessions.Session
- func DurationOption(key string) time.Duration
- func FloatOption(key string) float64
- func GetAppName() string
- func GetAppVersion() string
- func GetBaseURL(gc *gin.Context) string
- func GetSentryHub(gc *gin.Context) *sentry.Hub
- func InitSentry(release string) gin.HandlerFunc
- func IntOption(key string) int
- func IntSliceOption(key string) []int
- func RegisterAlias(alias, key string)
- func SetBoolOption(key string, value bool) error
- func SetDefaultOption(key string, value interface{})
- func SetDefaults(appName, appVersion string)
- func SetFloatOption(key string, value float64) error
- func SetIntOption(key string, value int) error
- func SetIntSliceOption(key string, value []int) error
- func SetStringOption(key string, value string) error
- func SetStringSliceOption(key string, value []string) error
- func SetUintOption(key string, value uint) error
- func SetupConfig(appname string)
- func StringOption(key string) string
- func StringSliceOption(key string) []string
- func UintOption(key string) uint
- func WriteConfig() error
Constants ¶
This section is empty.
Variables ¶
var ContextKey = ""
ContextKey Context key value
var FileStorePath = ""
FileStorePath Path to file store
Functions ¶
func CaptureException ¶ added in v0.4.0
CaptureException capture error for sentry
func CaptureExceptionFromGin ¶ added in v0.6.3
CaptureExceptionFromGin capture error from gin for sentry
func CaptureMessage ¶ added in v0.4.0
CaptureMessage capture message for sentry
func CreateContext ¶
func CreateContext(value interface{}) gin.HandlerFunc
CreateContext Will add the application context to the context
func CreateLocation ¶ added in v0.14.2
func CreateLocation(host, scheme, headersScheme, headersHost string) gin.HandlerFunc
CreateLocation create location handler
func CreateSession ¶
func CreateSession(appname string) gin.HandlerFunc
CreateSession Create new session and return handler.
func DefaultSession ¶
DefaultSession is shortcut to get session
func DurationOption ¶
DurationOption return time duration option
func FloatOption ¶ added in v0.14.0
FloatOption return float option
func GetAppVersion ¶ added in v1.6.0
func GetAppVersion() string
GetAppVersion return application version
func GetBaseURL ¶
GetBaseURL return base URL as scheme + host + port
func GetSentryHub ¶ added in v0.4.0
GetSentryHub return Sentry hub from gin context
func InitSentry ¶ added in v0.4.0
func InitSentry(release string) gin.HandlerFunc
InitSentry initialize Sentry
func IntSliceOption ¶ added in v1.8.2
IntSliceOption return int slice option
func RegisterAlias ¶ added in v0.10.0
func RegisterAlias(alias, key string)
RegisterAlias Register alias for option key
func SetDefaultOption ¶
func SetDefaultOption(key string, value interface{})
SetDefaultOption Set default value to option
func SetDefaults ¶
func SetDefaults(appName, appVersion string)
SetDefaults Set application defaults
func SetFloatOption ¶ added in v0.14.0
SetFloatOption set float option
func SetIntSliceOption ¶ added in v1.8.2
SetIntSliceOption set int slice option
func SetStringOption ¶
SetStringOption set string option
func SetStringSliceOption ¶ added in v1.0.0
StringSliceOption set string slice option
func StringSliceOption ¶
StringSliceOption return string slice option
func UintOption ¶ added in v0.14.0
UintOption return uint settings option
Types ¶
This section is empty.