# README
リポジトリ層
- データストア(データベース)とドメインの橋かけを担う
- DB操作にまつわる操作(SQL)などは必ずリポジトリに記述する
- データの永続化と再構築を行う
ファイル
transaction.go
- トランザクションを扱うコード
// 利用方法
// router.go, auth_router.goでインスタンス化
appConnection := repository.NewAppConnection(db)
// サービスに渡して利用
sendPointHandler := handler.NewSendPoint(&service.SendPoint{PointRepo: &rep, UserRepo: &rep, Connection: appConnection, DB: db})
error.go
- エラーを定義する
kvs.go
- Key/Values
- Redisにアクセスするための構造体
repository.go
- DBのインスタンス作成やIFを定義
# Packages
No description provided by the author
Package entities contains generated code for schema 'point_app'.
# Functions
DBへの接続 @params ctx コンテキスト cfg 接続設定の環境変数
@return *sqlx.DB DBインスタンス, func() DBクローズ関数(予備先素でdeferで呼ぶ必要あり).
No description provided by the author
No description provided by the author
# Constants
ErrCodeMySQLDuplicateEntry はMySQL系のDUPLICATEエラーコード https://dev.mysql.com/doc/mysql-errors/8.0/en/server-error-reference.html Error number: 1062; Symbol: ER_DUP_ENTRY; SQLSTATE: 23000.
No description provided by the author
No description provided by the author
No description provided by the author
# Structs
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Type aliases
No description provided by the author