Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreatePostRequest ¶
type CreatePostRequest struct { Title string `json:"title" binding:"required"` Content string `json:"content" binding:"required"` Image string `json:"image" binding:"required"` User string `json:"user,omitempty"` CreatedAt time.Time `json:"created_at,omitempty"` UpdatedAt time.Time `json:"updated_at,omitempty"` }
type Post ¶
type Post struct { ID uuid.UUID `gorm:"type:uuid;default:uuid_generate_v4();primary_key" json:"id,omitempty"` Title string `gorm:"uniqueIndex;not null" json:"title,omitempty"` Content string `gorm:"not null" json:"content,omitempty"` Image string `gorm:"not null" json:"image,omitempty"` User uuid.UUID `gorm:"not null" json:"user,omitempty"` CreatedAt time.Time `gorm:"not null" json:"created_at,omitempty"` UpdatedAt time.Time `gorm:"not null" json:"updated_at,omitempty"` }
type ProfileInput ¶
type SignInInput ¶
type SignUpInput ¶
type UpdatePost ¶
type User ¶
type User struct { ID uuid.UUID `gorm:"type:uuid;default:uuid_generate_v4();primary_key"` Name string `gorm:"type:varchar(255);not null"` Email string `gorm:"uniqueIndex;not null"` Password string `gorm:"not null"` Role string `gorm:"type:varchar(255);not null"` Provider string `gorm:"not null"` Photo string `gorm:"not null"` Verified bool `gorm:"not null"` CreatedAt time.Time `gorm:"not null"` UpdatedAt time.Time `gorm:"not null"` }
type UserResponse ¶
type UserResponse struct { ID uuid.UUID `json:"id,omitempty"` Name string `json:"name,omitempty"` Email string `json:"email,omitempty"` Role string `json:"role,omitempty"` Photo string `json:"photo,omitempty"` Provider string `json:"provider"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` }
Click to show internal directories.
Click to hide internal directories.