Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApiSuccess ¶
type ApiSuccess struct {
Success bool `json:"success"`
}
type ClientMessage ¶
type Conversation ¶
type Conversation struct { ID uint64 `gorm:"primaryKey;uniqueIndex;" json:"id"` CreatedAt time.Time `json:"createdAt"` Users []Profile `gorm:"many2many:profiles_conversations;constraint:onDelete:CASCADE" json:"users"` Messages []Message `gorm:"foreignKey:ConversationId;references:ID;constraint:onDelete:CASCADE;" json:"messages"` }
type FriendRequest ¶
type FriendRequest struct { ID uint64 `gorm:"primaryKey;uniqueIndex;" json:"id"` CreatedAt time.Time `json:"createdAt"` SenderId string `json:"senderId"` RecipientId string `json:"recipientId"` Sender ShortProfile `json:"sender"` Recipient ShortProfile `json:"recipient"` }
type Message ¶
type Message struct { ID uint64 `gorm:"primaryKey;uniqueIndex;" json:"id"` CreatedAt time.Time `json:"createdAt"` ConversationId uint64 `json:"conversationId"` From string `json:"from"` Content string `json:"content"` Seen bool `json:"seen"` Pinned bool `json:"pinned"` Conversation Conversation `json:"conversation"` }
type PrivateKey ¶
type Profile ¶
type Profile struct { ID string `gorm:"primaryKey;uniqueIndex" json:"id"` CreatedAt time.Time `json:"createdAt"` Username string `json:"username"` Image string `json:"image"` Bio string `json:"bio"` PublicKey string `json:"publicKey"` SentFriendRequests []FriendRequest `gorm:"foreignKey:SenderId;references:ID;constraint:onDelete:CASCADE;" json:"sentFriendRequests"` RecievedFriendRequests []FriendRequest `gorm:"foreignKey:RecipientId;references:ID;constraint:onDelete:CASCADE;" json:"recievedFriendRequests"` Friends []Friend `gorm:"many2many:profiles_friends" json:"friends"` Reports []Report `gorm:"foreignKey:ReportedId;references:ID;constraint:onDelete:CASCADE;" json:"reports"` Conversations []Conversation `gorm:"many2many:profiles_conversations;"` }
type ProfilesConversations ¶
type ProfilesFriends ¶
type Report ¶
type Report struct { ID uint64 `gorm:"primaryKey;uniqueIndex;" json:"id"` CreatedAt time.Time `json:"createdAt"` ReportedId string `json:"reportedId"` Spam bool `json:"spam"` Abuse bool `json:"abuse"` Impersonation bool `json:"impersonation"` Illicit bool `json:"illicit"` Additional string `json:"additional"` }
type ShortProfile ¶
type User ¶
type User struct { ID string `gorm:"primaryKey;default:gen_random_uuid();uniqueIndex:id_username_image;" json:"id"` CreatedAt time.Time `json:"createdAt"` ClerkId string `json:"clerkId"` ClerkPrimaryEmailId string `json:"clerkPrimaryEmailId"` Username string `gorm:"uniqueIndex:id_username_image" json:"username"` Email string `gorm:"uniqueIndex" json:"email"` Image string `gorm:"uniqueIndex:id_username_image" json:"image"` PrivateKey PrivateKey `gorm:"foreignKey:ID;references:ID;constraint:onDelete:CASCADE;" json:"privateKey"` Profile Profile `` /* 137-byte string literal not displayed */ }
Click to show internal directories.
Click to hide internal directories.