q

package
v0.0.0-...-769c1bd Latest Latest
Warning

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

Go to latest
Published: May 31, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContactAge

func ContactAge(tx *sqlite.Conn, id int64) (int64, error)

func ContactDelete

func ContactDelete(tx *sqlite.Conn, id int64) error

func ContactUpdate

func ContactUpdate(tx *sqlite.Conn, in ContactUpdateIn) error

func SessionDelete

func SessionDelete(tx *sqlite.Conn, id string) error

func SessionDeleteUser

func SessionDeleteUser(tx *sqlite.Conn, user_id int64) error

func SessionUpdate

func SessionUpdate(tx *sqlite.Conn, in SessionUpdateIn) error

Types

type Contact

type Contact struct {
	CreatedAt time.Time          `json:"created_at"`
	Email     string             `json:"email"`
	ID        int64              `json:"id"`
	Info      models.ContactInfo `json:"info"`
	Name      string             `json:"name"`
	Phone     string             `json:"phone"`
	UpdatedAt time.Time          `json:"updated_at"`
}

type ContactAgeOut

type ContactAgeOut struct {
	Age int64 `json:"age"`
}

type ContactCreateIn

type ContactCreateIn struct {
	Email string             `json:"email"`
	Info  models.ContactInfo `json:"info"`
	Name  string             `json:"name"`
	Phone string             `json:"phone"`
}

type ContactCreateOut

type ContactCreateOut struct {
	CreatedAt time.Time          `json:"created_at"`
	Email     string             `json:"email"`
	ID        int64              `json:"id"`
	Info      models.ContactInfo `json:"info"`
	Name      string             `json:"name"`
	Phone     string             `json:"phone"`
	UpdatedAt time.Time          `json:"updated_at"`
}

func ContactCreate

func ContactCreate(tx *sqlite.Conn, in ContactCreateIn) (*ContactCreateOut, error)

type ContactListOut

type ContactListOut []ContactListRow

func ContactList

func ContactList(tx *sqlite.Conn, limit int64) (ContactListOut, error)

type ContactListRow

type ContactListRow struct {
	CreatedAt time.Time          `json:"created_at"`
	Email     string             `json:"email"`
	ID        int64              `json:"id"`
	Info      models.ContactInfo `json:"info"`
	Name      string             `json:"name"`
	Phone     string             `json:"phone"`
	UpdatedAt time.Time          `json:"updated_at"`
}

type ContactReadOut

type ContactReadOut struct {
	CreatedAt time.Time          `json:"created_at"`
	Email     string             `json:"email"`
	ID        int64              `json:"id"`
	Info      models.ContactInfo `json:"info"`
	Name      string             `json:"name"`
	Phone     string             `json:"phone"`
	UpdatedAt time.Time          `json:"updated_at"`
}

func ContactRead

func ContactRead(tx *sqlite.Conn, id int64) (*ContactReadOut, error)

type ContactUpdateIn

type ContactUpdateIn struct {
	Email string             `json:"email"`
	Info  models.ContactInfo `json:"info"`
	Name  string             `json:"name"`
	Phone string             `json:"phone"`
	ID    int64              `json:"id"`
}

type Session

type Session struct {
	ExpiresAt time.Time `json:"expires_at"`
	ID        string    `json:"id"`
	UserId    int64     `json:"user_id"`
}

type SessionCreateIn

type SessionCreateIn struct {
	ID        string    `json:"id"`
	UserId    int64     `json:"user_id"`
	ExpiresAt time.Time `json:"expires_at"`
}

type SessionCreateOut

type SessionCreateOut struct {
	ExpiresAt time.Time `json:"expires_at"`
	ID        string    `json:"id"`
	UserId    int64     `json:"user_id"`
}

func SessionCreate

func SessionCreate(tx *sqlite.Conn, in SessionCreateIn) (*SessionCreateOut, error)

type SessionGetOut

type SessionGetOut struct {
	ExpiresAt time.Time `json:"expires_at"`
	ID        string    `json:"id"`
	UserId    int64     `json:"user_id"`
}

func SessionGet

func SessionGet(tx *sqlite.Conn, id string) (*SessionGetOut, error)

type SessionUpdateIn

type SessionUpdateIn struct {
	ExpiresAt time.Time `json:"expires_at"`
	ID        string    `json:"id"`
}

type User

type User struct {
	Email        string `json:"email"`
	ID           int64  `json:"id"`
	PasswordHash string `json:"password_hash"`
}

type UserCreateIn

type UserCreateIn struct {
	Email        string `json:"email"`
	PasswordHash string `json:"password_hash"`
}

type UserCreateOut

type UserCreateOut struct {
	Email        string `json:"email"`
	ID           int64  `json:"id"`
	PasswordHash string `json:"password_hash"`
}

func UserCreate

func UserCreate(tx *sqlite.Conn, in UserCreateIn) (*UserCreateOut, error)

type UserGetByEmailOut

type UserGetByEmailOut struct {
	Email        string `json:"email"`
	ID           int64  `json:"id"`
	PasswordHash string `json:"password_hash"`
}

func UserGetByEmail

func UserGetByEmail(tx *sqlite.Conn, email string) (*UserGetByEmailOut, error)

type UserGetOut

type UserGetOut struct {
	Email string `json:"email"`
	ID    int64  `json:"id"`
}

func UserGet

func UserGet(tx *sqlite.Conn, id int64) (*UserGetOut, error)

Jump to

Keyboard shortcuts

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