Documentation ¶
Index ¶
- Constants
- Variables
- type Attachment
- type Birthday
- type Conversation
- type ConversationInitPayload
- type DBAttachment
- type DBPost
- type DeleteMessageBody
- type DeleteMessageSocketPayload
- type DeletePostBody
- type ForgotPasswordCreds
- type LikePostBody
- type LikeType
- type LoginCreds
- type MarkMessagesAsReadData
- type MarkMessagesAsReadReturnData
- type Message
- type MessageReturnPayload
- type ParentPost
- type ParentUser
- type PostReturnPayload
- type ProfileValues
- type RegisterCreds
- type RemoveBirthdayReturnPayload
- type ResetPasswordCreds
- type SocketAttachment
- type SocketComment
- type SocketMessage
- type SocketPayload
- type SocketPost
- type TypingData
- type TypingReturnPayload
- type UpdateProfileReturnPayload
- type User
Constants ¶
View Source
const ( Large = "large" Medium = "medium" Small = "small" Thumbnail = "thumbnail" )
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Attachment ¶
type Conversation ¶
type ConversationInitPayload ¶
type DBAttachment ¶
type DBAttachment struct { Urls pgtype.VarcharArray `json:"url"` Types pgtype.VarcharArray `json:"type"` }
type DBPost ¶
type DBPost struct { ID string `json:"id"` Author User `json:"author"` Content string `json:"content"` CreatedAt time.Time `json:"created_at"` ReplyingTo ParentPost `json:"replying_to"` Attachments []Attachment `json:"attachments"` Likes int `json:"likes"` Comments int `json:"comments"` Liked bool `json:"liked"` }
type DeleteMessageBody ¶
type DeletePostBody ¶
type ForgotPasswordCreds ¶
type ForgotPasswordCreds struct {
Email string `json:"email"`
}
type LikePostBody ¶
type LoginCreds ¶
type MarkMessagesAsReadData ¶
type MarkMessagesAsReadReturnData ¶
type MarkMessagesAsReadReturnData struct {
ConversationID string `json:"conversationId"`
}
type Message ¶
type Message struct { ID string `json:"id"` AuthorID string `json:"author_id"` ConversationID string `json:"conversation_id"` Content string `json:"content"` SentTime time.Time `json:"sent_time"` ReadBy []string `json:"read_by"` Attachment Attachment `json:"attachment"` Deleted bool `json:"deleted"` }
type MessageReturnPayload ¶
type MessageReturnPayload struct { MessageID string `json:"id"` Attachment Attachment `json:"attachment"` Content string `json:"content"` ConversationID string `json:"conversation_id"` ReceiverID string `json:"receiver_id"` AuthorID string `json:"author_id"` SentTime string `json:"sent_time"` Deleted bool `json:"deleted"` }
type ParentPost ¶
type ParentPost struct { ID sql.NullString `json:"id"` Author ParentUser `json:"author"` Content sql.NullString `json:"content"` CreatedAt sql.NullTime `json:"created_at"` ReplyingTo *ParentPost `json:"replying_to"` Likes sql.NullInt32 `json:"likes"` Comments sql.NullInt32 `json:"comments"` }
type ParentUser ¶
type ParentUser struct { ID sql.NullString `json:"id"` Username sql.NullString `json:"username"` DisplayName sql.NullString `json:"display_name"` Bio sql.NullString `json:"bio"` AvatarURL sql.NullString `json:"avatar_url"` Birthday sql.NullTime `json:"birthday"` CreatedAt sql.NullTime `json:"created_at"` FinishedSetup sql.NullBool `json:"finished_setup"` }
type PostReturnPayload ¶
type PostReturnPayload struct { ID string `json:"id"` Content string `json:"content"` Author User `json:"author"` CreatedAt time.Time `json:"created_at"` Attachments []Attachment `json:"attachments"` Likes int `json:"likes"` Comments int `json:"comments"` ReplyingTo ParentPost `json:"replying_to"` }
type ProfileValues ¶
type ProfileValues struct { UserID string `json:"userId"` DisplayName string `json:"displayName"` ProfileImage SocketAttachment `json:"profileImage"` Bio string `json:"bio"` Birthday Birthday `json:"birthday"` }
type RegisterCreds ¶
type RemoveBirthdayReturnPayload ¶
type RemoveBirthdayReturnPayload struct {
ID string `json:"id"`
}
type ResetPasswordCreds ¶
type SocketAttachment ¶
type SocketComment ¶
type SocketComment struct { Content string `json:"content"` ContentLength int `json:"contentLength"` Author User `json:"author"` Attachments []SocketAttachment `json:"attachments"` ReplyingTo string `json:"replying_to"` }
type SocketMessage ¶
type SocketMessage struct { Content string `json:"message_content"` Attachment SocketAttachment `json:"attachment"` SenderId string `json:"sender_id"` ReceiverId string `json:"receiver_id"` ConversationId string `json:"conversation_id"` }
type SocketPayload ¶
type SocketPayload struct { EventType string `json:"eventType"` Data interface{} `json:"data"` }
type SocketPost ¶
type SocketPost struct { Content string `json:"content"` ContentLength int `json:"contentLength"` Author User `json:"author"` Attachments []SocketAttachment `json:"attachments"` }
type TypingData ¶
type TypingReturnPayload ¶
type TypingReturnPayload struct {
ConversationID string `json:"conversationId"`
}
type User ¶
type User struct { ID string `json:"id"` Username string `json:"username"` DisplayName string `json:"display_name"` Bio string `json:"bio"` AvatarURL string `json:"avatar_url"` Birthday sql.NullTime `json:"birthday"` CreatedAt time.Time `json:"created_at"` FinishedSetup bool `json:"finished_setup"` }
Click to show internal directories.
Click to hide internal directories.