Documentation
¶
Index ¶
- func NewDB() *sql.DB
- type Beginner
- type CreateUsersParams
- type DBTX
- type GetByUserIDRow
- type Querier
- type Queries
- func (q *Queries) CreateUsers(ctx context.Context, db DBTX, arg CreateUsersParams) (sql.Result, error)
- func (q *Queries) GetByUserID(ctx context.Context, db DBTX, id int64) (GetByUserIDRow, error)
- func (q *Queries) GetPointByUserID(ctx context.Context, db DBTX, receivingUserID uint64) (Transactions, error)
- func (q *Queries) UpdateUser(ctx context.Context, db DBTX, arg UpdateUserParams) error
- func (q *Queries) UpdateUserMail(ctx context.Context, db DBTX, arg UpdateUserMailParams) error
- type Transactions
- type UpdateUserMailParams
- type UpdateUserParams
- type Users
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CreateUsersParams ¶
type CreateUsersParams struct {
FamilyName string `db:"family_name"`
FamilyNameKana string `db:"family_name_kana"`
FirstName string `db:"first_name"`
FirstNameKana string `db:"first_name_kana"`
Email string `db:"email"`
Password string `db:"password"`
SendingPoint int32 `db:"sending_point"`
CreatedAt time.Time `db:"created_at"`
UpdateAt time.Time `db:"update_at"`
}
type GetByUserIDRow ¶
type Querier ¶
type Querier interface {
CreateUsers(ctx context.Context, db DBTX, arg CreateUsersParams) (sql.Result, error)
GetByUserID(ctx context.Context, db DBTX, id int64) (GetByUserIDRow, error)
GetPointByUserID(ctx context.Context, db DBTX, receivingUserID uint64) (Transactions, error)
UpdateUser(ctx context.Context, db DBTX, arg UpdateUserParams) error
UpdateUserMail(ctx context.Context, db DBTX, arg UpdateUserMailParams) error
}
type Queries ¶
type Queries struct {
}
func (*Queries) CreateUsers ¶
func (*Queries) GetByUserID ¶
func (*Queries) GetPointByUserID ¶
func (*Queries) UpdateUser ¶
func (*Queries) UpdateUserMail ¶
type Transactions ¶
type Transactions struct {
// 取引の識別子
ID uint64 `db:"id"`
// 送信ユーザのID
SendingUserID uint64 `db:"sending_user_id"`
// 受信ユーザのID
ReceivingUserID uint64 `db:"receiving_user_id"`
// 取引ポイント
TransactionPoint int32 `db:"transaction_point"`
// 取引日時
TransactionAt time.Time `db:"transaction_at"`
}
取引
type UpdateUserMailParams ¶
type UpdateUserParams ¶
type Users ¶
type Users struct {
// ユーザーの識別子
ID int64 `db:"id"`
// 苗字
FamilyName string `db:"family_name"`
// 苗字カナ
FamilyNameKana string `db:"family_name_kana"`
// 名前
FirstName string `db:"first_name"`
// 名前カナ
FirstNameKana string `db:"first_name_kana"`
// メールアドレス
Email string `db:"email"`
// パスワードハッシュ
Password string `db:"password"`
// 送信可能ポイント
SendingPoint int32 `db:"sending_point"`
// レコード作成日時
CreatedAt time.Time `db:"created_at"`
// レコード修正日時
UpdateAt time.Time `db:"update_at"`
}
ユーザー
Source Files
¶
Click to show internal directories.
Click to hide internal directories.