session

package
v1.15.0 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const Binding = "goravel.session"

Variables

View Source
var (
	SessionFacade session.Manager
	ConfigFacade  config.Config
)

Functions

This section is empty.

Types

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

func NewManager

func NewManager(config config.Config, json foundation.Json) *Manager

func (*Manager) BuildSession

func (m *Manager) BuildSession(handler sessioncontract.Driver, sessionID ...string) sessioncontract.Session

func (*Manager) Driver

func (m *Manager) Driver(name ...string) (sessioncontract.Driver, error)

func (*Manager) Extend

func (m *Manager) Extend(driver string, handler func() sessioncontract.Driver) sessioncontract.Manager

type ServiceProvider

type ServiceProvider struct {
}

func (*ServiceProvider) Boot

func (receiver *ServiceProvider) Boot(app foundation.Application)

func (*ServiceProvider) Register

func (receiver *ServiceProvider) Register(app foundation.Application)

type Session

type Session struct {
	// contains filtered or unexported fields
}

func NewSession

func NewSession(name string, driver sessioncontract.Driver, json foundation.Json, id ...string) *Session

func (*Session) All

func (s *Session) All() map[string]any

func (*Session) Exists

func (s *Session) Exists(key string) bool

func (*Session) Flash

func (s *Session) Flash(key string, value any) sessioncontract.Session

func (*Session) Flush

func (s *Session) Flush() sessioncontract.Session

func (*Session) Forget

func (s *Session) Forget(keys ...string) sessioncontract.Session

func (*Session) Get

func (s *Session) Get(key string, defaultValue ...any) any

func (*Session) GetID

func (s *Session) GetID() string

func (*Session) GetName

func (s *Session) GetName() string

func (*Session) Has

func (s *Session) Has(key string) bool

func (*Session) Invalidate

func (s *Session) Invalidate() error

func (*Session) Keep

func (s *Session) Keep(keys ...string) sessioncontract.Session

func (*Session) Missing

func (s *Session) Missing(key string) bool

func (*Session) Now

func (s *Session) Now(key string, value any) sessioncontract.Session

func (*Session) Only

func (s *Session) Only(keys []string) map[string]any

func (*Session) Pull

func (s *Session) Pull(key string, def ...any) any

func (*Session) Put

func (s *Session) Put(key string, value any) sessioncontract.Session

func (*Session) Reflash

func (s *Session) Reflash() sessioncontract.Session

func (*Session) Regenerate

func (s *Session) Regenerate(destroy ...bool) error

func (*Session) Remove

func (s *Session) Remove(key string) any

func (*Session) Save

func (s *Session) Save() error

func (*Session) SetID

func (s *Session) SetID(id string) sessioncontract.Session

func (*Session) SetName

func (s *Session) SetName(name string) sessioncontract.Session

func (*Session) Start

func (s *Session) Start() bool

func (*Session) Token

func (s *Session) Token() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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