package
0.0.0-20240724173518-66756ed90608
Repository: https://github.com/adrian83/chat.git
Documentation: pkg.go.dev
# Functions
NewConversationHandler returns new ConversationHandler struct.
NewIndexHandler returns new IndexHandler struct.
NewLoginHandler returns new LoginHandler struct.
NewLogoutHandler returns new LogoutHandler struct.
NewModel function returns new instance of Model struct.
NewRegisterHandler returns new RegisterHandler struct.
NewTemplateBuilder returns new instance of TemplateBuilder struct.
NewTemplateRepository returns new TemplateRepository.
ReadSessionIDFromCookie returns session id read from cookie or error if id cannot be found.
RemoveSessionCookie removes cookie wirt session id.
RenderTemplate renders given template with empty model.
RenderTemplateWithModel renders given template with given model.
StoreSessionCookie stores session cookie with given session id.
# Constants
seconds.
# Variables
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Structs
ConversationHandler struct responsible for handling actions made on index html page.
IndexHandler struct responsible for handling actions made on index html page.
LoginHandler struct responsible for handling actions made on login html page.
LogoutHandler struct responsible for handling logout action.
RegisterHandler struct responsible for handling actions made on register html page.
TemplateBuilder is a struct used for creating instance of html/template.Template.
TemplateRepository keeps all templates used in application.
# Type aliases
Model is a struct with all needed data for rendering template.