Documentation
¶
Index ¶
- Constants
- type Provider
- func (rp *Provider) SessionAll(_ context.Context) int
- func (rp *Provider) SessionDestroy(ctx context.Context, sid string) error
- func (rp *Provider) SessionExist(ctx context.Context, sid string) (bool, error)
- func (rp *Provider) SessionGC(_ context.Context)
- func (rp *Provider) SessionInit(ctx context.Context, maxlifetime int64, url string) (err error)
- func (rp *Provider) SessionRead(ctx context.Context, sid string) (session.Store, error)
- func (rp *Provider) SessionRegenerate(ctx context.Context, oldsid, sid string) (session.Store, error)
- type Store
- func (rs *Store) Delete(_ context.Context, key interface{}) error
- func (rs *Store) Flush(_ context.Context) error
- func (rs *Store) Get(_ context.Context, key interface{}) interface{}
- func (rs *Store) SessionID(_ context.Context) string
- func (rs *Store) SessionRelease(ctx context.Context, w http.ResponseWriter)
- func (rs *Store) SessionReleaseIfPresent(ctx context.Context, w http.ResponseWriter)
- func (rs *Store) Set(_ context.Context, key, value interface{}) error
Constants ¶
View Source
const (
// HarborProviderName is the harbor session provider name
HarborProviderName = "harbor"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
Provider redis session provider
func (*Provider) SessionAll ¶
SessionAll return all activeSession
func (*Provider) SessionDestroy ¶
SessionDestroy delete redis session by id
func (*Provider) SessionExist ¶
SessionExist check redis session exist by sid
func (*Provider) SessionInit ¶
SessionInit init redis session
func (*Provider) SessionRead ¶
SessionRead read redis session by sid
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store redis session store
func (*Store) SessionRelease ¶
func (rs *Store) SessionRelease(ctx context.Context, w http.ResponseWriter)
SessionRelease save session values to redis
func (*Store) SessionReleaseIfPresent ¶
func (rs *Store) SessionReleaseIfPresent(ctx context.Context, w http.ResponseWriter)
added by beego version v2.3.4, commit https://github.com/beego/beego/commit/06d869664a9c55aea6c2bb6ac3866f8a39b1100c#diff-bc81cfdba9f5250f9bf95ccaae2e4e34b37af87e2091dda11ef49dc58bd91c2c SessionReleaseIfPresent save session values to redis when key is present
Click to show internal directories.
Click to hide internal directories.