Documentation ¶
Index ¶
- type KeyConversation
- type KeyMessage
- type TextChatHandler
- func (textChatHandler *TextChatHandler) AddConversation(responseWriter http.ResponseWriter, request *http.Request)
- func (textChatHandler *TextChatHandler) AddMessage(responseWriter http.ResponseWriter, request *http.Request)
- func (textChatHandler *TextChatHandler) AddUserToConversation(responseWriter http.ResponseWriter, request *http.Request)
- func (textChatHandler *TextChatHandler) DeleteConversation(responseWriter http.ResponseWriter, request *http.Request)
- func (textChatHandler *TextChatHandler) DeleteMessage(responseWriter http.ResponseWriter, request *http.Request)
- func (textChatHandler *TextChatHandler) GetConversationByID(responseWriter http.ResponseWriter, request *http.Request)
- func (textChatHandler *TextChatHandler) GetMessageByID(responseWriter http.ResponseWriter, request *http.Request)
- func (textChatHandler *TextChatHandler) GetMessagesByConversationID(responseWriter http.ResponseWriter, request *http.Request)
- func (textChatHandler *TextChatHandler) LivenessCheck(responseWriter http.ResponseWriter, request *http.Request)
- func (textChatHandler *TextChatHandler) MiddlewareConversationValidation(next http.Handler) http.Handler
- func (textChatHandler *TextChatHandler) MiddlewareMessageValidation(next http.Handler) http.Handler
- func (textChatHandler *TextChatHandler) ReadinessCheck(responseWriter http.ResponseWriter, request *http.Request)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type KeyConversation ¶
type KeyConversation struct{}
KeyConversation is a key used for the Conversation object inside context
type KeyMessage ¶
type KeyMessage struct{}
KeyMessage is a key used for the Message object inside context
type TextChatHandler ¶
type TextChatHandler struct {
// contains filtered or unexported fields
}
func NewTextChatHandler ¶
func NewTextChatHandler(db database.TextChatDB) *TextChatHandler
func (*TextChatHandler) AddConversation ¶
func (textChatHandler *TextChatHandler) AddConversation(responseWriter http.ResponseWriter, request *http.Request)
AddConversation creates a new message from the received JSON
func (*TextChatHandler) AddMessage ¶
func (textChatHandler *TextChatHandler) AddMessage(responseWriter http.ResponseWriter, request *http.Request)
AddMessage creates a new message from the received JSON
func (*TextChatHandler) AddUserToConversation ¶
func (textChatHandler *TextChatHandler) AddUserToConversation(responseWriter http.ResponseWriter, request *http.Request)
AddConversation creates a new message from the received JSON
func (*TextChatHandler) DeleteConversation ¶
func (textChatHandler *TextChatHandler) DeleteConversation(responseWriter http.ResponseWriter, request *http.Request)
Delete a conversation with specified id from the database
func (*TextChatHandler) DeleteMessage ¶
func (textChatHandler *TextChatHandler) DeleteMessage(responseWriter http.ResponseWriter, request *http.Request)
Delete a message with specified id from the database
func (*TextChatHandler) GetConversationByID ¶
func (textChatHandler *TextChatHandler) GetConversationByID(responseWriter http.ResponseWriter, request *http.Request)
func (*TextChatHandler) GetMessageByID ¶
func (textChatHandler *TextChatHandler) GetMessageByID(responseWriter http.ResponseWriter, request *http.Request)
func (*TextChatHandler) GetMessagesByConversationID ¶
func (textChatHandler *TextChatHandler) GetMessagesByConversationID(responseWriter http.ResponseWriter, request *http.Request)
func (*TextChatHandler) LivenessCheck ¶
func (textChatHandler *TextChatHandler) LivenessCheck(responseWriter http.ResponseWriter, request *http.Request)
LivenessCheck determine when the application needs to be restarted
func (*TextChatHandler) MiddlewareConversationValidation ¶
func (textChatHandler *TextChatHandler) MiddlewareConversationValidation(next http.Handler) http.Handler
MiddlewareConversatonValidation is used to validate incoming conversation JSONS
func (*TextChatHandler) MiddlewareMessageValidation ¶
func (textChatHandler *TextChatHandler) MiddlewareMessageValidation(next http.Handler) http.Handler
MiddlewareMessageValidation is used to validate incoming message JSONS
func (*TextChatHandler) ReadinessCheck ¶
func (textChatHandler *TextChatHandler) ReadinessCheck(responseWriter http.ResponseWriter, request *http.Request)
ReadinessCheck verifies that the application is ready to accept requests