model

package
v0.4.23 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2026 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccessCheckResult

type AccessCheckResult map[string]string

AccessCheckResult contains the results of access verification

type AggregationBucket added in v0.4.5

type AggregationBucket struct {
	Key      string `json:"key"`
	DocCount uint64 `json:"doc_count"`
}

AggregationBucket represents a single aggregation bucket.

type AggregationResponse added in v0.4.5

type AggregationResponse struct {
	GroupBy TermsAggregation `json:"group_by"`
}

AggregationResponse represents the aggregations in a search response.

type CountResult added in v0.4.5

type CountResult struct {
	// Count number of resources found
	Count int
	// Aggregations
	Aggregation TermsAggregation
	// HasMore indicates if there are more results
	HasMore bool
	// Cache control header
	CacheControl *string
}

CountResult contains the results of a resource count search

type FieldFilter added in v0.4.10

type FieldFilter struct {
	Field string
	Value string
}

FieldFilter represents a single field:value filter pair

type Organization added in v0.4.0

type Organization struct {
	// Organization name
	Name string `json:"name"`
	// Organization domain
	Domain string `json:"domain"`
	// Organization industry classification
	Industry string `json:"industry"`
	// Business sector classification
	Sector string `json:"sector"`
	// Employee count or range
	Employees string `json:"employees"`
}

Organization represents an organization entity

type OrganizationSearchCriteria added in v0.4.0

type OrganizationSearchCriteria struct {
	// Organization name
	Name *string
	// Organization domain or website URL
	Domain *string
}

OrganizationSearchCriteria encapsulates search parameters for organizations

type OrganizationSuggestion added in v0.4.1

type OrganizationSuggestion struct {
	// Organization name
	Name string `json:"name"`
	// Organization domain
	Domain string `json:"domain"`
	Logo *string `json:"logo,omitempty"`
}

OrganizationSuggestion represents a suggested organization for typeahead search

type OrganizationSuggestionCriteria added in v0.4.1

type OrganizationSuggestionCriteria struct {
	// Search query for organization suggestions
	Query string
}

OrganizationSuggestionCriteria encapsulates search parameters for organization suggestions

type OrganizationSuggestionsResult added in v0.4.1

type OrganizationSuggestionsResult struct {
	// Suggestions found
	Suggestions []OrganizationSuggestion `json:"suggestions"`
}

OrganizationSuggestionsResult contains the results of an organization suggestions search

type Resource

type Resource struct {
	// Resource type
	Type string
	// Resource ID (within its resource collection)
	ID string
	// Resource data snapshot
	Data any
	// Metadata about the resource
	TransactionBodyStub
	// NeedCheck indicates if access control check is needed
	NeedCheck bool
}

Resource represents a domain resource entity

type SearchCriteria

type SearchCriteria struct {
	// Tags to filter resources with OR logic (any tag matches)
	Tags []string
	// TagsAll to filter resources with AND logic (all tags must match)
	TagsAll []string
	// Filters for direct field term clauses (AND logic - all must match)
	Filters []FieldFilter
	// FiltersAll for direct field term clauses (AND logic - all must match); preferred over Filters for clarity
	FiltersAll []FieldFilter
	// FiltersOr for direct field term clauses (OR logic - at least one must match)
	FiltersOr []FieldFilter
	// CelFilter is a CEL expression for post-processing filter on resource data
	// Example: data.slug == "tlf" || data.status == "active" && data.priority > 5
	// Available variables: data (map), resource_type (string), id (string)
	CelFilter *string
	// Resource name or alias; supports typeahead
	Name *string
	// Parent (for navigation; varies by object type)
	Parent *string
	// ParentRef is a reference to the parent resource
	ParentRef *string
	// ResourceType to search
	ResourceType *string
	// SearchAfter is used for pagination
	SearchAfter *string
	// Sortby order for results
	SortBy string
	// SortOrder for results
	SortOrder string
	// Opaque token for pagination
	PageToken *string
	// Pagesize for pagination
	PageSize int
	// PublicOnly indicates if only public resources should be returned
	PublicOnly bool
	// PrivateOnly indicates if only private resources should be returned
	PrivateOnly bool
	// GroupBy indicates the field to group by
	GroupBy string
	// GroupBySize indicates the size of the group by
	GroupBySize int
	// DateField is the field to filter by date range (auto-prefixed with "data.")
	DateField *string
	// DateFrom is the start date for range filter (inclusive, ISO 8601 or date-only)
	DateFrom *string
	// DateTo is the end date for range filter (inclusive, ISO 8601 or date-only)
	DateTo *string
	// FilterGrants filters results by the user's direct FGA grants ("direct")
	FilterGrants *string
	// ObjectRefs is a pre-computed list of object_ref values to filter results by (from FGA grants)
	ObjectRefs []string
}

SearchCriteria encapsulates all possible search parameters

type SearchResult

type SearchResult struct {
	// Resources found
	Resources []Resource
	// Opaque token if more results are available
	PageToken *string
	// Cache control header
	CacheControl *string
	// Total number of resources found
	Total int
}

SearchResult contains the results of a resource search

type TermsAggregation added in v0.4.5

type TermsAggregation struct {
	DocCountErrorUpperBound uint64              `json:"doc_count_error_upper_bound"`
	SumOtherDocCount        uint64              `json:"sum_other_doc_count"`
	Buckets                 []AggregationBucket `json:"buckets"`
}

TermsAggregation represents a terms aggregation response.

type TransactionBodyStub

type TransactionBodyStub struct {
	ObjectRef            string `json:"object_ref"`
	ObjectType           string `json:"object_type"`
	ObjectID             string `json:"object_id"`
	Public               bool   `json:"public"`
	AccessCheckObject    string `json:"access_check_object"`
	AccessCheckRelation  string `json:"access_check_relation"`
	HistoryCheckObject   string `json:"history_check_object"`
	HistoryCheckRelation string `json:"history_check_relation"`
	AccessCheckQuery     string `json:"access_check_query"`
	HistoryCheckQuery    string `json:"history_check_query"`
}

TransactionBodyStub is used to decode the response's "source". **Ensure the fields here align to the relevant `SourceIncludes` parameters**.

Jump to

Keyboard shortcuts

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