Documentation ¶
Index ¶
- Variables
- type CreateDiscussionParam
- type CreateMessage
- type CreateUserParam
- type Discussion
- type ErrInvalidData
- type ErrNotFound
- type ErrValidation
- type GoogleAuth
- type JWTPayload
- type JoinDiscussionParam
- type Message
- type MessageContentType
- type MessageReceiverType
- type TokenPayload
- type UpdateDiscussionParam
- type UpdateDiscussionPassword
- type User
Constants ¶
This section is empty.
Variables ¶
View Source
var ( MessageContentText MessageContentType = "message.content.text" MessageContentEvent MessageContentType = "message.content.event" MessageContentImage MessageContentType = "message.content.image" MessageReceiverUser MessageReceiverType = "message.receiver.user" MessageReceiverDiscussion MessageReceiverType = "message.receiver.discussion" )
Functions ¶
This section is empty.
Types ¶
type CreateDiscussionParam ¶
type CreateDiscussionParam struct { Code string `json:"code" validate:"required,min=4"` Name string `json:"name" validate:"required,min=4"` Description string `json:"description"` Password *string `json:"password"` CreatorID interface{} `validate:"required"` CreatedAt time.Time UpdatedAt time.Time }
type CreateMessage ¶
type CreateMessage struct { ContentType MessageContentType `json:"content_type"` Content string `json:"content"` ReceiverType MessageReceiverType `json:"receiver_type"` ReceiverID interface{} `json:"receiver_id"` Sender User `json:"-"` CreatedAt time.Time `json:"-"` }
type CreateUserParam ¶
type Discussion ¶
type Discussion struct { ID interface{} `json:"id"` Code string `json:"code"` Name string `json:"name"` Description string `json:"description"` Password *string `json:"-"` PhotoUrl *string `json:"image_url"` CreatorID interface{} `json:"creator_id"` Members []*User `json:"members"` Messages []*Message `json:"messages"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` }
type ErrInvalidData ¶
func (ErrInvalidData) Error ¶
func (eid ErrInvalidData) Error() string
type ErrNotFound ¶
func (ErrNotFound) Error ¶
func (ent ErrNotFound) Error() string
type ErrValidation ¶
func (ErrValidation) Error ¶
func (evl ErrValidation) Error() string
type GoogleAuth ¶
type JWTPayload ¶
type JWTPayload struct { TokenPayload jwt.StandardClaims }
type JoinDiscussionParam ¶
type Message ¶
type Message struct { ID interface{} `json:"id"` ContentType MessageContentType `json:"content_type"` Content string `json:"content"` ReceiverType MessageReceiverType `json:"receiver_type"` ReceiverID interface{} `json:"receiver_id"` Sender User `json:"sender"` CreatedAt time.Time `json:"created_at"` }
type MessageContentType ¶
type MessageContentType string
type MessageReceiverType ¶
type MessageReceiverType string
type TokenPayload ¶
type UpdateDiscussionParam ¶
Click to show internal directories.
Click to hide internal directories.