mysql

package
v0.0.0-...-d545df9 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OtpModel

type OtpModel struct {
	DB *sql.DB
}

func (*OtpModel) GetData

func (m *OtpModel) GetData(id int) (*models.Otps, error)

func (*OtpModel) InsertOtp

func (m *OtpModel) InsertOtp(id int, otp string) error

func (*OtpModel) UpdateOtp

func (m *OtpModel) UpdateOtp(id int, otp string) (int, error)

func (*OtpModel) UppdateVerifyStatus

func (m *OtpModel) UppdateVerifyStatus(id int) (int, error)

type ScrapModel

type ScrapModel struct {
	DB *sql.DB
}

func (*ScrapModel) Authenticate

func (m *ScrapModel) Authenticate(email, password string) (int, error)

func (*ScrapModel) Decrement

func (m *ScrapModel) Decrement(id, count int) (int, error)

func (*ScrapModel) Get

func (m *ScrapModel) Get(id int) (*models.Scrap, error)

This will return a specific snippet based on its id.

func (*ScrapModel) GetID

func (m *ScrapModel) GetID(socID string) (*models.Scrap, error)

func (*ScrapModel) GetKey

func (m *ScrapModel) GetKey(id string) (*models.Scrap, error)

func (*ScrapModel) Insert

func (m *ScrapModel) Insert(socID, email, password, guid string, count int, expires string) (int, error)

func (*ScrapModel) Latest

func (m *ScrapModel) Latest() ([]*models.Scrap, error)

This will return the 10 most recently created snippets.

type ScrapRequestModel

type ScrapRequestModel struct {
	DB *sql.DB
}

func (*ScrapRequestModel) GetData

func (m *ScrapRequestModel) GetData(guid string) (*models.ScrapRequest, error)

func (*ScrapRequestModel) Insert

func (m *ScrapRequestModel) Insert(uuid, guid string, BLOBData []byte) error

Jump to

Keyboard shortcuts

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