Documentation ¶
Index ¶
- type CompleteUserMessageState
- type Extension
- func (s *Extension) DeleteUserMessageStateHandler(w http.ResponseWriter, r *http.Request)
- func (s *Extension) GetMessagesHandler(w http.ResponseWriter, r *http.Request)
- func (s *Extension) GetName() string
- func (s *Extension) MarkUserMessageStateAsReadHandler(w http.ResponseWriter, r *http.Request)
- func (s *Extension) PostInit(app *nibbler.Application) error
- func (s *Extension) SendMessageToUserHandler(w http.ResponseWriter, r *http.Request)
- type Message
- type MessageType
- type PersistenceExtension
- type UserMessageState
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CompleteUserMessageState ¶
type CompleteUserMessageState struct { UserMessageState Message }
type Extension ¶
type Extension struct { nibbler.NoOpExtension PersistenceExtension PersistenceExtension SessionExtension *session.Extension }
func (*Extension) DeleteUserMessageStateHandler ¶
func (s *Extension) DeleteUserMessageStateHandler(w http.ResponseWriter, r *http.Request)
func (*Extension) GetMessagesHandler ¶
func (s *Extension) GetMessagesHandler(w http.ResponseWriter, r *http.Request)
func (*Extension) MarkUserMessageStateAsReadHandler ¶
func (s *Extension) MarkUserMessageStateAsReadHandler(w http.ResponseWriter, r *http.Request)
func (*Extension) SendMessageToUserHandler ¶
func (s *Extension) SendMessageToUserHandler(w http.ResponseWriter, r *http.Request)
type Message ¶
type Message struct { ID string `json:"id" bson:"_id" gorm:"primary_key"` CreatedAt time.Time `json:"createdAt"` UpdatedAt time.Time `json:"updatedAt"` DeletedAt *time.Time `json:"deletedAt,omitempty"` FromUserID *string `json:"fromUserId,omitempty"` FromUserName *string `json:"fromUserName,omitempty"` Content string `json:"content"` Type MessageType `json:"type"` }
type PersistenceExtension ¶
type PersistenceExtension interface { GetMessagesByUserId(userId string, count int, offset int) ([]CompleteUserMessageState, error) SendMessageToUser(userId string, message Message) error DeleteUserMessageState(messageStateId string, hardDelete bool) error MarkUserMessageStateAsRead(messageStateId string) error }
type UserMessageState ¶
Click to show internal directories.
Click to hide internal directories.