sessionhandler

package module
v0.0.25 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2024 License: MIT Imports: 2 Imported by: 2 modules, 2 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const MODULE_NAME = "user"
View Source
const OBJECT_LOGIN = "login"
View Source
const TABLE_NAME = "session"

Variables

This section is empty.

Functions

This section is empty.

Types

type Config added in v0.0.4

type Config struct {
	UserTableName string // ej: staff,user,client
	FieldUser     *model.Field
	FieldPassword *model.Field

	FieldID   string // ej: id_staff, id_user
	FieldName string //ej: staff_name, user_name

	FieldArea string            //ej: staff_area, user_area
	AreasName map[string]string // areas del sistema key y su nombre

	FieldAccessLevel string // ej: staff_credentials, user_level

	model.CookieExpiration
	// contains filtered or unexported fields
}

type Session

type Session struct {
	HeaderAuthName string
	*model.Object
	Form *model.Object
	SessionStore
	*Config
}

func Add

func Add(h *model.MainHandler, c *Config) (s *Session, err string)

func (Session) BuildUserFromStoreData added in v0.0.5

func (s Session) BuildUserFromStoreData(data []map[string]string) (u *model.User, err string)

func (Session) Checking added in v0.0.6

func (s Session) Checking(u *model.User, params []map[string]string) (user_db map[string]string, err string)

func (Session) DecodeUser added in v0.0.8

func (s Session) DecodeUser(encode_user string) (u *model.User, err string)

func (Session) SessionHandlerName added in v0.0.17

func (s Session) SessionHandlerName() string

func (*Session) UserInterface added in v0.0.2

func (s *Session) UserInterface(u *model.User) string

type SessionStore added in v0.0.5

type SessionStore struct {
	Id_session     string `json:"i,omitempty" Legend:"Id"`
	Session_number string `json:"s,omitempty" Legend:"Numero de Sesión" Unique:"true"`
	Session_encode string `json:"e,omitempty" Legend:"Sesión"`
}

Jump to

Keyboard shortcuts

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