storage

package
v0.0.0-...-aac1211 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDB

func NewDB() *sql.DB

Types

type DB

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

type IUser

type IUser interface {
	GetUsername() string
	SetUsername(string)
}

func NewUserStorage

func NewUserStorage(db *sql.DB) IUser

func NewUserTemorary

func NewUserTemorary() IUser

type Query

type Query struct {
	Fields []string
	Values []interface{}
}

func NewQuery

func NewQuery() *Query

func (*Query) AddField

func (q *Query) AddField(field string)

func (*Query) AddValue

func (q *Query) AddValue(value interface{})

func (*Query) GetFieldsAsString

func (q *Query) GetFieldsAsString() string

type Storage

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

func UseStorage

func UseStorage() *Storage

func (*Storage) User

func (s *Storage) User() IUser

type UserStorage

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

func (*UserStorage) GetUsername

func (u *UserStorage) GetUsername() string

func (*UserStorage) SetUsername

func (u *UserStorage) SetUsername(name string)

type UserTemorary

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

func (*UserTemorary) GetUsername

func (u *UserTemorary) GetUsername() string

func (*UserTemorary) SetUsername

func (u *UserTemorary) SetUsername(name string)

Jump to

Keyboard shortcuts

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