pages

package
v0.40.23 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

universal cache pagination tooling

Index

Constants

View Source
const PAGE_SIZE int = 25

Variables

This section is empty.

Functions

This section is empty.

Types

type FlowOptions

type FlowOptions struct {
	Plain        bool   `json:"plain"`
	SinglePost   bool   `json:"single_post"`
	UserFlow     bool   `json:"user_flow"`
	SinglePostID string `json:"single_post_id"`
	UserFlowNick string `json:"user_Flow_nick"`
	Hashtag      string `json:"hashtag"`
	HideReplies  bool   `json:"hide_replies"`
}

flow subviews' options

type PageOptions

type PageOptions struct {
	// common options
	Caller   models.User
	CallerID string          `json:"caller_id"`
	PageNo   int             `json:"page_no"`
	FlowList map[string]bool `json:"folow_list"`

	// data compartments' specifications
	Flow  FlowOptions `json:"flow_options"`
	Polls PollOptions `json:"poll_options"`
	Users UserOptions `json:"user_options"`
}

DTO for GetOnePage input aggregation

type PagePointers

type PagePointers struct {
	Polls *map[string]models.Poll
	Posts *map[string]models.Post
	Users *map[string]models.User
}

DTO for GetOnePage pointer output aggregation

func GetOnePage

func GetOnePage(opts PageOptions) (ptrs PagePointers)

type PollOptions added in v0.40.23

type PollOptions struct {
	Plain        bool   `json:"plain"`
	SinglePoll   bool   `json:"single_poll"`
	SinglePollID string `json:"single_poll_id"`
}

polls subviews' options

type UserOptions added in v0.40.23

type UserOptions struct {
	Plain        bool   `json:"plain"`
	SingleUser   bool   `json:"single_user"`
	SingleUserID string `json:"single_user_id"`
}

users subviews' options

Jump to

Keyboard shortcuts

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