examples

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CustomIdentifier

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

func (CustomIdentifier) String

func (ci CustomIdentifier) String() string

type MemoryStore

type MemoryStore struct {
	Users    map[gosesh.Identifier]*CustomIdentifier
	Sessions map[gosesh.Identifier]*Session
}

func NewMemoryStore

func NewMemoryStore() *MemoryStore

func (*MemoryStore) CreateSession

func (ms *MemoryStore) CreateSession(ctx context.Context, req gosesh.CreateSessionRequest) (gosesh.Session, error)

func (*MemoryStore) DeleteSession

func (ms *MemoryStore) DeleteSession(ctx context.Context, sessionID gosesh.Identifier) error

func (*MemoryStore) DeleteUserSessions

func (ms *MemoryStore) DeleteUserSessions(ctx context.Context, userID gosesh.Identifier) (int, error)

func (*MemoryStore) GetSession

func (ms *MemoryStore) GetSession(ctx context.Context, sessionID gosesh.Identifier) (gosesh.Session, error)

func (*MemoryStore) UpsertUser

func (ms *MemoryStore) UpsertUser(ctx context.Context, user gosesh.OAuth2User) (gosesh.Identifier, error)

type Session added in v0.4.0

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

func (Session) ExpireAt added in v0.4.0

func (s Session) ExpireAt() time.Time

func (Session) ID added in v0.4.0

func (s Session) ID() gosesh.Identifier

func (Session) IdleAt added in v0.4.0

func (s Session) IdleAt() time.Time

func (Session) UserID added in v0.4.0

func (s Session) UserID() gosesh.Identifier

Jump to

Keyboard shortcuts

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