fakes

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FakeSessionService

type FakeSessionService struct {
	Sessions map[SessionKey]TestSession
}

func (*FakeSessionService) AppendEvent

func (s *FakeSessionService) AppendEvent(ctx context.Context, curSession session.Session, event *session.Event) error

func (*FakeSessionService) Create

func (*FakeSessionService) Delete

func (*FakeSessionService) Get

func (*FakeSessionService) List

type SessionKey

type SessionKey struct {
	AppName   string
	UserID    string
	SessionID string
}

type TestEvents

type TestEvents []*session.Event

func (TestEvents) All

func (e TestEvents) All() iter.Seq[*session.Event]

func (TestEvents) At

func (e TestEvents) At(i int) *session.Event

func (TestEvents) Len

func (e TestEvents) Len() int

type TestSession

type TestSession struct {
	Id            SessionKey
	SessionState  TestState
	SessionEvents TestEvents
	UpdatedAt     time.Time
}

func (TestSession) AppName

func (s TestSession) AppName() string

func (TestSession) Events

func (s TestSession) Events() session.Events

func (TestSession) ID

func (s TestSession) ID() string

func (TestSession) LastUpdateTime

func (s TestSession) LastUpdateTime() time.Time

func (TestSession) State

func (s TestSession) State() session.State

func (TestSession) UserID

func (s TestSession) UserID() string

type TestState

type TestState map[string]any

func (TestState) All

func (s TestState) All() iter.Seq2[string, any]

func (TestState) Get

func (s TestState) Get(key string) (any, error)

func (TestState) Set

func (s TestState) Set(key string, val any) error

Jump to

Keyboard shortcuts

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