model

package
v0.0.0-...-ec844c3 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2026 License: Apache-2.0 Imports: 35 Imported by: 0

Documentation

Overview

Copyright 2025 Specter Ops, Inc.

Licensed under the Apache License, Version 2.0 you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

SPDX-License-Identifier: Apache-2.0

Copyright 2025 Specter Ops, Inc.

Licensed under the Apache License, Version 2.0 you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

SPDX-License-Identifier: Apache-2.0

Copyright 2026 Specter Ops, Inc.

Licensed under the Apache License, Version 2.0 you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

SPDX-License-Identifier: Apache-2.0

Index

Constants

View Source
const (
	SelectorSpecActionAdd    = "add"
	SelectorSpecActionRemove = "remove"
	TierZeroAssetGroupName   = "Admin Tier Zero"
	TierZeroAssetGroupTag    = "admin_tier_0"
	OwnedAssetGroupName      = "Owned"
	OwnedAssetGroupTag       = "owned"
)
View Source
const (
	AssetGroupActorBloodHound          = "BloodHound"
	AssetGroupTierZeroPosition         = 1
	AssetGroupTierHygienePlaceholderId = 0
)
View Source
const (
	TierZeroGlyph = "gem"
	OwnedGlyph    = "skull"
)
View Source
const (
	GreaterThan         FilterOperator = "gt"
	GreaterThanOrEquals FilterOperator = "gte"
	LessThan            FilterOperator = "lt"
	LessThanOrEquals    FilterOperator = "lte"
	Equals              FilterOperator = "eq"
	NotEquals           FilterOperator = "neq"
	ApproximatelyEquals FilterOperator = "~eq"

	GreaterThanSymbol         string = ">"
	GreaterThanOrEqualsSymbol string = ">="
	LessThanSymbol            string = "<"
	LessThanOrEqualsSymbol    string = "<="
	EqualsSymbol              string = "="
	NotEqualsSymbol           string = "<>"
	ApproximatelyEqualSymbol  string = "ILIKE"

	NullString     = "null"
	TrueString     = "true"
	FalseString    = "false"
	IdString       = "id"
	ObjectIdString = "objectid"
)
View Source
const (
	PaginationQueryParameterBefore = "before"
	PaginationQueryParameterAfter  = "after"
	PaginationQueryParameterLimit  = "limit"
	PaginationQueryParameterOffset = "offset"
	PaginationQueryParameterSkip   = "skip"
	PaginationQueryParameterSortBy = "sort_by"
)
View Source
const (
	ObjectIDAttributeNameFormat = "urn:oasis:names:tc:SAML:2.0:attrname-format:uri"
	ObjectIDEmail               = "urn:oid:0.9.2342.19200300.100.1.3"
	ObjectIDGivenName           = "urn:oid:2.5.4.42"
	ObjectIDName                = "urn:oid:2.5.4.41"
	ObjectIDSurname             = "urn:oid:2.5.4.4"

	XMLTypeString             = "xs:string"
	XMLSOAPClaimsEmailAddress = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress"
	XMLSOAPClaimsGivenName    = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname"
	XMLSOAPClaimsName         = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name"
	XMLSOAPClaimsSurname      = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname"
	MicrosoftClaimsRole       = "http://schemas.microsoft.com/ws/2008/06/identity/claims/role"
)
View Source
const (
	ErrResponseDetailsBadQueryParameterFilters    = "there are errors in the query parameter filters specified"
	ErrResponseDetailsFilterPredicateNotSupported = "the specified filter predicate is not supported for this column"
	ErrResponseDetailsColumnNotFilterable         = "the specified column cannot be filtered"
	ErrResponseDetailsColumnNotSortable           = "the specified column cannot be sorted"
)
View Source
const AssetGroupHistoryRecordRollingWindow = 90

AssetGroupHistoryRecordRollingWindow This defines the rolling window in days that the asset group history table will be truncated down to at the end of a successful analysis run

View Source
const PermissionURIScheme = "permission"

Variables

View Source
var (
	ErrGraphExtensionBuiltIn    = errors.New("cannot modify a built-in graph extension")
	ErrGraphExtensionValidation = errors.New("graph schema validation error")
	ErrGraphDBRefreshKinds      = errors.New("error refreshing graph db kinds")

	ErrDuplicateGraphSchemaExtensionName         = errors.New("duplicate graph schema extension name")
	ErrDuplicateGraphSchemaExtensionNamespace    = errors.New("duplicate graph schema extension namespace")
	ErrDuplicateSchemaNodeKindName               = errors.New("duplicate schema node kind name")
	ErrDuplicateGraphSchemaExtensionPropertyName = errors.New("duplicate graph schema extension property name")
	ErrDuplicateSchemaRelationshipKindName       = errors.New("duplicate schema relationship kind name")
	ErrDuplicateSchemaEnvironment                = errors.New("duplicate schema environment")
	ErrDuplicateSchemaRelationshipFindingName    = errors.New("duplicate schema relationship finding name")
	ErrDuplicatePrincipalKind                    = errors.New("duplicate principal kind")
)
View Source
var ErrNotFiltered = errors.New("parameter value is not filtered")
View Source
var (
	ErrSAMLAssertion = errors.New("SAML assertion error")
)

Functions

func AllPaginationQueryParameters

func AllPaginationQueryParameters() []string

func AssetGroupAssociations

func AssetGroupAssociations() []string

AssetGroupAssociations returns a list of AssetGroup model associations to load eagerly by default with GORM Preload(...). Note: this does not include the "Collections" association on-purpose since this collection grows over time and may require additional parameters for fetching.

func AssetGroupCollectionAssociations

func AssetGroupCollectionAssociations() []string

AssetGroupCollectionAssociations returns a list of AssetGroupCollection model associations to eagerly by default with GORM Preload(...).

func ErrIsGraphSchemaDuplicateError

func ErrIsGraphSchemaDuplicateError(err error) bool

ErrIsGraphSchemaDuplicateError - determines if the provided error is one of the following errors: ErrDuplicateGraphSchemaExtensionName ErrDuplicateGraphSchemaExtensionNamespace ErrDuplicateSchemaNodeKindName ErrDuplicateGraphSchemaExtensionPropertyName ErrDuplicateSchemaRelationshipKindName ErrDuplicateSchemaEnvironment ErrDuplicateSchemaRelationshipFindingName ErrDuplicatePrincipalKind

func FromDAWGSRelationship

func FromDAWGSRelationship(includeProperties bool) func(*graph.Relationship) UnifiedEdge

This is being used with slices.Map so it is necessary to return a closure

func GetAssetGroupMemberProperties

func GetAssetGroupMemberProperties(node *graph.Node) (primaryKind, displayName, objectId, envId string)

These are the relevant properties for asset group tags. This method serves to keep consistency across the feature

func IgnoreFilters

func IgnoreFilters() []string

func RoleAssociations

func RoleAssociations() []string

func SSOProviderIsStringField

func SSOProviderIsStringField(field string) bool

Define which fields are string type

func SSOProviderSortableFields

func SSOProviderSortableFields(field string) bool

Define sortable fields

func SSOProviderValidFilterPredicates

func SSOProviderValidFilterPredicates(field string) ([]string, error)

Define valid filter predicates for each field

func UserAssociations

func UserAssociations() []string

Used by gorm to preload / instantiate the user FK'd tables data

func UserSessionAssociations

func UserSessionAssociations() []string

Used by gorm to preload / instantiate the user FK'd tables data

Types

type ADDataQualityAggregation

type ADDataQualityAggregation struct {
	Domains                int     `json:"domains"`
	Users                  int     `json:"users"`
	Groups                 int     `json:"groups"`
	Computers              int     `json:"computers"`
	OUs                    int     `json:"ous" gorm:"column:ous"`
	Containers             int     `json:"containers"`
	GPOs                   int     `json:"gpos" gorm:"column:gpos"`
	AIACAs                 int     `json:"aiacas" gorm:"column:aiacas"`
	RootCAs                int     `json:"rootcas" gorm:"column:rootcas"`
	EnterpriseCAs          int     `json:"enterprisecas" gorm:"column:enterprisecas"`
	NTAuthStores           int     `json:"ntauthstores" gorm:"column:ntauthstores"`
	CertTemplates          int     `json:"certtemplates" gorm:"column:certtemplates"`
	IssuancePolicies       int     `json:"issuancepolicies" gorm:"column:issuancepolicies"`
	Acls                   int     `json:"acls" gorm:"column:acls"`
	Sessions               int     `json:"sessions"`
	Relationships          int     `json:"relationships"`
	SessionCompleteness    float32 `json:"session_completeness"`
	LocalGroupCompleteness float32 `json:"local_group_completeness"`
	RunID                  string  `json:"run_id" gorm:"index"`

	Serial
}

type ADDataQualityAggregations

type ADDataQualityAggregations []ADDataQualityAggregation

type ADDataQualityStat

type ADDataQualityStat struct {
	DomainSID              string      `json:"domain_sid" gorm:"column:domain_sid"`
	Users                  int         `json:"users"`
	Groups                 int         `json:"groups"`
	Computers              int         `json:"computers"`
	OUs                    int         `json:"ous" gorm:"column:ous"`
	Containers             int         `json:"containers"`
	GPOs                   int         `json:"gpos" gorm:"column:gpos"`
	AIACAs                 int         `json:"aiacas" gorm:"column:aiacas"`
	RootCAs                int         `json:"rootcas" gorm:"column:rootcas"`
	EnterpriseCAs          int         `json:"enterprisecas" gorm:"column:enterprisecas"`
	NTAuthStores           int         `json:"ntauthstores" gorm:"column:ntauthstores"`
	CertTemplates          int         `json:"certtemplates" gorm:"column:certtemplates"`
	IssuancePolicies       int         `json:"issuancepolicies" gorm:"column:issuancepolicies"`
	ACLs                   int         `json:"acls" gorm:"column:acls"`
	Sessions               int         `json:"sessions"`
	Relationships          int         `json:"relationships"`
	SessionCompleteness    nan.Float64 `json:"session_completeness"`
	LocalGroupCompleteness nan.Float64 `json:"local_group_completeness"`
	RunID                  string      `json:"run_id" gorm:"index"`

	Serial
}

type ADDataQualityStats

type ADDataQualityStats []ADDataQualityStat

func (ADDataQualityStats) IsSortable

func (s ADDataQualityStats) IsSortable(column string) bool

type AnalysisRequest

type AnalysisRequest struct {
	RequestedBy string              `json:"requested_by"`
	RequestType AnalysisRequestType `json:"request_type"`
	RequestedAt time.Time           `json:"requested_at"`

	DeleteAllGraph        bool           `json:"delete_all_graph"`                       // Deletes all nodes and edges in the graph
	DeleteSourcelessGraph bool           `json:"delete_sourceless_graph"`                // Deletes all nodes and edges in the graph that have a type not registered in the source_kinds table
	DeleteSourceKinds     pq.StringArray `gorm:"type:text[];column:delete_source_kinds"` // Deletes all nodes and edges per kind provided.
}

type AnalysisRequestType

type AnalysisRequestType string
const (
	AnalysisRequestAnalysis AnalysisRequestType = "analysis"
	AnalysisRequestDeletion AnalysisRequestType = "deletion"
)

type AssetGroup

type AssetGroup struct {
	Name        string                `json:"name"`
	Tag         string                `json:"tag"`
	SystemGroup bool                  `json:"system_group"`
	Selectors   AssetGroupSelectors   `gorm:"constraint:OnDelete:CASCADE;"`
	Collections AssetGroupCollections `json:"-" gorm:"constraint:OnDelete:CASCADE;"`
	MemberCount int                   `json:"member_count" gorm:"-"`

	Serial
}

func (AssetGroup) AuditData

func (s AssetGroup) AuditData() AuditData

type AssetGroupCertification

type AssetGroupCertification int
const (
	AssetGroupCertificationPending AssetGroupCertification = 0
	AssetGroupCertificationRevoked AssetGroupCertification = 1
	AssetGroupCertificationManual  AssetGroupCertification = 2
	AssetGroupCertificationAuto    AssetGroupCertification = 3
)

type AssetGroupCollection

type AssetGroupCollection struct {
	AssetGroupID int32                       `json:"-"`
	Entries      AssetGroupCollectionEntries `json:"entries" gorm:"constraint:OnDelete:CASCADE;"`

	BigSerial
}

type AssetGroupCollectionEntries

type AssetGroupCollectionEntries []AssetGroupCollectionEntry

type AssetGroupCollectionEntry

type AssetGroupCollectionEntry struct {
	AssetGroupCollectionID int64                   `json:"-"`
	ObjectID               string                  `json:"object_id"`
	NodeLabel              string                  `json:"node_label"`
	Properties             types.JSONUntypedObject `json:"properties"`

	BigSerial
}

type AssetGroupCollections

type AssetGroupCollections []AssetGroupCollection

func (AssetGroupCollections) GetFilterableColumns

func (s AssetGroupCollections) GetFilterableColumns() []string

func (AssetGroupCollections) GetValidFilterPredicatesAsStrings

func (s AssetGroupCollections) GetValidFilterPredicatesAsStrings(column string) ([]string, error)

func (AssetGroupCollections) IsSortable

func (s AssetGroupCollections) IsSortable(column string) bool

func (AssetGroupCollections) ValidFilters

func (s AssetGroupCollections) ValidFilters() map[string][]FilterOperator

type AssetGroupExpansionMethod

type AssetGroupExpansionMethod int
const (
	AssetGroupExpansionMethodNone     AssetGroupExpansionMethod = 0
	AssetGroupExpansionMethodAll      AssetGroupExpansionMethod = 1
	AssetGroupExpansionMethodChildren AssetGroupExpansionMethod = 2
	AssetGroupExpansionMethodParents  AssetGroupExpansionMethod = 3
)

type AssetGroupHistory

type AssetGroupHistory struct {
	ID              int64                   `json:"id" gorm:"primaryKey"`
	CreatedAt       time.Time               `json:"created_at"`
	Actor           string                  `json:"actor"`
	Email           null.String             `json:"email"`
	Action          AssetGroupHistoryAction `json:"action"`
	Target          string                  `json:"target"`
	AssetGroupTagId int                     `json:"asset_group_tag_id"`
	EnvironmentId   null.String             `json:"environment_id"`
	Note            null.String             `json:"note"`
}

AssetGroupHistory is the record of CRUD changes associated with v2 of the asset groups feature

func (AssetGroupHistory) AuditData

func (s AssetGroupHistory) AuditData() AuditData

func (AssetGroupHistory) IsSortable

func (s AssetGroupHistory) IsSortable(criteria string) bool

func (AssetGroupHistory) IsStringColumn

func (s AssetGroupHistory) IsStringColumn(filter string) bool

func (AssetGroupHistory) TableName

func (AssetGroupHistory) TableName() string

func (AssetGroupHistory) ValidFilters

func (s AssetGroupHistory) ValidFilters() map[string][]FilterOperator

type AssetGroupHistoryAction

type AssetGroupHistoryAction string
const (
	AssetGroupHistoryActionCreateTag AssetGroupHistoryAction = "CreateTag"
	AssetGroupHistoryActionUpdateTag AssetGroupHistoryAction = "UpdateTag"
	AssetGroupHistoryActionDeleteTag AssetGroupHistoryAction = "DeleteTag"

	AssetGroupHistoryActionAnalysisEnabledTag  AssetGroupHistoryAction = "AnalysisEnabledTag"
	AssetGroupHistoryActionAnalysisDisabledTag AssetGroupHistoryAction = "AnalysisDisabledTag"

	AssetGroupHistoryActionCreateSelector AssetGroupHistoryAction = "CreateSelector"
	AssetGroupHistoryActionUpdateSelector AssetGroupHistoryAction = "UpdateSelector"
	AssetGroupHistoryActionDeleteSelector AssetGroupHistoryAction = "DeleteSelector"

	AssetGroupHistoryActionCertifyNodeAuto    AssetGroupHistoryAction = "CertifyNodeAuto"
	AssetGroupHistoryActionCertifyNodeManual  AssetGroupHistoryAction = "CertifyNodeManual"
	AssetGroupHistoryActionCertifyNodeRevoked AssetGroupHistoryAction = "CertifyNodeRevoked"
)

func ToAssetGroupHistoryActionFromAssetGroupCertification

func ToAssetGroupHistoryActionFromAssetGroupCertification(certifyValue AssetGroupCertification) AssetGroupHistoryAction

type AssetGroupSelector

type AssetGroupSelector struct {
	AssetGroupID   int32  `json:"asset_group_id" gorm:"UNIQUE_INDEX:compositeindex"`
	Name           string `json:"name" gorm:"UNIQUE_INDEX:compositeindex"`
	Selector       string `json:"selector"`
	SystemSelector bool   `json:"system_selector"`

	Serial
}

func (AssetGroupSelector) AuditData

func (s AssetGroupSelector) AuditData() AuditData

type AssetGroupSelectorNode

type AssetGroupSelectorNode struct {
	SelectorId        int                          `json:"selector_id"`
	NodeId            graph.ID                     `json:"node_id"`
	Certified         AssetGroupCertification      `json:"certified"`
	CertifiedBy       null.String                  `json:"certified_by"`
	Source            AssetGroupSelectorNodeSource `json:"source"`
	CreatedAt         time.Time                    `json:"created_at"`
	UpdatedAt         time.Time                    `json:"updated_at"`
	NodePrimaryKind   string                       `json:"node_primary_kind"`
	NodeEnvironmentId string                       `json:"node_environment_id"`
	NodeObjectId      string                       `json:"node_object_id"`
	NodeName          string                       `json:"node_name"`
}

func (AssetGroupSelectorNode) IsStringColumn

func (s AssetGroupSelectorNode) IsStringColumn(filter string) bool

func (AssetGroupSelectorNode) TableName

func (s AssetGroupSelectorNode) TableName() string

func (AssetGroupSelectorNode) ValidFilters

func (s AssetGroupSelectorNode) ValidFilters() map[string][]FilterOperator

type AssetGroupSelectorNodeExpanded

type AssetGroupSelectorNodeExpanded struct {
	AssetGroupSelectorNode
	AssetGroupTagId int `json:"asset_group_tag_id"`
	Position        int `json:"position"`
}

type AssetGroupSelectorNodeSource

type AssetGroupSelectorNodeSource int
const (
	AssetGroupSelectorNodeSourceSeed   AssetGroupSelectorNodeSource = 1
	AssetGroupSelectorNodeSourceChild  AssetGroupSelectorNodeSource = 2
	AssetGroupSelectorNodeSourceParent AssetGroupSelectorNodeSource = 3
)

type AssetGroupSelectorNodes

type AssetGroupSelectorNodes []AssetGroupSelectorNode

type AssetGroupSelectorSpec

type AssetGroupSelectorSpec struct {
	SelectorName   string `json:"selector_name"`
	EntityObjectID string `json:"sid"`
	Action         string `json:"action"`
}

func (AssetGroupSelectorSpec) AuditData

func (s AssetGroupSelectorSpec) AuditData() AuditData

func (AssetGroupSelectorSpec) Validate

func (s AssetGroupSelectorSpec) Validate() error

type AssetGroupSelectors

type AssetGroupSelectors []AssetGroupSelector

func (AssetGroupSelectors) Strings

func (s AssetGroupSelectors) Strings() []string

type AssetGroupTag

type AssetGroupTag struct {
	ID              int               `json:"id"`
	Type            AssetGroupTagType `json:"type" validate:"required"`
	KindId          int               `json:"kind_id"`
	Name            string            `json:"name" validate:"required"`
	Description     string            `json:"description"`
	CreatedAt       time.Time         `json:"created_at"`
	CreatedBy       string            `json:"created_by"`
	UpdatedAt       time.Time         `json:"updated_at"`
	UpdatedBy       string            `json:"updated_by"`
	DeletedAt       null.Time         `json:"deleted_at"`
	DeletedBy       null.String       `json:"deleted_by"`
	Position        null.Int32        `json:"position"`
	RequireCertify  null.Bool         `json:"require_certify"`
	AnalysisEnabled null.Bool         `json:"analysis_enabled"`
	Glyph           null.String       `json:"glyph"`
}

func (AssetGroupTag) AuditData

func (s AssetGroupTag) AuditData() AuditData

func (AssetGroupTag) GetExpansionMethod

func (s AssetGroupTag) GetExpansionMethod() AssetGroupExpansionMethod

func (AssetGroupTag) IsStringColumn

func (s AssetGroupTag) IsStringColumn(filter string) bool

func (AssetGroupTag) IsTierZero

func (s AssetGroupTag) IsTierZero() bool

func (AssetGroupTag) KindName

func (s AssetGroupTag) KindName() string

func (AssetGroupTag) TableName

func (AssetGroupTag) TableName() string

func (AssetGroupTag) ToKind

func (s AssetGroupTag) ToKind() graph.Kind

func (AssetGroupTag) ToType

func (s AssetGroupTag) ToType() string

func (AssetGroupTag) ValidFilters

func (s AssetGroupTag) ValidFilters() map[string][]FilterOperator

type AssetGroupTagCounts

type AssetGroupTagCounts struct {
	Members           int64 `json:"members"`
	Selectors         int   `json:"selectors"`
	CustomSelectors   int   `json:"custom_selectors"`
	DefaultSelectors  int   `json:"default_selectors"`
	DisabledSelectors int   `json:"disabled_selectors"`
}

type AssetGroupTagCountsMap

type AssetGroupTagCountsMap map[int]AssetGroupTagCounts

type AssetGroupTagSelector

type AssetGroupTagSelector struct {
	ID              int                       `json:"id"`
	AssetGroupTagId int                       `json:"asset_group_tag_id"`
	CreatedAt       time.Time                 `json:"created_at"`
	CreatedBy       string                    `json:"created_by"`
	UpdatedAt       time.Time                 `json:"updated_at"`
	UpdatedBy       string                    `json:"updated_by"`
	DisabledAt      null.Time                 `json:"disabled_at"`
	DisabledBy      null.String               `json:"disabled_by"`
	Name            string                    `json:"name" validate:"required"`
	Description     string                    `json:"description"`
	AutoCertify     SelectorAutoCertifyMethod `json:"auto_certify"`
	IsDefault       bool                      `json:"is_default"`
	AllowDisable    bool                      `json:"allow_disable"`

	Seeds []SelectorSeed `json:"seeds,omitempty" validate:"required" gorm:"-"`
}

func (AssetGroupTagSelector) AuditData

func (s AssetGroupTagSelector) AuditData() AuditData

func (AssetGroupTagSelector) IsSortable

func (s AssetGroupTagSelector) IsSortable(criteria string) bool

func (AssetGroupTagSelector) IsStringColumn

func (s AssetGroupTagSelector) IsStringColumn(filter string) bool

func (AssetGroupTagSelector) TableName

func (AssetGroupTagSelector) TableName() string

func (AssetGroupTagSelector) ValidFilters

func (s AssetGroupTagSelector) ValidFilters() map[string][]FilterOperator

type AssetGroupTagSelectors

type AssetGroupTagSelectors []AssetGroupTagSelector

type AssetGroupTagType

type AssetGroupTagType int
const (
	AssetGroupTagTypeTier  AssetGroupTagType = 1
	AssetGroupTagTypeLabel AssetGroupTagType = 2
	AssetGroupTagTypeOwned AssetGroupTagType = 3
)

type AssetGroupTags

type AssetGroupTags []AssetGroupTag

type AssetGroups

type AssetGroups []AssetGroup

func (AssetGroups) FindByName

func (s AssetGroups) FindByName(name string) (AssetGroup, bool)

func (AssetGroups) GetFilterableColumns

func (s AssetGroups) GetFilterableColumns() []string

func (AssetGroups) GetValidFilterPredicatesAsStrings

func (s AssetGroups) GetValidFilterPredicatesAsStrings(column string) ([]string, error)

func (AssetGroups) IsSortable

func (s AssetGroups) IsSortable(column string) bool

func (AssetGroups) IsString

func (s AssetGroups) IsString(column string) bool

func (AssetGroups) ValidFilters

func (s AssetGroups) ValidFilters() map[string][]FilterOperator

type AuditData

type AuditData map[string]any

func (AuditData) AuditData

func (s AuditData) AuditData() AuditData

func (AuditData) MergeLeft

func (s AuditData) MergeLeft(rightSide Auditable) AuditData

MergeLeft merges the given Auditable interface and merges its AuditData fields with the fields stored in this map. Conflicting keys are overwritten with the Auditable interface's AuditData fields.

type AuditEntry

type AuditEntry struct {
	CommitID uuid.UUID
	Action   AuditLogAction
	Model    Auditable
	Status   AuditLogEntryStatus
	ErrorMsg string
}

func NewAuditEntry

func NewAuditEntry(action AuditLogAction, status AuditLogEntryStatus, data AuditData) (AuditEntry, error)

func (AuditEntry) Matches

func (s AuditEntry) Matches(x any) bool

Necessary function for testing. Ensures all fields except CommitID match so mocking checks pass.

func (AuditEntry) String

func (s AuditEntry) String() string

type AuditLog

type AuditLog struct {
	ID              int64                   `json:"id" gorm:"primaryKey"`
	CreatedAt       time.Time               `json:"created_at" gorm:"index"`
	ActorID         string                  `json:"actor_id" gorm:"index"`
	ActorName       string                  `json:"actor_name"`
	ActorEmail      string                  `json:"actor_email"`
	Action          AuditLogAction          `json:"action" gorm:"index"`
	Fields          types.JSONUntypedObject `json:"fields"`
	RequestID       string                  `json:"request_id"`
	SourceIpAddress string                  `json:"source_ip_address"`
	Status          AuditLogEntryStatus     `json:"status"`
	CommitID        uuid.UUID               `json:"commit_id" gorm:"type:text"`
}

TODO embed Basic into this struct instead of declaring the ID and CreatedAt fields. This will require a migration

func (AuditLog) String

func (s AuditLog) String() string

type AuditLogAction

type AuditLogAction string
const (
	AuditLogActionAcceptEULA    AuditLogAction = "AcceptEULA"
	AuditLogActionAcceptFedEULA AuditLogAction = "AcceptFedEULA" // INFO: The FedEULA is only applicable to select enterprise installations

	AuditLogActionLoginAttempt              AuditLogAction = "LoginAttempt"
	AuditLogActionUnauthorizedAccessAttempt AuditLogAction = "UnauthorizedAccessAttempt"

	AuditLogActionCreateUser AuditLogAction = "CreateUser"
	AuditLogActionUpdateUser AuditLogAction = "UpdateUser"
	AuditLogActionDeleteUser AuditLogAction = "DeleteUser"

	AuditLogActionCreateAssetGroup AuditLogAction = "CreateAssetGroup"
	AuditLogActionUpdateAssetGroup AuditLogAction = "UpdateAssetGroup"
	AuditLogActionDeleteAssetGroup AuditLogAction = "DeleteAssetGroup"

	AuditLogActionDeleteAssetGroupSelector AuditLogAction = "DeleteAssetGroupSelector"

	AuditLogActionCreateAuthToken     AuditLogAction = "CreateAuthToken"
	AuditLogActionDeleteAuthToken     AuditLogAction = "DeleteAuthToken"
	AuditLogActionDeleteAllAuthTokens AuditLogAction = "DeleteAllAuthTokens"

	AuditLogActionCreateAuthSecret AuditLogAction = "CreateAuthSecret"
	AuditLogActionUpdateAuthSecret AuditLogAction = "UpdateAuthSecret"
	AuditLogActionDeleteAuthSecret AuditLogAction = "DeleteAuthSecret"

	AuditLogActionCreateSAMLIdentityProvider AuditLogAction = "CreateSAMLIdentityProvider"
	AuditLogActionUpdateSAMLIdentityProvider AuditLogAction = "UpdateSAMLIdentityProvider"

	AuditLogActionCreateOIDCIdentityProvider AuditLogAction = "CreateOIDCIdentityProvider"
	AuditLogActionUpdateOIDCIdentityProvider AuditLogAction = "UpdateOIDCIdentityProvider"

	AuditLogActionCreateSSOIdentityProvider AuditLogAction = "CreateSSOIdentityProvider"
	AuditLogActionUpdateSSOIdentityProvider AuditLogAction = "UpdateSSOIdentityProvider"
	AuditLogActionDeleteSSOIdentityProvider AuditLogAction = "DeleteSSOIdentityProvider"

	AuditLogActionAcceptRisk   AuditLogAction = "AcceptRisk"
	AuditLogActionUnacceptRisk AuditLogAction = "UnacceptRisk"

	AuditLogActionExportRelationshipRisks AuditLogAction = "ExportRelationshipRisks"
	AuditLogActionExportListRisks         AuditLogAction = "ExportListRisks"
	AuditLogActionExportAllRisks          AuditLogAction = "ExportAllRisks"

	AuditLogActionDeleteBloodhoundData AuditLogAction = "DeleteBloodhoundData"

	AuditLogActionMutateGraph AuditLogAction = "MutateGraph"

	AuditLogActionUpdateParameter AuditLogAction = "UpdateParameter"

	AuditLogActionCreateAssetGroupTag         AuditLogAction = "CreateAssetGroupTag"
	AuditLogActionUpdateAssetGroupTag         AuditLogAction = "UpdateAssetGroupTag"
	AuditLogActionDeleteAssetGroupTag         AuditLogAction = "DeleteAssetGroupTag"
	AuditLogActionCreateAssetGroupTagSelector AuditLogAction = "CreateAssetGroupTagSelector"
	AuditLogActionUpdateAssetGroupTagSelector AuditLogAction = "UpdateAssetGroupTagSelector"
	AuditLogActionDeleteAssetGroupTagSelector AuditLogAction = "DeleteAssetGroupTagSelector"

	AuditLogActionCreateCustomNodeKind AuditLogAction = "CreateCustomNodeKind"
	AuditLogActionUpdateCustomNodeKind AuditLogAction = "UpdateCustomNodeKind"
	AuditLogActionDeleteCustomNodeKind AuditLogAction = "DeleteCustomNodeKind"

	AuditLogActionToggleEarlyAccessFeatureFlag AuditLogAction = "ToggleEarlyAccessFeatureFlag"

	AuditLogActionCreateClient       AuditLogAction = "CreateClient"
	AuditLogActionReplaceClientToken AuditLogAction = "ReplaceClientToken"

	AuditLogActionImportSavedQuery   AuditLogAction = "ImportSavedQueries"
	AuditLogActionExportSavedQuery   AuditLogAction = "ExportSavedQuery"
	AuditLogActionExportSavedQueries AuditLogAction = "ExportSavedQueries"

	AuditLogActionUpdateETACList AuditLogAction = "UpdateETACList"
	AuditLogActionDeleteETACList AuditLogAction = "DeleteETACList"

	AuditLogActionCreateGraphSchemaExtension AuditLogAction = "CreateGraphSchemaExtension"
	AuditLogActionDeleteGraphSchemaExtension AuditLogAction = "DeleteGraphSchemaExtension"
)

type AuditLogEntryStatus

type AuditLogEntryStatus string
const (
	AuditLogStatusSuccess AuditLogEntryStatus = "success"
	AuditLogStatusFailure AuditLogEntryStatus = "failure"
	AuditLogStatusIntent  AuditLogEntryStatus = "intent"
)

type AuditLogs

type AuditLogs []AuditLog

func (AuditLogs) GetFilterableColumns

func (s AuditLogs) GetFilterableColumns() []string

func (AuditLogs) GetValidFilterPredicatesAsStrings

func (s AuditLogs) GetValidFilterPredicatesAsStrings(column string) ([]string, error)

func (AuditLogs) IsSortable

func (s AuditLogs) IsSortable(column string) bool

func (AuditLogs) IsString

func (s AuditLogs) IsString(column string) bool

func (AuditLogs) ValidFilters

func (s AuditLogs) ValidFilters() map[string][]FilterOperator

type Auditable

type Auditable interface {
	AuditData() AuditData
}

type AuditableURL

type AuditableURL string

func (AuditableURL) AuditData

func (s AuditableURL) AuditData() AuditData

type AuthSecret

type AuthSecret struct {
	UserID        uuid.UUID `json:"-"`
	Digest        string    `json:"-"`
	DigestMethod  string    `json:"digest_method"`
	ExpiresAt     time.Time `json:"expires_at"`
	TOTPSecret    string    `json:"-"`
	TOTPActivated bool      `json:"totp_activated"`

	Serial
}

func (AuthSecret) AuditData

func (s AuthSecret) AuditData() AuditData

func (AuthSecret) Expired

func (s AuthSecret) Expired() bool

Expired returns true if the auth secret has expired, false otherwise

type AuthToken

type AuthToken struct {
	UserID     uuid.NullUUID `json:"user_id" gorm:"type:text"`
	ClientID   uuid.NullUUID `json:"-"  gorm:"type:text"`
	Name       null.String   `json:"name"`
	Key        string        `json:"key,omitempty"`
	HmacMethod string        `json:"hmac_method"`
	LastAccess time.Time     `json:"last_access"`

	Unique
}

func (AuthToken) AuditData

func (s AuthToken) AuditData() AuditData

func (AuthToken) StripKey

func (s AuthToken) StripKey() AuthToken

type AuthTokens

type AuthTokens []AuthToken

func (AuthTokens) GetFilterableColumns

func (s AuthTokens) GetFilterableColumns() []string

func (AuthTokens) GetValidFilterPredicatesAsStrings

func (s AuthTokens) GetValidFilterPredicatesAsStrings(column string) ([]string, error)

func (AuthTokens) IDs

func (s AuthTokens) IDs() []uuid.UUID

func (AuthTokens) IsSortable

func (s AuthTokens) IsSortable(column string) bool

func (AuthTokens) IsString

func (s AuthTokens) IsString(column string) bool

func (AuthTokens) StripKeys

func (s AuthTokens) StripKeys() AuthTokens

func (AuthTokens) ValidFilters

func (s AuthTokens) ValidFilters() map[string][]FilterOperator

type AzureDataQualityAggregation

type AzureDataQualityAggregation struct {
	Serial
	AzureStatKinds
	RunID   string `json:"run_id" gorm:"index"`
	Tenants int    `json:"tenants"`
}

type AzureDataQualityAggregations

type AzureDataQualityAggregations []AzureDataQualityAggregation

type AzureDataQualityStat

type AzureDataQualityStat struct {
	Serial
	AzureStatKinds
	RunID    string `json:"run_id" gorm:"index"`
	TenantID string `json:"tenantid" gorm:"column:tenant_id"`
}

type AzureDataQualityStats

type AzureDataQualityStats []AzureDataQualityStat

func (AzureDataQualityStats) IsSortable

func (s AzureDataQualityStats) IsSortable(column string) bool

type AzureStatKinds

type AzureStatKinds struct {
	Relationships       int `json:"relationships"`
	Users               int `json:"users"`
	Groups              int `json:"groups"`
	Apps                int `json:"apps"`
	ServicePrincipals   int `json:"service_principals"`
	Devices             int `json:"devices"`
	ManagementGroups    int `json:"management_groups"`
	Subscriptions       int `json:"subscriptions"`
	ResourceGroups      int `json:"resource_groups"`
	VMs                 int `json:"vms"`
	KeyVaults           int `json:"key_vaults"`
	AutomationAccounts  int `json:"automation_accounts"`
	ContainerRegistries int `json:"container_registries"`
	FunctionApps        int `json:"function_apps"`
	LogicApps           int `json:"logic_apps"`
	ManagedClusters     int `json:"managed_clusters"`
	VMScaleSets         int `json:"vm_scale_sets"`
	WebApps             int `json:"web_apps"`
}

type BaseADEntity

type BaseADEntity struct {
	Name     string `json:"name,omitempty"`
	ObjectID string `json:"objectid" gorm:"primaryKey"`
	Exists   bool   `json:"exists,omitempty"`
}

type Basic

type Basic struct {
	CreatedAt time.Time    `json:"created_at"`
	UpdatedAt time.Time    `json:"updated_at"`
	DeletedAt sql.NullTime `json:"deleted_at" gorm:"-"`
}

Basic is a struct which includes the following basic fields: CreatedAt, UpdatedAt, DeletedAt.

type BigSerial

type BigSerial struct {
	ID int64 `json:"id" gorm:"primaryKey"`

	Basic
}

BigSerial is a struct that follows the same design principles as Serial but with one exception: the ID type is set to int64 to support an ID sequence limit of up to 9223372036854775807.

type CSVWriter

type CSVWriter interface {
	WriteCSV(writer io.Writer) error
}

type CompletedTask

type CompletedTask struct {
	IngestJobId    int64          `json:"ingest_job_id"`
	FileName       string         `json:"file_name"`
	ParentFileName string         `json:"parent_file_name"`
	Errors         pq.StringArray `json:"errors" gorm:"type:text[]"`
	Warnings       pq.StringArray `json:"warnings" gorm:"type:text[]"`

	BigSerial
}

type CustomNodeIcon

type CustomNodeIcon struct {
	Type  string `json:"type"`
	Name  string `json:"name"`
	Color string `json:"color"`
}

type CustomNodeKind

type CustomNodeKind struct {
	ID       int32                `json:"id"`
	KindName string               `json:"kindName"`
	Config   CustomNodeKindConfig `json:"config"`
}

func (CustomNodeKind) AuditData

func (s CustomNodeKind) AuditData() AuditData

type CustomNodeKindConfig

type CustomNodeKindConfig struct {
	Icon CustomNodeIcon `json:"icon"`
}

func (*CustomNodeKindConfig) Scan

func (s *CustomNodeKindConfig) Scan(value interface{}) error

func (CustomNodeKindConfig) Value

func (s CustomNodeKindConfig) Value() (driver.Value, error)

type CustomNodeKindMap

type CustomNodeKindMap map[string]CustomNodeKindConfig

type CustomNodeKinds

type CustomNodeKinds []CustomNodeKind

func (CustomNodeKinds) AuditData

func (s CustomNodeKinds) AuditData() AuditData

type DataType

type DataType int
const (
	DataTypeGraph DataType = 0
	DataTypeList  DataType = 1
	DataTypeCount DataType = 2
)

type DatapipeStatus

type DatapipeStatus string
const (
	DatapipeStatusIdle      DatapipeStatus = "idle"
	DatapipeStatusIngesting DatapipeStatus = "ingesting"
	DatapipeStatusAnalyzing DatapipeStatus = "analyzing"
	DatapipeStatusPurging   DatapipeStatus = "purging"
	DatapipeStatusPruning   DatapipeStatus = "pruning"
	DatapipeStatusStarting  DatapipeStatus = "starting"
)

func (DatapipeStatus) TableName

func (DatapipeStatus) TableName() string

type DatapipeStatusWrapper

type DatapipeStatusWrapper struct {
	Status                     DatapipeStatus `json:"status"`
	UpdatedAt                  time.Time      `json:"updated_at"`
	LastCompleteAnalysisAt     time.Time      `json:"last_complete_analysis_at"`
	LastScheduledAnalysisRunAt time.Time      `json:"last_analysis_run_at" gorm:"column:last_analysis_run_at"`
}

type DomainCacheEntry

type DomainCacheEntry struct {
	ID   graph.ID
	Name string
}

DomainCacheEntry is used to store necessary domain properties for hydration

type EdgeCompositionEdge

type EdgeCompositionEdge struct {
	PostProcessedEdgeID int64
	CompositionEdgeID   int64

	BigSerial
}

These structs were created for the new edge composition model, but are being saved for later use, since it doesn't work with our current post implementation

type EdgeCompositionEdges

type EdgeCompositionEdges []EdgeCompositionEdge

type EdgeCompositionNode

type EdgeCompositionNode struct {
	PostProcessedEdgeID int64
	CompositionNodeID   int64

	BigSerial
}

type EdgeCompositionNodes

type EdgeCompositionNodes []EdgeCompositionNode

type EnvironmentInput

type EnvironmentInput struct {
	EnvironmentKindName string
	SourceKindName      string
	PrincipalKinds      []string
}

type EnvironmentSelector

type EnvironmentSelector struct {
	Type               string    `json:"type"`
	Name               string    `json:"name"`
	ObjectID           string    `json:"id"`
	Collected          bool      `json:"collected"`
	ImpactValue        *int      `json:"impactValue,omitempty"`
	HygieneAttackPaths *int64    `json:"hygiene_attack_paths,omitempty"` // caution: if value is bigger than maxsafeint, the UI will truncate the value
	Exposures          Exposures `json:"exposures,omitempty"`
}

type EnvironmentSelectors

type EnvironmentSelectors []EnvironmentSelector

func (EnvironmentSelectors) GetFilterCriteria

func (s EnvironmentSelectors) GetFilterCriteria(request *http.Request, environmentKinds []graph.Kind) (graph.Criteria, error)

func (EnvironmentSelectors) GetFilterableColumns

func (s EnvironmentSelectors) GetFilterableColumns() []string

func (EnvironmentSelectors) GetValidFilterPredicatesAsStrings

func (s EnvironmentSelectors) GetValidFilterPredicatesAsStrings(column string) ([]string, error)

func (EnvironmentSelectors) IsSortable

func (s EnvironmentSelectors) IsSortable(column string) bool

func (EnvironmentSelectors) IsString

func (s EnvironmentSelectors) IsString(column string) bool

func (EnvironmentSelectors) ValidFilters

func (s EnvironmentSelectors) ValidFilters() map[string][]FilterOperator

type EnvironmentTargetedAccessControl

type EnvironmentTargetedAccessControl struct {
	UserID        string `json:"user_id"`
	EnvironmentID string `json:"environment_id"`
	BigSerial
}

EnvironmentTargetedAccessControl defines the model for a row in the environment_targeted_access_control table

func (EnvironmentTargetedAccessControl) TableName

type EnvironmentsInput

type EnvironmentsInput []EnvironmentInput

type Exposure

type Exposure struct {
	ExposurePercent int           `json:"exposure_percent"`
	AssetGroupTag   AssetGroupTag `json:"asset_group_tag"`
}

type Exposures

type Exposures []Exposure

type ExtensionInput

type ExtensionInput struct {
	Name        string
	DisplayName string
	Version     string
	Namespace   string // the required extension prefix for node and edge kind names
}

type FileType

type FileType int
const (
	FileTypeJson FileType = iota
	FileTypeZip
)

type Filter

type Filter struct {
	Operator    FilterOperator
	Value       string
	SetOperator FilterSetOperator
}

type FilterOperator

type FilterOperator string

func ParseFilterOperator

func ParseFilterOperator(raw string) (FilterOperator, error)

type FilterSetOperator

type FilterSetOperator string
const (
	FilterAnd FilterSetOperator = "AND"
	FilterOr  FilterSetOperator = "OR"
)

type Filtered

type Filtered interface {
	ValidFilters() map[string][]FilterOperator
}

type Filters

type Filters map[string][]Filter

type GraphExtensionInput

type GraphExtensionInput struct {
	ExtensionInput            ExtensionInput
	PropertiesInput           PropertiesInput
	RelationshipKindsInput    RelationshipsInput
	NodeKindsInput            NodesInput
	EnvironmentsInput         EnvironmentsInput
	RelationshipFindingsInput RelationshipFindingsInput
}

type GraphMigration

type GraphMigration struct {
	Major int64
	Minor int64
	Patch int64
}

func (GraphMigration) Version

func (s GraphMigration) Version() version.Version

type GraphSchemaExtension

type GraphSchemaExtension struct {
	Serial

	Name        string
	DisplayName string
	Version     string
	IsBuiltin   bool
	Namespace   string
}

func (GraphSchemaExtension) AuditData

func (s GraphSchemaExtension) AuditData() AuditData

func (GraphSchemaExtension) TableName

func (GraphSchemaExtension) TableName() string

type GraphSchemaExtensions

type GraphSchemaExtensions []GraphSchemaExtension

type GraphSchemaNodeKind

type GraphSchemaNodeKind struct {
	Serial

	Name              string
	SchemaExtensionId int32  // indicates which extension this node kind belongs to
	DisplayName       string // can be different from name but usually isn't other than Base/Entity
	Description       string // human-readable description of the node kind
	IsDisplayKind     bool   // indicates if this kind should supersede others and be displayed
	Icon              string // font-awesome icon for the registered node kind
	IconColor         string // icon hex color
}

GraphSchemaNodeKind - represents a node kind for an extension

func (GraphSchemaNodeKind) TableName

func (GraphSchemaNodeKind) TableName() string

TableName - Retrieve table name

func (GraphSchemaNodeKind) ToKind

func (s GraphSchemaNodeKind) ToKind() graph.Kind

type GraphSchemaNodeKinds

type GraphSchemaNodeKinds []GraphSchemaNodeKind

GraphSchemaNodeKinds - slice of node kinds

type GraphSchemaProperties

type GraphSchemaProperties []GraphSchemaProperty

GraphSchemaProperties - slice of graph schema properties.

type GraphSchemaProperty

type GraphSchemaProperty struct {
	Serial

	SchemaExtensionId int32
	Name              string
	DisplayName       string
	DataType          string
	Description       string
}

GraphSchemaProperty - represents a property that an relationship or node kind can have. Grouped by schema extension.

func (GraphSchemaProperty) TableName

func (GraphSchemaProperty) TableName() string

type GraphSchemaRelationshipKind

type GraphSchemaRelationshipKind struct {
	Serial
	SchemaExtensionId int32 // indicates which extension this relationship kind belongs to
	Name              string
	Description       string
	IsTraversable     bool // indicates whether the relationship-kind is a traversable path
}

GraphSchemaRelationshipKind - represents an relationship kind for an extension

func (GraphSchemaRelationshipKind) IsStringColumn

func (GraphSchemaRelationshipKind) IsStringColumn(filter string) bool

func (GraphSchemaRelationshipKind) TableName

func (GraphSchemaRelationshipKind) TableName() string

func (GraphSchemaRelationshipKind) ToKind

func (GraphSchemaRelationshipKind) ValidFilters

func (GraphSchemaRelationshipKind) ValidFilters() map[string][]FilterOperator

type GraphSchemaRelationshipKindWithNamedSchema

type GraphSchemaRelationshipKindWithNamedSchema struct {
	ID            int32  `json:"id"`
	Name          string `json:"name"`
	Description   string `json:"description"`
	IsTraversable bool   `json:"is_traversable"`
	SchemaName    string `json:"schema_name"`
}

type GraphSchemaRelationshipKinds

type GraphSchemaRelationshipKinds []GraphSchemaRelationshipKind

GraphSchemaRelationshipKinds - slice of model.GraphSchemaRelationshipKind

type GraphSchemaRelationshipKindsWithNamedSchema

type GraphSchemaRelationshipKindsWithNamedSchema []GraphSchemaRelationshipKindWithNamedSchema

type IngestJob

type IngestJob struct {
	UserID             uuid.NullUUID `json:"user_id"`
	UserEmailAddress   null.String   `json:"user_email_address"`
	User               User          `json:"-"`
	Status             JobStatus     `json:"status"`
	StatusMessage      string        `json:"status_message"`
	StartTime          time.Time     `json:"start_time"`
	EndTime            time.Time     `json:"end_time"`
	LastIngest         time.Time     `json:"last_ingest"`
	TotalFiles         int           `json:"total_files"`
	FailedFiles        int           `json:"failed_files"`
	PartialFailedFiles int           `json:"partial_failed_files"`

	BigSerial
}

type IngestJobs

type IngestJobs []IngestJob

func (IngestJobs) GetFilterableColumns

func (s IngestJobs) GetFilterableColumns() []string

func (IngestJobs) GetValidFilterPredicatesAsStrings

func (s IngestJobs) GetValidFilterPredicatesAsStrings(column string) ([]string, error)

func (IngestJobs) IsSortable

func (s IngestJobs) IsSortable(column string) bool

func (IngestJobs) IsString

func (s IngestJobs) IsString(column string) bool

func (IngestJobs) ValidFilters

func (s IngestJobs) ValidFilters() map[string][]FilterOperator

type IngestTask

type IngestTask struct {
	StoredFileName   string     `json:"file_name"`
	OriginalFileName string     `json:"original_file_name"`
	RequestGUID      string     `json:"request_guid"`
	JobId            null.Int64 `json:"task_id" gorm:"column:task_id"`
	FileType         FileType   `json:"file_type"`

	BigSerial
}

type IngestTasks

type IngestTasks []IngestTask

type Installation

type Installation struct {
	Unique
}

type JobStatus

type JobStatus int
const (
	JobStatusInvalid           JobStatus = -1
	JobStatusReady             JobStatus = 0
	JobStatusRunning           JobStatus = 1
	JobStatusComplete          JobStatus = 2
	JobStatusCanceled          JobStatus = 3
	JobStatusTimedOut          JobStatus = 4
	JobStatusFailed            JobStatus = 5
	JobStatusIngesting         JobStatus = 6
	JobStatusAnalyzing         JobStatus = 7
	JobStatusPartiallyComplete JobStatus = 8
)

func GetVisibleJobStatuses

func GetVisibleJobStatuses() []JobStatus

func ParseJobStatus

func ParseJobStatus(jobStatusStr string) (JobStatus, error)

func (JobStatus) IsValidEndState

func (s JobStatus) IsValidEndState() error

func (JobStatus) String

func (s JobStatus) String() string

type Kind

type Kind struct {
	ID   int32  `json:"id"`
	Name string `json:"name"`
}

type LegacyADOU

type LegacyADOU struct {
	BaseADEntity
	DistinguishedName string `json:"dn"`
	Type              string `json:"type"`
}

type Migration

type Migration struct {
	ID        int32 `gorm:"primaryKey"`
	UpdatedAt time.Time
	Major     int32
	Minor     int32
	Patch     int32
}

func NewMigration

func NewMigration(target version.Version) Migration

func (Migration) Version

func (s Migration) Version() version.Version

type NodeInput

type NodeInput struct {
	Name          string
	DisplayName   string // human-readable name
	Description   string // human-readable description of the node kind
	IsDisplayKind bool   // indicates if this kind should supersede others and be displayed
	Icon          string // font-awesome icon for the registered node kind
	IconColor     string // icon hex color
}

type NodesInput

type NodesInput []NodeInput

type OIDCProvider

type OIDCProvider struct {
	ClientID      string `json:"client_id"`
	Issuer        string `json:"issuer"`
	SSOProviderID int    `json:"sso_provider_id"`

	Serial
}

OIDCProvider contains the data needed to initiate an OIDC secure login flow

func (OIDCProvider) AuditData

func (s OIDCProvider) AuditData() AuditData

func (OIDCProvider) TableName

func (OIDCProvider) TableName() string

type OUCacheEntry

type OUCacheEntry struct {
	ID                graph.ID
	Name              string
	DistinguishedName string
}

OUCacheEntry is used to store necessary OU properties for hydration

type PagedNodeListEntry

type PagedNodeListEntry struct {
	ObjectID string   `json:"objectID"`
	Name     string   `json:"name"`
	Label    string   `json:"label"`
	Kinds    []string `json:"kinds"`
}

type PaginatedResponse

type PaginatedResponse struct {
	Count int `json:"count"`
	Limit int `json:"limit"`
	Skip  int `json:"skip"`
	Data  any `json:"data"`
}

PaginatedResponse has been DEPRECATED as part of V1. Please use api.ResponseWrapper instead

type Permission

type Permission struct {
	Authority string `json:"authority"`
	Name      string `json:"name"`

	Serial
}

func NewPermission

func NewPermission(authority, name string) Permission

func (Permission) Equals

func (s Permission) Equals(other Permission) bool

func (Permission) String

func (s Permission) String() string

func (Permission) URI

func (s Permission) URI() *url.URL

type Permissions

type Permissions []Permission

func (Permissions) Equals

func (s Permissions) Equals(others Permissions) bool

func (Permissions) GetFilterableColumns

func (s Permissions) GetFilterableColumns() []string

func (Permissions) GetValidFilterPredicatesAsStrings

func (s Permissions) GetValidFilterPredicatesAsStrings(column string) ([]string, error)

func (Permissions) Has

func (s Permissions) Has(other Permission) bool

func (Permissions) IsSortable

func (s Permissions) IsSortable(column string) bool

func (Permissions) IsString

func (s Permissions) IsString(column string) bool

func (Permissions) ValidFilters

func (s Permissions) ValidFilters() map[string][]FilterOperator

type PropertiesInput

type PropertiesInput []PropertyInput

type PropertyInput

type PropertyInput struct {
	Name        string
	DisplayName string
	DataType    string
	Description string
}

type QueryParameterFilter

type QueryParameterFilter struct {
	Name         string
	Operator     FilterOperator
	Value        string
	IsStringData bool
	SetOperator  FilterSetOperator
}

func (QueryParameterFilter) BuildGDBNodeFilter

func (s QueryParameterFilter) BuildGDBNodeFilter() graph.Criteria

type QueryParameterFilterMap

type QueryParameterFilterMap map[string]QueryParameterFilters

func (QueryParameterFilterMap) AddFilter

func (s QueryParameterFilterMap) AddFilter(filter QueryParameterFilter)

func (QueryParameterFilterMap) BuildAliasedSQLFilter

func (s QueryParameterFilterMap) BuildAliasedSQLFilter(tableAlias models.Optional[string]) (SQLFilter, error)

func (QueryParameterFilterMap) BuildGDBNodeFilter

func (s QueryParameterFilterMap) BuildGDBNodeFilter() graph.Criteria

func (QueryParameterFilterMap) BuildNeo4jFilter

func (s QueryParameterFilterMap) BuildNeo4jFilter() (string, error)

func (QueryParameterFilterMap) BuildSQLFilter

func (s QueryParameterFilterMap) BuildSQLFilter() (SQLFilter, error)

func (QueryParameterFilterMap) FirstFilter

func (QueryParameterFilterMap) IsFiltered

func (s QueryParameterFilterMap) IsFiltered(name string) bool

func (QueryParameterFilterMap) ToFiltersModel

func (s QueryParameterFilterMap) ToFiltersModel() Filters

ToFiltersModel converts the query parameter filter map model into the newer, more generic filter model. This is useful when accessing newer functions that expect the newer model without having refactor multiple sites all-at-once.

type QueryParameterFilterParser

type QueryParameterFilterParser struct {
	// contains filtered or unexported fields
}

func NewQueryParameterFilterParser

func NewQueryParameterFilterParser() QueryParameterFilterParser

func (QueryParameterFilterParser) ParseQueryParameterFilter

func (s QueryParameterFilterParser) ParseQueryParameterFilter(name, value string) (QueryParameterFilter, error)

func (QueryParameterFilterParser) ParseQueryParameterFilters

func (s QueryParameterFilterParser) ParseQueryParameterFilters(request *http.Request) (QueryParameterFilterMap, error)

type QueryParameterFilters

type QueryParameterFilters []QueryParameterFilter

type RelationshipFindingInput

type RelationshipFindingInput struct {
	Name                 string
	DisplayName          string
	SourceKindName       string
	RelationshipKindName string // edge kind
	EnvironmentKindName  string
	RemediationInput     RemediationInput
}

type RelationshipFindingsInput

type RelationshipFindingsInput []RelationshipFindingInput

type RelationshipInput

type RelationshipInput struct {
	Name          string
	Description   string
	IsTraversable bool // indicates whether the edge-kind is a traversable path
}

type RelationshipsInput

type RelationshipsInput []RelationshipInput

type Remediation

type Remediation struct {
	FindingID        int32
	DisplayName      string
	ShortDescription string
	LongDescription  string
	ShortRemediation string
	LongRemediation  string
}

func (Remediation) TableName

func (Remediation) TableName() string

type RemediationInput

type RemediationInput struct {
	ShortDescription string
	LongDescription  string
	ShortRemediation string
	LongRemediation  string
}

type Role

type Role struct {
	Name        string      `json:"name"`
	Description string      `json:"description"`
	Permissions Permissions `json:"permissions" gorm:"many2many:roles_permissions"`

	Serial
}

func (Role) AuditData

func (s Role) AuditData() AuditData

type Roles

type Roles []Role

func (Roles) FindByName

func (s Roles) FindByName(name string) (Role, bool)

func (Roles) FindByPermissions

func (s Roles) FindByPermissions(permissions Permissions) (Role, bool)

func (Roles) GetFilterableColumns

func (s Roles) GetFilterableColumns() []string

func (Roles) GetValidFilterPredicatesAsStrings

func (s Roles) GetValidFilterPredicatesAsStrings(column string) ([]string, error)

func (Roles) Has

func (s Roles) Has(other Role) bool

func (Roles) IDs

func (s Roles) IDs() []int32

func (Roles) IsSortable

func (s Roles) IsSortable(column string) bool

func (Roles) IsString

func (s Roles) IsString(column string) bool

func (Roles) Names

func (s Roles) Names() []string

func (Roles) Permissions

func (s Roles) Permissions() Permissions

func (Roles) RemoveByName

func (s Roles) RemoveByName(name string) Roles

func (Roles) ValidFilters

func (s Roles) ValidFilters() map[string][]FilterOperator

type SAMLProvider

type SAMLProvider struct {
	Name            string             `json:"name" gorm:"unique;index"`
	DisplayName     string             `json:"display_name"`
	IssuerURI       string             `json:"idp_issuer_uri"`
	SingleSignOnURI string             `json:"idp_sso_uri"`
	MetadataXML     []byte             `json:"-"`
	RootURIVersion  SAMLRootURIVersion `json:"root_uri_version"`

	// PrincipalAttributeMapping is an array of OID or XML Namespace element mapping strings that can be used to map a
	// SAML assertion to a user in the database.
	//
	// For example: ["http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress", "urn:oid:0.9.2342.19200300.100.1.3"]
	PrincipalAttributeMappings []string `json:"principal_attribute_mappings" gorm:"type:text[];column:ous"`

	// The below values generated values that point a client to SAML related resources hosted on the BloodHound instance
	// and should not be persisted to the database due to the fact that the URLs rely on the Host header that the user is
	// using to communicate to the API
	ServiceProviderIssuerURI     serde.URL `json:"sp_issuer_uri" gorm:"-"`
	ServiceProviderInitiationURI serde.URL `json:"sp_sso_uri" gorm:"-"`
	ServiceProviderMetadataURI   serde.URL `json:"sp_metadata_uri" gorm:"-"`
	ServiceProviderACSURI        serde.URL `json:"sp_acs_uri" gorm:"-"`

	SSOProviderID null.Int32 `json:"sso_provider_id"`

	Serial
}

func (SAMLProvider) AuditData

func (s SAMLProvider) AuditData() AuditData

func (*SAMLProvider) FormatSAMLProviderURLs

func (s *SAMLProvider) FormatSAMLProviderURLs(hostUrl url.URL)

func (SAMLProvider) GetSAMLUserGivenNameFromAssertion

func (s SAMLProvider) GetSAMLUserGivenNameFromAssertion(assertion *saml.Assertion) (string, error)

func (SAMLProvider) GetSAMLUserPrincipalNameFromAssertion

func (s SAMLProvider) GetSAMLUserPrincipalNameFromAssertion(assertion *saml.Assertion) (string, error)

func (SAMLProvider) GetSAMLUserRolesFromAssertion

func (s SAMLProvider) GetSAMLUserRolesFromAssertion(assertion *saml.Assertion) (roles []string)

GetSAMLUserRolesFromAssertion May be empty if not present

func (SAMLProvider) GetSAMLUserSurnameFromAssertion

func (s SAMLProvider) GetSAMLUserSurnameFromAssertion(assertion *saml.Assertion) (string, error)

func (SAMLProvider) TableName

func (SAMLProvider) TableName() string

type SAMLProviders

type SAMLProviders []SAMLProvider

type SAMLRootURIVersion

type SAMLRootURIVersion int

SAMLRootURIVersion is required for payloads to match the ACS / Callback url configured on IDPs While the DB column root_uri_version has a default of 2, it is also hardcoded in the db method CreateSAMLIdentityProvider

var (
	SAMLRootURIVersion1 SAMLRootURIVersion = 1
	SAMLRootURIVersion2 SAMLRootURIVersion = 2

	SAMLRootURIVersionMap = map[SAMLRootURIVersion]string{
		SAMLRootURIVersion1: "/api/v1/login/saml",
		SAMLRootURIVersion2: "/api/v2/sso",
	}
)

type SQLFilter

type SQLFilter struct {
	SQLString string
	Params    []any
}

func BuildSQLFilter

func BuildSQLFilter(filters Filters, tableAlias models.Optional[string]) (SQLFilter, error)

BuildSQLFilter builds a PGSQL syntax-correct SQLFilter result from the given Filters struct. This function uses the PGSQL AST to ensure formatted SQL correctness.

type SSOProvider

type SSOProvider struct {
	Type SessionAuthProvider `json:"type" gorm:"column:type"`
	Name string              `json:"name"`
	Slug string              `json:"slug"`

	OIDCProvider *OIDCProvider `json:"oidc_provider,omitempty" gorm:"foreignKey:SSOProviderID"`
	SAMLProvider *SAMLProvider `json:"saml_provider,omitempty" gorm:"foreignKey:SSOProviderID"`

	Config SSOProviderConfig `json:"config" gorm:"type:jsonb column:config"`

	Serial
}

SSOProvider is the common representation of an SSO provider that can be used to display high level information about that provider

func (SSOProvider) AuditData

func (s SSOProvider) AuditData() AuditData

AuditData returns the fields to log in the audit log

type SSOProviderAutoProvisionConfig

type SSOProviderAutoProvisionConfig struct {
	Enabled       bool  `json:"enabled"`
	DefaultRoleId int32 `json:"default_role_id"`
	RoleProvision bool  `json:"role_provision"`
}

type SSOProviderConfig

type SSOProviderConfig struct {
	AutoProvision SSOProviderAutoProvisionConfig `json:"auto_provision"`
}

func (*SSOProviderConfig) Scan

func (cfg *SSOProviderConfig) Scan(value interface{}) error

Implement the sql.Scanner interface so that GORM can scan the jsonb column from the database into a golang struct

func (SSOProviderConfig) Value

func (cfg SSOProviderConfig) Value() (driver.Value, error)

Value returns the json-marshaled value of the receiver

type SavedQueries

type SavedQueries []SavedQuery

func (SavedQueries) GetFilterableColumns

func (s SavedQueries) GetFilterableColumns() []string

func (SavedQueries) GetValidFilterPredicatesAsStrings

func (s SavedQueries) GetValidFilterPredicatesAsStrings(column string) ([]string, error)

func (SavedQueries) IsSortable

func (s SavedQueries) IsSortable(column string) bool

func (SavedQueries) IsString

func (s SavedQueries) IsString(column string) bool

func (SavedQueries) ValidFilters

func (s SavedQueries) ValidFilters() map[string][]FilterOperator

type SavedQueriesPermissions

type SavedQueriesPermissions struct {
	SharedToUserID uuid.NullUUID `json:"shared_to_user_id"`
	QueryID        int64         `json:"query_id"`
	Public         bool          `json:"public"`

	BigSerial
}

SavedQueriesPermissions represents the database model which allows users to share saved cypher queries

type SavedQuery

type SavedQuery struct {
	UserID      string `json:"user_id" gorm:"index:,unique,composite:compositeIndex"`
	Name        string `json:"name" gorm:"index:,unique,composite:compositeIndex"`
	Query       string `json:"query"`
	Description string `json:"description"`

	BigSerial
}

type SavedQueryScope

type SavedQueryScope string
const (
	SavedQueryScopeOwned  SavedQueryScope = "owned"
	SavedQueryScopeShared SavedQueryScope = "shared"
	SavedQueryScopePublic SavedQueryScope = "public"
	SavedQueryScopeAll    SavedQueryScope = "all"
)

type SchemaEnvironment

type SchemaEnvironment struct {
	Serial
	SchemaExtensionId          int32
	SchemaExtensionDisplayName string
	EnvironmentKindId          int32
	EnvironmentKindName        string
	SourceKindId               int32
}

func (SchemaEnvironment) TableName

func (SchemaEnvironment) TableName() string

type SchemaEnvironmentPrincipalKind

type SchemaEnvironmentPrincipalKind struct {
	EnvironmentId int32
	PrincipalKind int32
	CreatedAt     time.Time
}

func (SchemaEnvironmentPrincipalKind) TableName

type SchemaEnvironmentPrincipalKinds

type SchemaEnvironmentPrincipalKinds []SchemaEnvironmentPrincipalKind

type SchemaRelationshipFinding

type SchemaRelationshipFinding struct {
	ID                 int32
	SchemaExtensionId  int32
	RelationshipKindId int32
	EnvironmentId      int32
	Name               string
	DisplayName        string
	CreatedAt          time.Time
}

SchemaRelationshipFinding represents an individual finding (e.g., T0WriteOwner, T0ADCSESC1, T0DCSync)

func (SchemaRelationshipFinding) TableName

func (SchemaRelationshipFinding) TableName() string

type ScopedSavedQuery

type ScopedSavedQuery struct {
	SavedQuery
	Scope string `json:"scope"`
}

type SearchResult

type SearchResult struct {
	ObjectID          string `json:"objectid"`
	Type              string `json:"type"`
	Name              string `json:"name"`
	DistinguishedName string `json:"distinguishedname"`
	SystemTags        string `json:"system_tags"`
}

type SelectorAutoCertifyMethod

type SelectorAutoCertifyMethod int
const (
	SelectorAutoCertifyMethodDisabled   SelectorAutoCertifyMethod = 0
	SelectorAutoCertifyMethodAllMembers SelectorAutoCertifyMethod = 1
	SelectorAutoCertifyMethodSeedsOnly  SelectorAutoCertifyMethod = 2
)

type SelectorSeed

type SelectorSeed struct {
	SelectorId int          `json:"-"`
	Type       SelectorType `json:"type"`
	Value      string       `json:"value"`
}

func (SelectorSeed) AuditData

func (s SelectorSeed) AuditData() AuditData

func (SelectorSeed) TableName

func (SelectorSeed) TableName() string

func (SelectorSeed) ValidFilters

func (s SelectorSeed) ValidFilters() map[string][]FilterOperator

type SelectorSeeds

type SelectorSeeds []SelectorSeed

type SelectorType

type SelectorType int
const (
	SelectorTypeObjectId SelectorType = 1
	SelectorTypeCypher   SelectorType = 2
)

type Serial

type Serial struct {
	ID int32 `json:"id" gorm:"primaryKey"`

	Basic
}

Serial is a struct which includes the following basic fields: ID, CreatedAt, UpdatedAt, DeletedAt. This was chosen over the default gorm model so that ID retains the bare int type. We do this because uint has no meaning with regards to the underlying database storage engine - at least where postgresql is concerned. To avoid type gnashing and unexpected pain with sql.NullInt32 the bare int type is a better choice all around.

See: https://www.postgresql.org/docs/current/datatype-numeric.html

type SessionAuthProvider

type SessionAuthProvider int
const (
	SessionAuthProviderSecret SessionAuthProvider = 0
	SessionAuthProviderSAML   SessionAuthProvider = 1
	SessionAuthProviderOIDC   SessionAuthProvider = 2
)

func (SessionAuthProvider) String

func (s SessionAuthProvider) String() string

type SessionFlagKey

type SessionFlagKey string
const (
	SessionFlagFedEULAAccepted SessionFlagKey = "fed_eula_accepted" // INFO: The FedEULA is only applicable to select enterprise installations
)

type Sort

type Sort []SortItem

type SortDirection

type SortDirection int
const (
	InvalidSortDirection SortDirection = iota
	AscendingSortDirection
	DescendingSortDirection
)

type SortItem

type SortItem struct {
	Direction SortDirection
	Column    string
}

type UnifiedEdge

type UnifiedEdge struct {
	Source     string         `json:"source"`
	Target     string         `json:"target"`
	Label      string         `json:"label"`
	Kind       string         `json:"kind"`
	LastSeen   time.Time      `json:"lastSeen"`
	Properties map[string]any `json:"properties,omitempty"`
}

UnifiedEdge represents a single path segment in a graph containing a minimal set of attributes for graph rendering

type UnifiedGraph

type UnifiedGraph struct {
	Nodes    map[string]UnifiedNode `json:"nodes"`
	Edges    []UnifiedEdge          `json:"edges"`
	Literals graph.Literals         `json:"literals"`
}

UnifiedGraph represents a single, generic and minimalistic graph

func NewUnifiedGraph

func NewUnifiedGraph() UnifiedGraph

NewUnifiedGraph returns a new UnifiedGraph struct with the Nodes field initialized to an empty map

func (*UnifiedGraph) AddNode

func (s *UnifiedGraph) AddNode(node *graph.Node, includeProperties bool)

func (*UnifiedGraph) AddPathSet

func (s *UnifiedGraph) AddPathSet(paths graph.PathSet, includeProperties bool)

func (*UnifiedGraph) AddRelationship

func (s *UnifiedGraph) AddRelationship(rel *graph.Relationship, includeProperties bool)

type UnifiedGraphWPropertyKeys

type UnifiedGraphWPropertyKeys struct {
	NodeKeys []string               `json:"node_keys,omitempty"`
	EdgeKeys []string               `json:"edge_keys,omitempty"`
	Edges    []UnifiedEdge          `json:"edges"`
	Nodes    map[string]UnifiedNode `json:"nodes"`
	Literals graph.Literals         `json:"literals"`
}

UnifiedGraphWPropertyKeys

type UnifiedNode

type UnifiedNode struct {
	Label         string         `json:"label"`
	Kind          string         `json:"kind"`
	Kinds         []string       `json:"kinds"`
	ObjectId      string         `json:"objectId"`
	IsTierZero    bool           `json:"isTierZero"`
	IsOwnedObject bool           `json:"isOwnedObject"`
	LastSeen      time.Time      `json:"lastSeen"`
	Properties    map[string]any `json:"properties,omitempty"`
	Hidden        bool           `json:"hidden,omitempty"`
}

UnifiedNode represents a single node in a graph containing a minimal set of attributes for graph rendering

func FromDAWGSNode

func FromDAWGSNode(node *graph.Node, includeProperties bool) UnifiedNode

type Unique

type Unique struct {
	ID uuid.UUID `json:"id" gorm:"primaryKey"`

	Basic
}

Unique is a struct is a struct which includes the following basic fields: ID, CreatedAt, UpdatedAt, DeletedAt.

type UpdatedAssetGroupSelectors

type UpdatedAssetGroupSelectors struct {
	Added   AssetGroupSelectors `json:"added_selectors"`
	Removed AssetGroupSelectors `json:"removed_selectors"`
}

type User

type User struct {
	SSOProvider                      *SSOProvider                       `json:"-" `
	SSOProviderID                    null.Int32                         `json:"sso_provider_id,omitempty"`
	AuthSecret                       *AuthSecret                        `gorm:"constraint:OnDelete:CASCADE;"`
	AuthTokens                       AuthTokens                         `json:"-" gorm:"constraint:OnDelete:CASCADE;"`
	Roles                            Roles                              `json:"roles" gorm:"many2many:users_roles"`
	FirstName                        null.String                        `json:"first_name"`
	LastName                         null.String                        `json:"last_name"`
	EmailAddress                     null.String                        `json:"email_address"`
	PrincipalName                    string                             `json:"principal_name" gorm:"unique;index"`
	LastLogin                        time.Time                          `json:"last_login"`
	IsDisabled                       bool                               `json:"is_disabled"`
	AllEnvironments                  bool                               `json:"all_environments"`
	EnvironmentTargetedAccessControl []EnvironmentTargetedAccessControl `json:"environment_targeted_access_control"`

	// EULA Acceptance does not pertain to Bloodhound Community Edition; this flag is used for Bloodhound Enterprise users.
	// This value is automatically set to true for Bloodhound Community Edition in the patchEULAAcceptance and CreateUser functions.
	EULAAccepted bool `json:"eula_accepted"`

	Unique
}

func (*User) AuditData

func (s *User) AuditData() AuditData

func (*User) RemoveRole

func (s *User) RemoveRole(role Role)

func (*User) SSOProviderHasRoleProvisionEnabled

func (s *User) SSOProviderHasRoleProvisionEnabled() bool

type UserSession

type UserSession struct {
	User             User `gorm:"constraint:OnDelete:CASCADE;"`
	UserID           uuid.UUID
	AuthProviderType SessionAuthProvider
	AuthProviderID   int32 // If SSO Session, this will be the child saml or oidc provider id
	ExpiresAt        time.Time
	Flags            types.JSONBBoolObject `json:"flags"`

	BigSerial
}

func (UserSession) Expired

func (s UserSession) Expired() bool

Expired returns true if the user session has expired, false otherwise

func (UserSession) GetFlag

func (s UserSession) GetFlag(key SessionFlagKey) bool

corresponding set function is cmd/api/src/database/auth.go:SetUserSessionFlag()

type Users

type Users []User

func (Users) GetFilterableColumns

func (s Users) GetFilterableColumns() []string

func (Users) GetValidFilterPredicatesAsStrings

func (s Users) GetValidFilterPredicatesAsStrings(column string) ([]string, error)

func (Users) IsSortable

func (s Users) IsSortable(column string) bool

func (Users) IsString

func (s Users) IsString(column string) bool

func (Users) ValidFilters

func (s Users) ValidFilters() map[string][]FilterOperator

type ValidFilters

type ValidFilters map[string][]FilterOperator

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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