Documentation
¶
Index ¶
- func CheckUserID(id uint) (*models.User, error)
- func CreateReminderSettingWithRelation(db *gorm.DB, userID uint, name, notifyTitle, notifyText string, cycleDays uint, ...) (*models.ReminderSetting, error)
- func CreateReminderSettingWithRelationInTransact(db *gorm.DB, userID uint, name, notifyTitle, notifyText string, cycleDays uint, ...) error
- func DeleteReminderSettingByUserIDAndNumber(db *gorm.DB, userID, number uint) error
- func GetAuthCodeURLWithSessionKey(key string) string
- func GetDB() *gorm.DB
- func GetOauthInfo(code string) (*v2.Tokeninfo, error)
- func GetReminderSettingByUserIDAndNumber(db *gorm.DB, UserID, number uint) (*models.ReminderSetting, error)
- func GetSettingAndScheduleByScheduleIDAndUserID(db *gorm.DB, scheduleID, userID uint) (*models.ReminderSetting, *models.ReminderSchedule, error)
- func GetUserIDOrCreateUserID(email string) (uint, error)
- func IsSuccessStatusCode(response *rest.Response) bool
- func RandString(n int) string
- func ResetReminderScheduleAfterNotify(db *gorm.DB, rSet models.ReminderSetting, basisDate time.Time) error
- func SendMail(toEmail, subject, content string) (*rest.Response, error)
- func UpdateReminderSettingByUserIDAndNumber(db *gorm.DB, userID, number uint, name, notifyTitle, notifyText string, ...) (*models.ReminderSetting, error)
- type Message
- type NotifyDetail
- type ReminderDetail
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateReminderSettingWithRelation ¶
func CreateReminderSettingWithRelation(db *gorm.DB, userID uint, name, notifyTitle, notifyText string, cycleDays uint, basisDate time.Time) (*models.ReminderSetting, error)
CreateReminderSettingWithRelation リマインド設定と紐付くリマインド予定を作成 basisDate 起点日付 *基本的にはtime.Now()を指定する事になる
func CreateReminderSettingWithRelationInTransact ¶
func CreateReminderSettingWithRelationInTransact(db *gorm.DB, userID uint, name, notifyTitle, notifyText string, cycleDays uint, basisDate time.Time) error
CreateReminderSettingWithRelationInTransact リマインド設定と紐付くリマインド予定をトランザクション作成 basisDate 起点日付 *基本的にはtime.Now()を指定する事になる
func DeleteReminderSettingByUserIDAndNumber ¶
DeleteReminderSettingByUserIDAndNumber リマインダー設定削除
func GetAuthCodeURLWithSessionKey ¶
GetAuthCodeURLWithSessionKey 確認キーを渡しつつAuth接続先URL取得
func GetOauthInfo ¶
GetOauthInfo OAUTHにより情報を取得
func GetReminderSettingByUserIDAndNumber ¶
func GetReminderSettingByUserIDAndNumber(db *gorm.DB, UserID, number uint) (*models.ReminderSetting, error)
GetReminderSettingByUserIDAndNumber リマインド設定取得
func GetSettingAndScheduleByScheduleIDAndUserID ¶
func GetSettingAndScheduleByScheduleIDAndUserID(db *gorm.DB, scheduleID, userID uint) (*models.ReminderSetting, *models.ReminderSchedule, error)
GetSettingAndScheduleByScheduleIDAndUserID
func GetUserIDOrCreateUserID ¶
GetUserIDOrCreateUserID 登録Eメールが有ればUserIdを取得、無ければ登録してUserIDを取得
func IsSuccessStatusCode ¶
IsSuccessStatusCode 成功ステータスコードか?
func ResetReminderScheduleAfterNotify ¶
func ResetReminderScheduleAfterNotify(db *gorm.DB, rSet models.ReminderSetting, basisDate time.Time) error
ResetReminderScheduleAfterNotify メール通知完了後の次回通知予定設定 basisDate 起点日付 *基本的にはtime.Now()を指定する事になる
func UpdateReminderSettingByUserIDAndNumber ¶
func UpdateReminderSettingByUserIDAndNumber(db *gorm.DB, userID, number uint, name, notifyTitle, notifyText string, cycleDays uint) (*models.ReminderSetting, error)
UpdateReminderSettingByUserIDAndNumber リマインド設定変更
Types ¶
type Message ¶
type Message struct { ToEmail string `validate:"required,email"` Subject string `validate:"required,max=100"` Content string `validate:"required,max=1000"` }
Message is struct
type NotifyDetail ¶
type NotifyDetail struct { Email string SettingID uint ScheduleID uint NotifyTitle string NotifyText string }
NotifyDetail 通知内容詳細
func GetRemindersReachedNotifyDate ¶
func GetRemindersReachedNotifyDate(db *gorm.DB, targetDate time.Time, reminderScheduleID uint, limit int) ([]NotifyDetail, error)
GetRemindersReachedNotifyDate 通知日付に達した全リマインド予定の通知内容取得 メール通知処理等で利用
type ReminderDetail ¶
type ReminderDetail struct { ID uint CreatedAt time.Time UpdatedAt time.Time UserID uint Number uint Name string NotifyTitle string NotifyText string CycleDays uint NotifyDate time.Time ScheduleID uint }
ReminderDetail リマインド詳細
func GetReminderListByUserID ¶
GetReminderListByUserID ユーザー情報からリマインド一覧取得 リマインド一覧画面等で利用