sessionhandler

package module
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2023 License: MIT Imports: 4 Imported by: 2

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
	FieldAccessLevel string // ej: staff_credentials, user_level
	// contains filtered or unexported fields
}

type Session

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

func Add

func Add(h *model.Handlers, 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) Create added in v0.0.2

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

func (Session) NameOfAuthHandler added in v0.0.3

func (s Session) NameOfAuthHandler() string

func (Session) Submit added in v0.0.5

func (s Session) Submit()

func (*Session) UserInterface added in v0.0.2

func (s *Session) UserInterface(opt ...string) string

type SessionStore added in v0.0.5

type SessionStore struct {
	Id_session     string `json:"i,omitempty" Legend:"Id"`
	Session_status string `json:"s,omitempty" Legend:"Estado"`
	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