Documentation ¶
Index ¶
- Constants
- type DashboardIndexExtender
- type DashboardQuery
- type DocumentExtender
- type ExtendDashboardFunc
- type FacetField
- type FramerFunc
- type FutureAuthService
- type IsSearchReadyResponse
- type MockSearchService
- func (_m *MockSearchService) DoDashboardQuery(ctx context.Context, _a1 *backend.User, orgId int64, query DashboardQuery) *backend.DataResponse
- func (_m *MockSearchService) IsDisabled() bool
- func (_m *MockSearchService) IsReady(ctx context.Context, orgId int64) IsSearchReadyResponse
- func (_m *MockSearchService) RegisterDashboardIndexExtender(ext DashboardIndexExtender)
- func (_m *MockSearchService) Run(ctx context.Context) error
- func (_m *MockSearchService) TriggerReIndex()
- type NoopDocumentExtender
- type NoopExtender
- type NoopQueryExtender
- type PermissionFilter
- type QueryExtender
- type ResourceFilter
- type SearchHTTPService
- type SearchService
- type StandardSearchService
- func (s *StandardSearchService) DoDashboardQuery(ctx context.Context, user *backend.User, orgID int64, q DashboardQuery) *backend.DataResponse
- func (s *StandardSearchService) IsDisabled() bool
- func (s *StandardSearchService) IsReady(ctx context.Context, orgId int64) IsSearchReadyResponse
- func (s *StandardSearchService) RegisterDashboardIndexExtender(ext DashboardIndexExtender)
- func (s *StandardSearchService) Run(ctx context.Context) error
- func (s *StandardSearchService) TriggerReIndex()
- type SubstringQuery
- func (q *SubstringQuery) Boost() float64
- func (q *SubstringQuery) Field() string
- func (q *SubstringQuery) Searcher(i search.Reader, options search.SearcherOptions) (search.Searcher, error)
- func (q *SubstringQuery) SetBoost(b float64) *SubstringQuery
- func (q *SubstringQuery) SetField(f string) *SubstringQuery
- func (q *SubstringQuery) Validate() error
- func (q *SubstringQuery) Wildcard() string
Constants ¶
const ( DocumentFieldCreatedAt = "created_at" DocumentFieldUpdatedAt = "updated_at" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DashboardIndexExtender ¶
type DashboardIndexExtender interface { GetDocumentExtender() DocumentExtender GetQueryExtender(query DashboardQuery) QueryExtender }
type DashboardQuery ¶
type DashboardQuery struct { Query string `json:"query"` Location string `json:"location,omitempty"` // parent folder ID Sort string `json:"sort,omitempty"` // field ASC/DESC Datasource string `json:"ds_uid,omitempty"` // "datasource" collides with the JSON value at the same leel :() DatasourceType string `json:"ds_type,omitempty"` Tags []string `json:"tags,omitempty"` Kind []string `json:"kind,omitempty"` PanelType string `json:"panel_type,omitempty"` UIDs []string `json:"uid,omitempty"` Explain bool `json:"explain,omitempty"` // adds details on why document matched WithAllowedActions bool `json:"withAllowedActions,omitempty"` // adds allowed actions per entity Facet []FacetField `json:"facet,omitempty"` SkipLocation bool `json:"skipLocation,omitempty"` HasPreview string `json:"hasPreview,omitempty"` // the light|dark theme Limit int `json:"limit,omitempty"` // explicit page size From int `json:"from,omitempty"` // for paging }
type DocumentExtender ¶
type DocumentExtender interface {
GetDashboardExtender(orgID int64, uids ...string) ExtendDashboardFunc
}
type FacetField ¶
type FramerFunc ¶
type FutureAuthService ¶
type FutureAuthService interface {
GetDashboardReadFilter(ctx context.Context, orgID int64, user *user.SignedInUser) (ResourceFilter, error)
}
FutureAuthService eventually implemented by the security service
type IsSearchReadyResponse ¶
type MockSearchService ¶
MockSearchService is an autogenerated mock type for the SearchService type
func (*MockSearchService) DoDashboardQuery ¶
func (_m *MockSearchService) DoDashboardQuery(ctx context.Context, _a1 *backend.User, orgId int64, query DashboardQuery) *backend.DataResponse
DoDashboardQuery provides a mock function with given fields: ctx, _a1, orgId, query
func (*MockSearchService) IsDisabled ¶
func (_m *MockSearchService) IsDisabled() bool
IsDisabled provides a mock function with given fields:
func (*MockSearchService) IsReady ¶
func (_m *MockSearchService) IsReady(ctx context.Context, orgId int64) IsSearchReadyResponse
IsReady provides a mock function with given fields: ctx, orgId
func (*MockSearchService) RegisterDashboardIndexExtender ¶
func (_m *MockSearchService) RegisterDashboardIndexExtender(ext DashboardIndexExtender)
RegisterDashboardIndexExtender provides a mock function with given fields: ext
func (*MockSearchService) Run ¶
func (_m *MockSearchService) Run(ctx context.Context) error
Run provides a mock function with given fields: ctx
func (*MockSearchService) TriggerReIndex ¶
func (_m *MockSearchService) TriggerReIndex()
TriggerReIndex provides a mock function with given fields:
type NoopDocumentExtender ¶
type NoopDocumentExtender struct{}
func (NoopDocumentExtender) GetDashboardExtender ¶
func (n NoopDocumentExtender) GetDashboardExtender(_ int64, _ ...string) ExtendDashboardFunc
type NoopExtender ¶
type NoopExtender struct{}
func (NoopExtender) GetDocumentExtender ¶
func (n NoopExtender) GetDocumentExtender() DocumentExtender
func (NoopExtender) GetQueryExtender ¶
func (n NoopExtender) GetQueryExtender(query DashboardQuery) QueryExtender
type NoopQueryExtender ¶
type NoopQueryExtender struct{}
func (NoopQueryExtender) GetFramer ¶
func (n NoopQueryExtender) GetFramer(_ *data.Frame) FramerFunc
type PermissionFilter ¶
type PermissionFilter struct {
// contains filtered or unexported fields
}
func (*PermissionFilter) Searcher ¶
func (q *PermissionFilter) Searcher(i search.Reader, options search.SearcherOptions) (search.Searcher, error)
type QueryExtender ¶
type QueryExtender interface {
GetFramer(frame *data.Frame) FramerFunc
}
type ResourceFilter ¶
ResourceFilter checks if a given a uid (resource identifier) check if we have the requested permission
type SearchHTTPService ¶
type SearchHTTPService interface {
RegisterHTTPRoutes(storageRoute routing.RouteRegister)
}
func ProvideSearchHTTPService ¶
func ProvideSearchHTTPService(search SearchService) SearchHTTPService
type SearchService ¶
type SearchService interface { registry.CanBeDisabled registry.BackgroundService DoDashboardQuery(ctx context.Context, user *backend.User, orgId int64, query DashboardQuery) *backend.DataResponse IsReady(ctx context.Context, orgId int64) IsSearchReadyResponse RegisterDashboardIndexExtender(ext DashboardIndexExtender) TriggerReIndex() // contains filtered or unexported methods }
func NewStubSearchService ¶
func NewStubSearchService() SearchService
func ProvideService ¶
func ProvideService(cfg *setting.Cfg, sql db.DB, entityEventStore store.EntityEventsService, ac accesscontrol.Service, tracer tracing.Tracer, features featuremgmt.FeatureToggles, orgService org.Service, userService user.Service, folderService folder.Service) SearchService
type StandardSearchService ¶
type StandardSearchService struct { registry.BackgroundService // contains filtered or unexported fields }
func (*StandardSearchService) DoDashboardQuery ¶
func (s *StandardSearchService) DoDashboardQuery(ctx context.Context, user *backend.User, orgID int64, q DashboardQuery) *backend.DataResponse
func (*StandardSearchService) IsDisabled ¶
func (s *StandardSearchService) IsDisabled() bool
func (*StandardSearchService) IsReady ¶
func (s *StandardSearchService) IsReady(ctx context.Context, orgId int64) IsSearchReadyResponse
func (*StandardSearchService) RegisterDashboardIndexExtender ¶
func (s *StandardSearchService) RegisterDashboardIndexExtender(ext DashboardIndexExtender)
func (*StandardSearchService) TriggerReIndex ¶
func (s *StandardSearchService) TriggerReIndex()
type SubstringQuery ¶
type SubstringQuery struct {
// contains filtered or unexported fields
}
func NewSubstringQuery ¶
func NewSubstringQuery(wildcard string) *SubstringQuery
func (*SubstringQuery) Boost ¶
func (q *SubstringQuery) Boost() float64
func (*SubstringQuery) Field ¶
func (q *SubstringQuery) Field() string
func (*SubstringQuery) Searcher ¶
func (q *SubstringQuery) Searcher(i search.Reader, options search.SearcherOptions) (search.Searcher, error)
func (*SubstringQuery) SetBoost ¶
func (q *SubstringQuery) SetBoost(b float64) *SubstringQuery
func (*SubstringQuery) SetField ¶
func (q *SubstringQuery) SetField(f string) *SubstringQuery
func (*SubstringQuery) Validate ¶
func (q *SubstringQuery) Validate() error
func (*SubstringQuery) Wildcard ¶
func (q *SubstringQuery) Wildcard() string
Wildcard returns the substring being queried