sessionrepo

package
v0.0.0-...-2515fb6 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SessionRepositoryCached

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

func (*SessionRepositoryCached) GetSession

func (r *SessionRepositoryCached) GetSession(ctx context.Context, id common.Hash) (*sessionModel, error)

GetSession returns a session by its ID from the read-through cache

func (*SessionRepositoryCached) RefreshSession

func (r *SessionRepositoryCached) RefreshSession(ctx context.Context, id common.Hash) error

RefreshSession refreshes the session cache by fetching the session from the blockchain

func (*SessionRepositoryCached) RemoveSession

func (r *SessionRepositoryCached) RemoveSession(ctx context.Context, id common.Hash) error

RemoveSession removes a session from the cache

func (*SessionRepositoryCached) SaveSession

func (r *SessionRepositoryCached) SaveSession(ctx context.Context, ses *sessionModel) error

SaveSession saves a session to the cache. Before saving it to cache you have to call GetSession

Jump to

Keyboard shortcuts

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