data

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewLibSqlDatabase

func NewLibSqlDatabase(url string) (*sql.DB, error)

Types

type Mapping

type Mapping struct {
	ID     int
	Keymap string
	MapsTo string
}

type Storage

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

func NewStore

func NewStore(db *sql.DB) *Storage

func (*Storage) AddMapping

func (s *Storage) AddMapping(email string, keymap string, mapsTo string) error

func (*Storage) CreateOrUpdateUser

func (s *Storage) CreateOrUpdateUser(gothUser goth.User) error

func (*Storage) DeleteMapping

func (s *Storage) DeleteMapping(mappingID string, email string) error

func (*Storage) GetMapping

func (s *Storage) GetMapping(mappingID string, email string) *Mapping

func (*Storage) GetMappings

func (s *Storage) GetMappings(email string) []Mapping

func (*Storage) GetUserSettings

func (s *Storage) GetUserSettings(email string) *UserSettings

func (*Storage) UpdateMapping

func (s *Storage) UpdateMapping(
	mappingID string,
	email string,
	keymap string,
	mapsTo string,
) error

func (*Storage) UpdateUserSettings

func (s *Storage) UpdateUserSettings(email string, settings *UserSettings) error

type User

type User struct {
	ID        int
	Name      string
	Email     string
	DiscordID string
	GithubID  string
	GoogleID  string
	GitlabID  string
}

type UserSettings

type UserSettings struct {
	SearchEngine    string
	LeaderKey       string
	ShowSuggestions bool
}

Jump to

Keyboard shortcuts

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