Documentation
¶
Index ¶
Constants ¶
View Source
const ( CookieMaxAgeInSeconds = 60 * 60 * 24 * 7 * 3 // 3 weeks CookieName = "sizeIt" KeyUser contextKey = 1 )
View Source
const ( LogKeyError = "error" LogKeyEvent = "event" LogKeyLatency = "latency" LogKeyMethod = "method" LogKeyURI = "uri" LogKeySession = "session" LogKeyStatus = "status" LogKeyUser = "user" )
Variables ¶
View Source
var ( ErrInvalidInput = errors.New("invalid input") ErrNotFound = errors.New("not found") )
Functions ¶
func ConfigureLogs ¶
func ConfigureLogs(dev bool)
Types ¶
type Config ¶
type Config struct {
DatabaseURL string
Dev bool
EmptySessionsTick time.Duration `envDefault:"1h"`
Host string
MaxInactiveTime time.Duration `envDefault:"5s"`
Path string
Port int `envDefault:"8080"`
}
func ParseConfig ¶
type FixedClock ¶
type FixedClock struct {
// contains filtered or unexported fields
}
func NewFixedClock ¶
func NewFixedClock(now time.Time) FixedClock
func (FixedClock) Now ¶
func (clk FixedClock) Now() time.Time
Click to show internal directories.
Click to hide internal directories.