post_comments_page

package
v0.0.0-...-4456b35 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 4, 2025 License: MIT Imports: 19 Imported by: 0

Documentation

Overview

templ: version: v0.2.778

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Comment

func Comment(comment *state.Comment, author *state.User, vote_value state.VoteValue) templ.Component

func CommentNode

func CommentNode(comment_node *PostCommentNode) templ.Component

func Compare

func Compare[T constraints.Ordered](a, b T) int

func PostMain

func PostMain(post *state.Post, author *state.User, post_vote_value state.VoteValue, comment_roots *[]*PostCommentNode) templ.Component

func PostPage

func PostPage(user *state.User, post *state.Post, author *state.User, post_vote_value state.VoteValue, comment_roots *[]*PostCommentNode) templ.Component

Types

type PostCommentNode

type PostCommentNode struct {
	Comment   *state.Comment
	Author    *state.User
	VoteValue state.VoteValue
	Children  []*PostCommentNode
}

func BuildPostCommentTree

func BuildPostCommentTree(comments_rows *[]state.CommentsForPostWithAuthorAndVotesForUserRow) []*PostCommentNode

func NewPostCommentNode

func NewPostCommentNode(comment *state.Comment, author *state.User, vote_value state.VoteValue) *PostCommentNode

func (*PostCommentNode) AddChild

func (p *PostCommentNode) AddChild(child *PostCommentNode)

type PostCommentVoteHandler

type PostCommentVoteHandler struct {
	Queries  *state.Queries
	Commands *commands.Commands
}

func NewPostCommentVoteHandler

func NewPostCommentVoteHandler(queries *state.Queries, commands *commands.Commands) *PostCommentVoteHandler

func (*PostCommentVoteHandler) ServeHTTP

type PostCommentsHandler

type PostCommentsHandler struct {
	Queries *state.Queries
}

func NewPostCommentsHandler

func NewPostCommentsHandler(queries *state.Queries) *PostCommentsHandler

func (*PostCommentsHandler) ServeHTTP

func (p *PostCommentsHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type PostSubmitCommentHandler

type PostSubmitCommentHandler struct {
	Queries  *state.Queries
	Commands *commands.Commands
}

func NewPostSubmitCommentHandler

func NewPostSubmitCommentHandler(queries *state.Queries, commands *commands.Commands) *PostSubmitCommentHandler

func (*PostSubmitCommentHandler) ServeHTTP

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL