Documentation
¶
Index ¶
Constants ¶
View Source
const ( // DefaultSearchTimeout prevents runaway queries from exhausting connections DefaultSearchTimeout = 10 * time.Second )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FacetValue ¶ added in v0.4.1
type Facets ¶ added in v0.4.1
type Facets struct {
Types map[ResultType]int `json:"types"`
AssetTypes []FacetValue `json:"asset_types"`
Providers []FacetValue `json:"providers"`
Tags []FacetValue `json:"tags"`
}
type Filter ¶
type Filter struct {
Query string `json:"query" validate:"omitempty,max=256"` // Optional query for full-text search
Types []ResultType `json:"types,omitempty"`
AssetTypes []string `json:"asset_types,omitempty"` // Filter assets by type (TABLE, VIEW, etc.)
Providers []string `json:"providers,omitempty"` // Filter assets by provider
Tags []string `json:"tags,omitempty"` // Filter assets by tags
Limit int `json:"limit" validate:"omitempty,gte=1,lte=100"`
Offset int `json:"offset" validate:"omitempty,gte=0"`
}
Filter represents search filter options
type PostgresRepository ¶
type PostgresRepository struct {
// contains filtered or unexported fields
}
func NewPostgresRepository ¶
func NewPostgresRepository(db *pgxpool.Pool, recorder metrics.Recorder) *PostgresRepository
func (*PostgresRepository) GetMetadata ¶ added in v0.6.0
func (r *PostgresRepository) GetMetadata(ctx context.Context, resultType ResultType, ids []string) (map[string]map[string]interface{}, error)
GetMetadata fetches full metadata for a set of results by type and IDs. This is used for lazy loading detailed information after initial search.
type Repository ¶
type Result ¶
type Result struct {
Type ResultType `json:"type"`
ID string `json:"id"`
Name string `json:"name"`
Description *string `json:"description,omitempty"`
Metadata map[string]interface{} `json:"metadata,omitempty"`
URL string `json:"url"`
Rank float32 `json:"rank"`
UpdatedAt *time.Time `json:"updated_at,omitempty"`
}
Result represents a unified search result
type ResultType ¶
type ResultType string
ResultType represents the type of search result
const ( ResultTypeAsset ResultType = "asset" ResultTypeGlossary ResultType = "glossary" ResultTypeTeam ResultType = "team" ResultTypeDataProduct ResultType = "data_product" )
Click to show internal directories.
Click to hide internal directories.