search

package
v4.3.1+incompatible Latest Latest
Warning

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

Go to latest
Published: May 23, 2017 License: Apache-2.0 Imports: 11 Imported by: 671

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDashboardFromJsonIndex

func GetDashboardFromJsonIndex(filename string) *m.Dashboard

func Init

func Init()

Types

type FindPersistedDashboardsQuery

type FindPersistedDashboardsQuery struct {
	Title        string
	OrgId        int64
	UserId       int64
	IsStarred    bool
	DashboardIds []int

	Result HitList
}

type Hit

type Hit struct {
	Id        int64    `json:"id"`
	Title     string   `json:"title"`
	Uri       string   `json:"uri"`
	Type      HitType  `json:"type"`
	Tags      []string `json:"tags"`
	IsStarred bool     `json:"isStarred"`
}

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"
	DashHitJson     HitType = "dash-json"
	DashHitScripted HitType = "dash-scripted"
)

type JsonDashIndex

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

func NewJsonDashIndex

func NewJsonDashIndex(path string) *JsonDashIndex

func (*JsonDashIndex) GetDashboard

func (index *JsonDashIndex) GetDashboard(path string) *m.Dashboard

func (*JsonDashIndex) Search

func (index *JsonDashIndex) Search(query *Query) ([]*Hit, error)

type JsonDashIndexItem

type JsonDashIndexItem struct {
	TitleLower string
	TagsCsv    string
	Path       string
	Dashboard  *m.Dashboard
}

type Query

type Query struct {
	Title        string
	Tags         []string
	OrgId        int64
	UserId       int64
	Limit        int
	IsStarred    bool
	DashboardIds []int

	Result HitList
}

Jump to

Keyboard shortcuts

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