dvsecurity

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 16, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SessionId                         = "SESSION_ID"
	MODE_SESSION_MAY_BE               = 0
	MODE_SESSION_CREATE_IF_NOT_EXISTS = 1
	MODE_SESSION_MUST_EXIST           = 2
)

Variables

This section is empty.

Functions

func CleanOldSessions

func CleanOldSessions(updateTime int64) (err error)

func CreateSession

func CreateSession(initialData map[string]string, env *dvevaluation.DvObject) (err error)

func IsSessionPresent

func IsSessionPresent(sessionId string) (bool, error)

func ReadSession

func ReadSession(sessionId string, force bool) (data map[string]string, err error)

func ReadSessionByEnvironment

func ReadSessionByEnvironment(env *dvevaluation.DvObject) (string, map[string]string, error)

func UpdateBySession

func UpdateBySession(env *dvevaluation.DvObject, mode int) (err error)

func UpdateSessionWithKeyValue

func UpdateSessionWithKeyValue(env *dvevaluation.DvObject, key string, value string) (err error)

func UpdateSessionWithMap

func UpdateSessionWithMap(env *dvevaluation.DvObject, info map[string]string) (err error)

func WriteToSession

func WriteToSession(sessionId string, data map[string]string) (orig map[string]string, err error)

Types

type SessionMetaInfo

type SessionMetaInfo struct {
	Db              string   `json:"db"`
	Table           string   `json:"table"`
	Id              string   `json:"id"`
	Data            string   `json:"data"`
	ModTime         string   `json:"modTime"`
	Prefix          string   `json:"prefix"`
	ReadSql         []string `json:"readSql"`
	CreateSql       []string `json:"createSql"`
	UpdateSql       []string `json:"updateSql"`
	DeleteExpireSql string   `json:"deleteExpireSql"`
	SqlType         int
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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