sessionmanager

package
v0.0.2503 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2025 License: Apache-2.0 Imports: 11 Imported by: 1

Documentation

Overview

Copyright 2025 Contributors to the Veraison project. SPDX-License-Identifier: Apache-2.0

Copyright 2022-2025 Contributors to the Veraison project. SPDX-License-Identifier: Apache-2.0

Copyright 2025 Contributors to the Veraison project. SPDX-License-Identifier: Apache-2.0

Copyright 2025 Contributors to the Veraison project. SPDX-License-Identifier: Apache-2.0

Copyright 2022-2025 Contributors to the Veraison project. SPDX-License-Identifier: Apache-2.0

Index

Constants

View Source
const DefaultBackend = "ttlcache"
View Source
const DefaultMemcachedServer = "localhost:11211"

Variables

This section is empty.

Functions

This section is empty.

Types

type ISessionManager

type ISessionManager interface {
	Init(v *viper.Viper) error
	SetSession(id uuid.UUID, tenant string, session json.RawMessage, ttl time.Duration) error
	GetSession(id uuid.UUID, tenant string) (json.RawMessage, error)
	DelSession(id uuid.UUID, tenant string) error
	Close() error
}

func New added in v0.0.2503

func New(v *viper.Viper) (ISessionManager, error)

type Memcached added in v0.0.2503

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

func NewMemcached added in v0.0.2503

func NewMemcached() *Memcached

func (*Memcached) Close added in v0.0.2503

func (o *Memcached) Close() error

func (*Memcached) DelSession added in v0.0.2503

func (o *Memcached) DelSession(id uuid.UUID, tenant string) error

func (*Memcached) GetSession added in v0.0.2503

func (o *Memcached) GetSession(id uuid.UUID, tenant string) (json.RawMessage, error)

func (*Memcached) Init added in v0.0.2503

func (o *Memcached) Init(v *viper.Viper) error

func (*Memcached) SetSession added in v0.0.2503

func (o *Memcached) SetSession(
	id uuid.UUID,
	tenant string,
	session json.RawMessage,
	ttl time.Duration,
) error

type TTLCache added in v0.0.2503

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

func NewTTLCache added in v0.0.2503

func NewTTLCache() *TTLCache

func (*TTLCache) Close added in v0.0.2503

func (o *TTLCache) Close() error

func (*TTLCache) DelSession added in v0.0.2503

func (o *TTLCache) DelSession(id uuid.UUID, tenant string) error

func (*TTLCache) GetSession added in v0.0.2503

func (o *TTLCache) GetSession(id uuid.UUID, tenant string) (json.RawMessage, error)

func (*TTLCache) Init added in v0.0.2503

func (o *TTLCache) Init(v *viper.Viper) error

func (*TTLCache) SetSession added in v0.0.2503

func (o *TTLCache) SetSession(
	id uuid.UUID,
	tenant string,
	session json.RawMessage,
	ttl time.Duration,
) error

Jump to

Keyboard shortcuts

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