conf

package
v1.1.8-0...-5ee8a8c Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2021 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultConf = NewDefault()

DefaultConf default conf

Functions

This section is empty.

Types

type Conf

type Conf struct {
	Enable      bool          `json:"enable"`      //false
	LifeTime    int           `json:"lifeTime"`    //20 (min)
	Name        string        `json:"name"`        //_sid
	Prefix      string        `json:"prefix"`      //session id prefix
	Suffix      string        `json:"suffix"`      //session id suffix
	Engine      string        `json:"engine"`      //memory
	Source      string        `json:"source"`      //header|cookie
	HTTPOnly    bool          `json:"httpOnly"`    //httpOnly
	Secure      bool          `json:"secure"`      //secure
	SameSite    http.SameSite `json:"sameSite"`    //strict|lax|none
	Domain      string        `json:"domain"`      //domain
	SessionLock bool          `json:"sessionLock"` //each session a lock(default is false)
	Redis       *RedisConf    `json:"redis"`       //redis
}

Conf config

func NewDefault

func NewDefault() *Conf

NewDefault create default *session.Conf

type RedisConf

type RedisConf struct {
	Addrs    string `json:"addrs"`    //
	Password string `json:"password"` //
	PoolSize int    `json:"poolSize"` //
}

RedisConf config

Jump to

Keyboard shortcuts

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