Documentation ¶
Index ¶
Constants ¶
View Source
const DefaultLimit = 1000
Variables ¶
This section is empty.
Functions ¶
func UserToProto ¶
ToProto converts User model to protobuf message
Types ¶
type CreateOptions ¶
type CreateOptions struct {
DryRun []string `json:"dryRun,omitempty"`
}
type DeleteOptions ¶
type DeleteOptions struct {
Unscoped bool `json:"unscoped"`
}
type GetOptions ¶
type GetOptions struct { }
type LimitAndOffset ¶
func Unpointer ¶
func Unpointer(offset *int64, limit *int64) *LimitAndOffset
type ListOptions ¶
type ListOptions struct { LabelSelector string `json:"labelSelector,omitempty" form:"labelSelector"` FieldSelector string `json:"fieldSelector,omitempty" form:"fieldSelector"` TimeoutSeconds *int64 `json:"timeoutSeconds,omitempty"` Offset *int64 `json:"offset,omitempty" form:"offset"` Limit *int64 `json:"limit,omitempty" form:"limit"` }
type ObjectMeta ¶
type ObjectMeta struct { ID uint64 `json:"id,omitempty" gorm:"primary_key;AUTO_INCREMENT;column:id"` Extend Extend `json:"extend,omitempty" gorm:"-" validate:"omitempty"` ExtendShadow string `json:"-" gorm:"column:extendShadow" validate:"omitempty"` CreatedAt time.Time `json:"createdAt,omitempty" gorm:"column:created_at"` UpdatedAt time.Time `json:"updatedAt,omitempty" gorm:"column:updated_at"` DeletedAt gorm.DeletedAt `json:"-" gorm:"column:deleted_at;index:idx_deleted_at"` Status int `json:"status,omitempty" gorm:"column:status;default:0"` }
func (*ObjectMeta) BeforeCreate ¶
func (obj *ObjectMeta) BeforeCreate(tx *gorm.DB) error
func (*ObjectMeta) BeforeUpdate ¶
func (obj *ObjectMeta) BeforeUpdate(tx *gorm.DB) error
type PatchOptions ¶
type TableOptions ¶
type TableOptions struct {
NoHeaders bool `json:"-"`
}
type UpdateOptions ¶
type UpdateOptions struct {
DryRun []string `json:"dryRun,omitempty"`
}
type User ¶
type User struct { ObjectMeta Name string `json:"name,omitempty" gorm:"column:name;type:varchar(255);not null" validate:"required"` // Required: true Email string `json:"email" gorm:"column:email" validate:"required,email,min=1,max=100"` EmailVerifiedAt time.Time `gorm:"column:email_verified_at" json:"-"` Password string `json:"-" gorm:"column:password" validate:"required"` RememberToken string `gorm:"size:100" json:"-"` StripeID string `gorm:"size:255" json:"stripeId"` DiscordID uint64 `gorm:"default:0" json:"discordId"` PMType string `gorm:"size:255" json:"-"` PMLastFour string `gorm:"size:4" json:"-"` TrialEndsAt time.Time `gorm:"column:trial_ends_at" json:"-"` TotalCredits int `gorm:"default:0" json:"totalCredits"` Token string `json:"token,omitempty" gorm:"-"` }
Click to show internal directories.
Click to hide internal directories.