Documentation
¶
Index ¶
- type DefaultSession
- func (d *DefaultSession) Clear() Session
- func (d *DefaultSession) Created() time.Time
- func (d *DefaultSession) Data() map[string]string
- func (d *DefaultSession) Delete(key string)
- func (d *DefaultSession) Expire() time.Time
- func (d *DefaultSession) GetInt64(key string) int64
- func (d *DefaultSession) GetString(key string) string
- func (d *DefaultSession) GetStruct(key string, obj any)
- func (d *DefaultSession) Id() string
- func (d *DefaultSession) IsExpire() bool
- func (d *DefaultSession) MarshalJSON() ([]byte, error)
- func (d *DefaultSession) PutInt64(key string, value int64) Session
- func (d *DefaultSession) PutString(key string, value string) Session
- func (d *DefaultSession) PutStruct(key string, value any) Session
- func (d *DefaultSession) Reload() Session
- func (d *DefaultSession) Save() error
- func (d *DefaultSession) SetExpire(expire time.Time) Session
- func (d *DefaultSession) UnmarshalJSON(data []byte) error
- func (d *DefaultSession) Updated() time.Time
- type Session
- type SessionProvider
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DefaultSession ¶
type DefaultSession struct {
// contains filtered or unexported fields
}
func NewDefaultSession ¶ added in v1.6.2
func NewDefaultSession(sessionProvider SessionProvider) *DefaultSession
func (*DefaultSession) Clear ¶
func (d *DefaultSession) Clear() Session
func (*DefaultSession) Created ¶ added in v1.6.2
func (d *DefaultSession) Created() time.Time
func (*DefaultSession) Data ¶
func (d *DefaultSession) Data() map[string]string
func (*DefaultSession) Delete ¶
func (d *DefaultSession) Delete(key string)
func (*DefaultSession) Expire ¶
func (d *DefaultSession) Expire() time.Time
func (*DefaultSession) GetInt64 ¶
func (d *DefaultSession) GetInt64(key string) int64
func (*DefaultSession) GetString ¶
func (d *DefaultSession) GetString(key string) string
func (*DefaultSession) GetStruct ¶
func (d *DefaultSession) GetStruct(key string, obj any)
func (*DefaultSession) Id ¶ added in v1.6.2
func (d *DefaultSession) Id() string
func (*DefaultSession) IsExpire ¶
func (d *DefaultSession) IsExpire() bool
func (*DefaultSession) MarshalJSON ¶ added in v1.6.2
func (d *DefaultSession) MarshalJSON() ([]byte, error)
func (*DefaultSession) PutInt64 ¶
func (d *DefaultSession) PutInt64(key string, value int64) Session
func (*DefaultSession) PutString ¶
func (d *DefaultSession) PutString(key string, value string) Session
func (*DefaultSession) PutStruct ¶
func (d *DefaultSession) PutStruct(key string, value any) Session
func (*DefaultSession) Reload ¶
func (d *DefaultSession) Reload() Session
func (*DefaultSession) Save ¶
func (d *DefaultSession) Save() error
func (*DefaultSession) UnmarshalJSON ¶ added in v1.6.2
func (d *DefaultSession) UnmarshalJSON(data []byte) error
func (*DefaultSession) Updated ¶ added in v1.6.2
func (d *DefaultSession) Updated() time.Time
type Session ¶
type Session interface {
Id() string
GetString(key string) string
PutString(key string, value string) Session
GetInt64(key string) int64
PutInt64(key string, value int64) Session
GetStruct(key string, obj any)
PutStruct(key string, value any) Session
Clear() Session
Delete(key string)
Created() time.Time
Updated() time.Time
Expire() time.Time
Save() error
Reload() Session
Data() map[string]string
SetExpire(expire time.Time) Session
IsExpire() bool
}
Click to show internal directories.
Click to hide internal directories.