inmemory

package
v0.0.0-...-5164d6d Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Storage

type Storage struct {
	Auths map[auth.Method]map[auth.SocialID]*auth.Auth
	Lock  *sync.RWMutex
}

func NewAuthInMemory

func NewAuthInMemory() *Storage

func (*Storage) Get

func (s *Storage) Get(_ context.Context, method auth.Method, socialID auth.SocialID) (*auth.Auth, error)

func (*Storage) StartCreateTransaction

func (s *Storage) StartCreateTransaction(_ context.Context) (*sqlx.Tx, error)

func (*Storage) UpsertByTransaction

func (s *Storage) UpsertByTransaction(_ context.Context, _ *sqlx.Tx, a *auth.Auth) error

Jump to

Keyboard shortcuts

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