search

package
v4.4.3+incompatible Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2017 License: Apache-2.0 Imports: 11 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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