Documentation
¶
Index ¶
- func ContactAge(tx *sqlite.Conn, id int64) (int64, error)
- func ContactDelete(tx *sqlite.Conn, id int64) error
- func ContactUpdate(tx *sqlite.Conn, in ContactUpdateIn) error
- func SessionDelete(tx *sqlite.Conn, id string) error
- func SessionDeleteUser(tx *sqlite.Conn, user_id int64) error
- func SessionUpdate(tx *sqlite.Conn, in SessionUpdateIn) error
- type Contact
- type ContactAgeOut
- type ContactCreateIn
- type ContactCreateOut
- type ContactListOut
- type ContactListRow
- type ContactReadOut
- type ContactUpdateIn
- type Session
- type SessionCreateIn
- type SessionCreateOut
- type SessionGetOut
- type SessionUpdateIn
- type User
- type UserCreateIn
- type UserCreateOut
- type UserGetByEmailOut
- type UserGetOut
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContactUpdate ¶
func ContactUpdate(tx *sqlite.Conn, in ContactUpdateIn) error
func SessionUpdate ¶
func SessionUpdate(tx *sqlite.Conn, in SessionUpdateIn) error
Types ¶
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 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 SessionCreateIn ¶
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 UserCreateIn ¶
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)
Click to show internal directories.
Click to hide internal directories.