model

package
v11.1.4-modfix Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2024 License: AGPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FilterGroupBy

type FilterGroupBy interface {
	GroupBy() (string, []any)
}

FilterGroupBy should be used after performing an outer join on the search result to ensure there is only one of each ID in the results. The id column must be present in the result.

type FilterLeftJoin

type FilterLeftJoin interface {
	LeftJoin() string
}

FilterLeftJoin adds the returned string as a "LEFT OUTER JOIN" to allow for fetching extra columns from a table outside of the dashboard column.

type FilterOrderBy

type FilterOrderBy interface {
	OrderBy() string
}

FilterOrderBy provides an ordering for the search result.

type FilterSelect

type FilterSelect interface {
	Select() string
}

type FilterWhere

type FilterWhere interface {
	Where() (string, []any)
}

FilterWhere limits the set of dashboard IDs to the dashboards for which the filter is applicable. Results where the first value is an empty string are discarded.

type FilterWith

type FilterWith interface {
	With() (string, []any)
}

FilterWith returns any recursive CTE queries (if supported) and their parameters

type Hit

type Hit struct {
	ID                  int64    `json:"id"`
	UID                 string   `json:"uid"`
	Title               string   `json:"title"`
	URI                 string   `json:"uri"`
	URL                 string   `json:"url"`
	Slug                string   `json:"slug"`
	Type                HitType  `json:"type"`
	Tags                []string `json:"tags"`
	IsStarred           bool     `json:"isStarred"`
	FolderID            int64    `json:"folderId,omitempty"` // Deprecated: use FolderUID instead
	FolderUID           string   `json:"folderUid,omitempty"`
	FolderTitle         string   `json:"folderTitle,omitempty"`
	FolderURL           string   `json:"folderUrl,omitempty"`
	SortMeta            int64    `json:"sortMeta"`
	SortMetaName        string   `json:"sortMetaName,omitempty"`
	RemainingTrashAtAge string   `json:"remainingTrashAtAge,omitempty"`
}

type HitList

type HitList []*Hit

func (HitList) Len

func (s HitList) Len() int

func (HitList) Less

func (s HitList) Less(i, j int) bool

func (HitList) Swap

func (s HitList) Swap(i, j int)

type HitType

type HitType string
const (
	DashHitDB     HitType = "dash-db"
	DashHitHome   HitType = "dash-home"
	DashHitFolder HitType = "dash-folder"
)

type SortOption

type SortOption struct {
	Name        string
	DisplayName string
	Description string
	Index       int
	MetaName    string
	Filter      []SortOptionFilter
}

type SortOptionFilter

type SortOptionFilter interface {
	FilterOrderBy
}

Jump to

Keyboard shortcuts

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