Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // AllLevels list containing all the possible log levels AllLevels = []string{seelog.TraceStr, seelog.DebugStr, seelog.InfoStr, seelog.WarnStr, seelog.ErrorStr, seelog.CriticalStr, seelog.OffStr} )
View Source
var CurrentLogOptions = &LogOptions{ logLevelInt: seelog.DebugLvl, LogLevel: seelog.DebugStr, }
CurrentLogOptions current seelog options
Functions ¶
func BootstrapLogger ¶
func BootstrapLogger(opts *LogOptions)
BootstrapLogger loads seelog package into the overall system
func ConfigureLogger ¶
func ConfigureLogger(level string)
ConfigureLogger configures options using parsed flag values
Types ¶
type LogOptions ¶
type LogOptions struct { LogLevel string // contains filtered or unexported fields }
LogOptions seelog options
type Ping ¶
type Ping struct { // example: pong Message string `json:"message"` }
Ping represents ping response swagger:model
type PingEndpoint ¶
type PingEndpoint struct { }
PingEndpoint responds to ping
func (*PingEndpoint) Ping ¶
func (p *PingEndpoint) Ping(c *gin.Context)
Ping responds to ping swagger:operation GET /ping ping --- summary: Responds to ping responses:
'200': description: Ping successful schema: "$ref": "#/definitions/Ping"
func (*PingEndpoint) RegisterRoutes ¶
func (p *PingEndpoint) RegisterRoutes(r gin.IRoutes)
RegisterRoutes registers ping route
type RateLimiter ¶
type RateLimiter struct {
// contains filtered or unexported fields
}
RateLimiter limits requests to certain endpoints
func NewRateLimiter ¶
func NewRateLimiter(requestsPerSecond float64) *RateLimiter
NewRateLimiter creates a new RateLimiter
func (*RateLimiter) Handler ¶
func (r *RateLimiter) Handler() gin.HandlerFunc
Handler returns handler func for gin
Click to show internal directories.
Click to hide internal directories.