store

package
v0.0.0-...-105734b Latest Latest
Warning

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

Go to latest
Published: May 8, 2024 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Users

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

func NewUsers

func NewUsers(path string) (*Users, error)

NewUsers opens the users database and creates a users table if it doesn't exist. It errors out if the database cannot be opened or the create statement fails.

func (*Users) Add

func (u *Users) Add(email, visitorId string) (status string, err error)

AddUser adds a user to the database.

func (*Users) Check

func (u *Users) Check(visitorId string) (recentLogin bool, err error)

Check returns (true, nil) if another user already has signed up on the same device within the last minute.

func (*Users) Close

func (u *Users) Close() error

Close closes the Users store

Jump to

Keyboard shortcuts

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