handlers

package
v1.0.29 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2025 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EncodeCursor

func EncodeCursor(publishedAt time.Time, id string) string

EncodeCursor creates a base64-encoded cursor string

Types

type CommentHandler

type CommentHandler struct {
	// contains filtered or unexported fields
}

CommentHandler handles blog comment operations

func NewCommentHandler

func NewCommentHandler() (*CommentHandler, error)

NewCommentHandler creates a new comment handler

func (*CommentHandler) HandleRequest

HandleRequest routes requests to appropriate handlers

type Cursor

type Cursor struct {
	LastPublishedAt time.Time `json:"p"`
	LastID          string    `json:"i"`
	Direction       string    `json:"d,omitempty"` // "next" or "prev"
}

Cursor represents pagination cursor data

func DecodeCursor

func DecodeCursor(cursorStr string) (*Cursor, error)

DecodeCursor decodes a cursor string back to cursor data

type PostHandler

type PostHandler struct {
	// contains filtered or unexported fields
}

PostHandler handles blog post operations

func NewPostHandler

func NewPostHandler() (*PostHandler, error)

NewPostHandler creates a new post handler

func (*PostHandler) HandleRequest

HandleRequest routes requests to appropriate handlers

Jump to

Keyboard shortcuts

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