types Types

This document shows Go type definitions from the codebase.

Generated types:

As {#as}

Source: ats/types/attestation.go:9

type As struct {
	ID string `db:"id" json:"id" validate:"required"`
	Subjects []string `db:"subjects" json:"subjects" validate:"required,min=1"`
	Predicates []string `db:"predicates" json:"predicates" validate:"required,min=1"`
	Contexts []string `db:"contexts" json:"contexts" validate:"required,min=1"`
	Actors []string `db:"actors" json:"actors" validate:"required,min=1"`
	Timestamp time.Time `db:"timestamp" json:"timestamp" validate:"required"`
	Source string `db:"source" json:"source" validate:"required"`
	Attributes map[string]interface{} `db:"attributes" json:"attributes,omitempty"`
	CreatedAt time.Time `db:"created_at" json:"created_at"`
}

AsCommand {#ascommand}

Source: ats/types/attestation.go:22

type AsCommand struct {
	Subjects []string `json:"subjects"`
	Predicates []string `json:"predicates"`
	Contexts []string `json:"contexts"`
	Actors []string `json:"actors"`
	Timestamp time.Time `json:"timestamp"`
	Attributes map[string]interface{} `json:"attributes,omitempty"`
}

AxDebug {#axdebug}

Source: ats/types/attestation.go:104

type AxDebug struct {
	ExecutionTimeMs int64 `json:"execution_time_ms"`
	SQLQuery string `json:"sql_query,omitempty"`
	SQLArgs []interface{} `json:"sql_args,omitempty"`
	OriginalFilter AxFilter `json:"original_filter"`
	ExpandedFilter AxFilter `json:"expanded_filter,omitempty"`
	AliasExpansions map[string][]string `json:"alias_expansions,omitempty"`
	DatabaseRowCount int `json:"database_row_count"`
}

AxFilter {#axfilter}

Source: ats/types/attestation.go:81

type AxFilter struct {
	Subjects []string `json:"subjects"`
	Predicates []string `json:"predicates"`
	Contexts []string `json:"contexts"`
	Actors []string `json:"actors"`
	TimeStart *time.Time `json:"time_start"`
	TimeEnd *time.Time `json:"time_end"`
	OverComparison *OverFilter `json:"over_comparison"`
	Limit int `json:"limit"`
	Format string `json:"format"`
	SoActions []string `json:"so_actions"`
}

AxResult {#axresult}

Source: ats/types/attestation.go:95

type AxResult struct {
	Attestations []As `json:"attestations"`
	Conflicts []Conflict `json:"conflicts"`
	Summary AxSummary `json:"summary"`
	Format string `json:"format"`
	Debug AxDebug `json:"debug,omitempty"`
}

AxSummary {#axsummary}

Source: ats/types/attestation.go:115

type AxSummary struct {
	TotalAttestations int `json:"total_attestations"`
	UniqueSubjects map[string]int `json:"unique_subjects"`
	UniquePredicates map[string]int `json:"unique_predicates"`
	UniqueContexts map[string]int `json:"unique_contexts"`
	UniqueActors map[string]int `json:"unique_actors"`
}

CompletionItem {#completionitem}

Source: ats/types/lsp.go:4

type CompletionItem struct {
	Label string `json:"label"`
	Kind string `json:"kind"`
	InsertText string `json:"insert_text"`
	Detail string `json:"detail,omitempty"`
	Documentation string `json:"documentation,omitempty"`
	SortText string `json:"sort_text"`
}

Conflict {#conflict}

Source: ats/types/attestation.go:124

type Conflict struct {
	Subject string `json:"subject"`
	Predicate string `json:"predicate"`
	Context string `json:"context"`
	Attestations []As `json:"attestations"`
	Resolution string `json:"resolution"`
}

OverFilter {#overfilter}

Source: ats/types/attestation.go:74

type OverFilter struct {
	Value float64 `json:"value"`
	Unit string `json:"unit"`
	Operator string `json:"operator"`
}

RelationshipTypeDef {#relationshiptypedef}

Source: ats/types/type_definitions.go:30

type RelationshipTypeDef struct {
	Name string
	Label string
	Color string
	LinkDistance *float64
	LinkStrength *float64
	Deprecated bool
}

TypeDef {#typedef}

Source: ats/types/type_definitions.go:19

type TypeDef struct {
	Name string
	Label string
	Color string
	Opacity *float64
	Deprecated bool
}