Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AutoMigrate ¶
Types ¶
type Account ¶
type AccountUser ¶
type Duration ¶
type Duration struct { DType DurationType Duration uint }
type DurationType ¶
type DurationType string
const ( DT_Minutes DurationType = "minutes" DT_Hours DurationType = "hours" DT_Days DurationType = "days" )
type GormTCPConnectionConfig ¶
type HitEvent ¶
type HitEvent struct { gorm.Model Body string `gorm:"type:text;nullable"` StatusRaw string `gorm:"type:varchar(25);nullable"` Status HP_STATUS `gorm:"type:varchar(25)"` Query string `gorm:"type:varchar(200);nullable;"` FromIp string `gorm:"type:varchar(15)"` UserAgent string `gorm:"type:varchar(200)"` HttpMethod string `gorm:"type:varchar(10)"` HitPointID uint `gorm:"not null;"` HitPoint HitPoint }
type HitPoint ¶
type HitPoint struct { gorm.Model UUID string `gorm:"type:varchar(100);primaryKey;<-:create"` Name string `gorm:"not null"` // add composite constraint Description string `gorm:"type:text"` ProjectID uint Project Project AccountID uint `gorm:"not null;"` Account Account Status HP_STATUS `gorm:"type:varchar(20)"` Schedule map[string]interface{} `gorm:"type:json;serializer:json"` LastHitEventID uint LastHitEventAt *time.Time }
func (*HitPoint) GetSchedule ¶
func (h *HitPoint) GetSchedule() (*HitpointSchedule, error)
type HitpointSchedule ¶
type HitpointSchedule struct { GracePeriodInMinute uint IntervalInMinute *uint CronSchedule *string }
func CreatePeriodicSchedule ¶
func CreatePeriodicSchedule(period Duration, grace Duration) (*HitpointSchedule, error)
func (*HitpointSchedule) Json ¶
func (s *HitpointSchedule) Json() (map[string]interface{}, error)
func (*HitpointSchedule) JsonString ¶
func (s *HitpointSchedule) JsonString() (*string, error)
type Plan ¶
type Plan struct { gorm.Model Name string `gorm:"not null;"` UUID string `gorm:"type:varchar(100);primaryKey;"` DurationType PlanDuration }
type PlanDuration ¶
type PlanDuration uint8
const ( Lifetime PlanDuration = 1 Monthly PlanDuration = 2 )
type Project ¶
type Subscription ¶
type Subscription struct { gorm.Model UUID string `gorm:"type:varchar(100);primaryKey;"` PlanID uint `gorm:"not null;"` Plan Plan AccountID uint `gorm:"not null;"` Account Account }
func (*Subscription) BeforeCreate ¶
func (s *Subscription) BeforeCreate(tx *gorm.DB) error
type User ¶
type User struct { gorm.Model UUID string `gorm:"type:varchar(100);primaryKey;"` Name string `gorm:"type:varchar(255);not null"` Email string `gorm:"type:varchar(500);not null;unique"` PasswordHash string `gorm:"type:varchar(255);not null"` IsVerified bool `gorm:"not null;"` }
func (*User) SetPassword ¶
func (*User) VerifyPasswordMatch ¶
Click to show internal directories.
Click to hide internal directories.