search

package
v1.7.1 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Model

type Model struct {
	Spec Spec
}
type Search struct {
	TablesMap map[string]Model // normalized table name to table metadata (map[CQ Table Name]Model)
	// contains filtered or unexported fields
}

func NewSearch

func NewSearch(sp *api.SP, logger zerolog.Logger) *Search

func (*Search) GetDestTable

func (s *Search) GetDestTable(searchName string, spec Spec) (*schema.Table, error)

func (*Search) Sync

func (s *Search) Sync(ctx context.Context, metrics *source.TableClientMetrics, res chan<- *schema.Resource, table *schema.Table) error

type Spec

type Spec struct {
	QueryText        string   `json:"query_text"`        // Required
	TrimDuplicates   bool     `json:"trim_duplicates"`   // Optional, default is false
	SourceID         string   `json:"source_id"`         // Optional, default is empty
	SelectProperties []string `json:"select_properties"` // Optional, default is empty array
	// contains filtered or unexported fields
}

Spec is the configuration for Search source

func (*Spec) GetAlias added in v1.6.3

func (*Spec) GetAlias(searchName string) string

GetAlias returns an alias for the list

func (*Spec) SetDefault

func (s *Spec) SetDefault()

SetDefault sets default values for list spec

func (*Spec) Validate added in v1.5.0

func (s *Spec) Validate() error

Validate validates search spec

Jump to

Keyboard shortcuts

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