api

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AlertEventAttributesMap = map[string]elemental.AttributeSpecification{
	"AlertDefinition": {
		AllowedChoices: []string{},
		ConvertedName:  "AlertDefinition",
		Description:    `The name of the alert definition that triggered the alert event.`,
		Exposed:        true,
		Name:           "alertDefinition",
		Required:       true,
		Type:           "string",
	},
	"AlertDefinitionNamespace": {
		AllowedChoices: []string{},
		ConvertedName:  "AlertDefinitionNamespace",
		Description:    `The namespace of the alert definition.`,
		Exposed:        true,
		Name:           "alertDefinitionNamespace",
		Type:           "string",
	},
	"Principal": {
		AllowedChoices: []string{},
		BSONFieldName:  "principal",
		ConvertedName:  "Principal",
		Description:    `The principal of the object.`,
		Exposed:        true,
		Name:           "principal",
		Required:       true,
		Stored:         true,
		SubType:        "principal",
		Type:           "ref",
	},
	"Provider": {
		AllowedChoices: []string{},
		ConvertedName:  "Provider",
		Description:    `The provider used that the alert came from.`,
		Exposed:        true,
		Name:           "provider",
		Type:           "string",
	},
	"Timestamp": {
		AllowedChoices: []string{},
		Autogenerated:  true,
		ConvertedName:  "Timestamp",
		Description:    `When the alert event was raised.`,
		Exposed:        true,
		Name:           "timestamp",
		ReadOnly:       true,
		Type:           "time",
	},
}

AlertEventAttributesMap represents the map of attribute for AlertEvent.

View Source
var AlertEventLowerCaseAttributesMap = map[string]elemental.AttributeSpecification{
	"alertdefinition": {
		AllowedChoices: []string{},
		ConvertedName:  "AlertDefinition",
		Description:    `The name of the alert definition that triggered the alert event.`,
		Exposed:        true,
		Name:           "alertDefinition",
		Required:       true,
		Type:           "string",
	},
	"alertdefinitionnamespace": {
		AllowedChoices: []string{},
		ConvertedName:  "AlertDefinitionNamespace",
		Description:    `The namespace of the alert definition.`,
		Exposed:        true,
		Name:           "alertDefinitionNamespace",
		Type:           "string",
	},
	"principal": {
		AllowedChoices: []string{},
		BSONFieldName:  "principal",
		ConvertedName:  "Principal",
		Description:    `The principal of the object.`,
		Exposed:        true,
		Name:           "principal",
		Required:       true,
		Stored:         true,
		SubType:        "principal",
		Type:           "ref",
	},
	"provider": {
		AllowedChoices: []string{},
		ConvertedName:  "Provider",
		Description:    `The provider used that the alert came from.`,
		Exposed:        true,
		Name:           "provider",
		Type:           "string",
	},
	"timestamp": {
		AllowedChoices: []string{},
		Autogenerated:  true,
		ConvertedName:  "Timestamp",
		Description:    `When the alert event was raised.`,
		Exposed:        true,
		Name:           "timestamp",
		ReadOnly:       true,
		Type:           "time",
	},
}

AlertEventLowerCaseAttributesMap represents the map of attribute for AlertEvent.

View Source
var AnalyzerAttributesMap = map[string]elemental.AttributeSpecification{
	"ID": {
		AllowedChoices: []string{},
		Autogenerated:  true,
		BSONFieldName:  "_id",
		ConvertedName:  "ID",
		Description:    `ID is the identifier of the object.`,
		Exposed:        true,
		Filterable:     true,
		Identifier:     true,
		Name:           "ID",
		Orderable:      true,
		ReadOnly:       true,
		Stored:         true,
		Type:           "string",
	},
	"Description": {
		AllowedChoices: []string{},
		ConvertedName:  "Description",
		Description:    `The description of the analyzer.`,
		Exposed:        true,
		Name:           "description",
		Type:           "string",
	},
	"Detectors": {
		AllowedChoices: []string{},
		ConvertedName:  "Detectors",
		Description:    `The detectors the analyzer can use.`,
		Exposed:        true,
		Name:           "detectors",
		SubType:        "detector",
		Type:           "refList",
	},
	"Enabled": {
		AllowedChoices: []string{},
		ConvertedName:  "Enabled",
		Description:    `Tell if the analyzer is enabled by default.`,
		Exposed:        true,
		Name:           "enabled",
		Type:           "boolean",
	},
	"Group": {
		AllowedChoices: []string{},
		ConvertedName:  "Group",
		Description:    `The group the analyzer belongs to.`,
		Exposed:        true,
		Name:           "group",
		Type:           "string",
	},
	"Models": {
		AllowedChoices: []string{},
		ConvertedName:  "Models",
		Description:    `The models used by the analyzer.`,
		Exposed:        true,
		Name:           "models",
		SubType:        "analyzermodel",
		Type:           "refList",
	},
	"Name": {
		AllowedChoices: []string{},
		ConvertedName:  "Name",
		Description:    `The name of the analyzer.`,
		Exposed:        true,
		Name:           "name",
		Type:           "string",
	},
	"Namespace": {
		AllowedChoices: []string{},
		Autogenerated:  true,
		BSONFieldName:  "namespace",
		ConvertedName:  "Namespace",
		Description:    `The namespace of the object.`,
		Exposed:        true,
		Getter:         true,
		Name:           "namespace",
		Orderable:      true,
		ReadOnly:       true,
		Setter:         true,
		Stored:         true,
		Type:           "string",
	},
	"Triggers": {
		AllowedChoices: []string{},
		ConvertedName:  "Triggers",
		Description: `A list of trigger or globl pattern that the analyzer will react on.
A trigger is the detector Group and Name separated with a /.`,
		Exposed: true,
		Name:    "triggers",
		SubType: "string",
		Type:    "list",
	},
}

AnalyzerAttributesMap represents the map of attribute for Analyzer.

View Source
var AnalyzerIdentity = elemental.Identity{
	Name:     "analyzer",
	Category: "analyzers",
	Package:  "proxy",
	Private:  false,
}

AnalyzerIdentity represents the Identity of the object.

View Source
var AnalyzerLowerCaseAttributesMap = map[string]elemental.AttributeSpecification{
	"id": {
		AllowedChoices: []string{},
		Autogenerated:  true,
		BSONFieldName:  "_id",
		ConvertedName:  "ID",
		Description:    `ID is the identifier of the object.`,
		Exposed:        true,
		Filterable:     true,
		Identifier:     true,
		Name:           "ID",
		Orderable:      true,
		ReadOnly:       true,
		Stored:         true,
		Type:           "string",
	},
	"description": {
		AllowedChoices: []string{},
		ConvertedName:  "Description",
		Description:    `The description of the analyzer.`,
		Exposed:        true,
		Name:           "description",
		Type:           "string",
	},
	"detectors": {
		AllowedChoices: []string{},
		ConvertedName:  "Detectors",
		Description:    `The detectors the analyzer can use.`,
		Exposed:        true,
		Name:           "detectors",
		SubType:        "detector",
		Type:           "refList",
	},
	"enabled": {
		AllowedChoices: []string{},
		ConvertedName:  "Enabled",
		Description:    `Tell if the analyzer is enabled by default.`,
		Exposed:        true,
		Name:           "enabled",
		Type:           "boolean",
	},
	"group": {
		AllowedChoices: []string{},
		ConvertedName:  "Group",
		Description:    `The group the analyzer belongs to.`,
		Exposed:        true,
		Name:           "group",
		Type:           "string",
	},
	"models": {
		AllowedChoices: []string{},
		ConvertedName:  "Models",
		Description:    `The models used by the analyzer.`,
		Exposed:        true,
		Name:           "models",
		SubType:        "analyzermodel",
		Type:           "refList",
	},
	"name": {
		AllowedChoices: []string{},
		ConvertedName:  "Name",
		Description:    `The name of the analyzer.`,
		Exposed:        true,
		Name:           "name",
		Type:           "string",
	},
	"namespace": {
		AllowedChoices: []string{},
		Autogenerated:  true,
		BSONFieldName:  "namespace",
		ConvertedName:  "Namespace",
		Description:    `The namespace of the object.`,
		Exposed:        true,
		Getter:         true,
		Name:           "namespace",
		Orderable:      true,
		ReadOnly:       true,
		Setter:         true,
		Stored:         true,
		Type:           "string",
	},
	"triggers": {
		AllowedChoices: []string{},
		ConvertedName:  "Triggers",
		Description: `A list of trigger or globl pattern that the analyzer will react on.
A trigger is the detector Group and Name separated with a /.`,
		Exposed: true,
		Name:    "triggers",
		SubType: "string",
		Type:    "list",
	},
}

AnalyzerLowerCaseAttributesMap represents the map of attribute for Analyzer.

View Source
var AnalyzerModelAttributesMap = map[string]elemental.AttributeSpecification{
	"Name": {
		AllowedChoices: []string{},
		ConvertedName:  "Name",
		Description:    `The name of the model.`,
		Exposed:        true,
		Name:           "name",
		Type:           "string",
	},
	"Revision": {
		AllowedChoices: []string{},
		ConvertedName:  "Revision",
		Description:    `The revision of the model.`,
		Exposed:        true,
		Name:           "revision",
		Type:           "string",
	},
}

AnalyzerModelAttributesMap represents the map of attribute for AnalyzerModel.

View Source
var AnalyzerModelLowerCaseAttributesMap = map[string]elemental.AttributeSpecification{
	"name": {
		AllowedChoices: []string{},
		ConvertedName:  "Name",
		Description:    `The name of the model.`,
		Exposed:        true,
		Name:           "name",
		Type:           "string",
	},
	"revision": {
		AllowedChoices: []string{},
		ConvertedName:  "Revision",
		Description:    `The revision of the model.`,
		Exposed:        true,
		Name:           "revision",
		Type:           "string",
	},
}

AnalyzerModelLowerCaseAttributesMap represents the map of attribute for AnalyzerModel.

View Source
var DetectorAttributesMap = map[string]elemental.AttributeSpecification{
	"Description": {
		AllowedChoices: []string{},
		ConvertedName:  "Description",
		Description:    `The description of the detection.`,
		Exposed:        true,
		Name:           "description",
		Type:           "string",
	},
	"Group": {
		AllowedChoices: []string{},
		ConvertedName:  "Group",
		Description:    `The group the detection belongs to.`,
		Exposed:        true,
		Name:           "group",
		Type:           "string",
	},
	"Label": {
		AllowedChoices: []string{},
		ConvertedName:  "Label",
		Description:    `The label returned by the model.`,
		Exposed:        true,
		Name:           "label",
		Type:           "string",
	},
	"Name": {
		AllowedChoices: []string{},
		ConvertedName:  "Name",
		Description:    `The name of the detection.`,
		Exposed:        true,
		Name:           "name",
		Type:           "string",
	},
	"Positional": {
		AllowedChoices: []string{},
		ConvertedName:  "Positional",
		Description:    `Tell if the detection is positional.`,
		Exposed:        true,
		Name:           "positional",
		Type:           "boolean",
	},
}

DetectorAttributesMap represents the map of attribute for Detector.

View Source
var DetectorLowerCaseAttributesMap = map[string]elemental.AttributeSpecification{
	"description": {
		AllowedChoices: []string{},
		ConvertedName:  "Description",
		Description:    `The description of the detection.`,
		Exposed:        true,
		Name:           "description",
		Type:           "string",
	},
	"group": {
		AllowedChoices: []string{},
		ConvertedName:  "Group",
		Description:    `The group the detection belongs to.`,
		Exposed:        true,
		Name:           "group",
		Type:           "string",
	},
	"label": {
		AllowedChoices: []string{},
		ConvertedName:  "Label",
		Description:    `The label returned by the model.`,
		Exposed:        true,
		Name:           "label",
		Type:           "string",
	},
	"name": {
		AllowedChoices: []string{},
		ConvertedName:  "Name",
		Description:    `The name of the detection.`,
		Exposed:        true,
		Name:           "name",
		Type:           "string",
	},
	"positional": {
		AllowedChoices: []string{},
		ConvertedName:  "Positional",
		Description:    `Tell if the detection is positional.`,
		Exposed:        true,
		Name:           "positional",
		Type:           "boolean",
	},
}

DetectorLowerCaseAttributesMap represents the map of attribute for Detector.

View Source
var ExtractionInformationAttributesMap = map[string]elemental.AttributeSpecification{
	"N": {
		AllowedChoices: []string{},
		ConvertedName:  "N",
		Description:    `The number of times it has been seen.`,
		Exposed:        true,
		Name:           "n",
		Type:           "integer",
	},
}

ExtractionInformationAttributesMap represents the map of attribute for ExtractionInformation.

View Source
var ExtractionInformationLowerCaseAttributesMap = map[string]elemental.AttributeSpecification{
	"n": {
		AllowedChoices: []string{},
		ConvertedName:  "N",
		Description:    `The number of times it has been seen.`,
		Exposed:        true,
		Name:           "n",
		Type:           "integer",
	},
}

ExtractionInformationLowerCaseAttributesMap represents the map of attribute for ExtractionInformation.

View Source
var ExtractionSummaryAttributesMap = map[string]elemental.AttributeSpecification{
	"PIIs": {
		AllowedChoices: []string{},
		BSONFieldName:  "piis",
		ConvertedName:  "PIIs",
		Description:    `The PIIs found during classification.`,
		Exposed:        true,
		Name:           "PIIs",
		Stored:         true,
		SubType:        "map[string]extractioninformation",
		Type:           "external",
	},
	"Categories": {
		AllowedChoices: []string{},
		BSONFieldName:  "categories",
		ConvertedName:  "Categories",
		Description:    `The categories are remapping of the modalities in a more human friendly way.`,
		Exposed:        true,
		Name:           "categories",
		Stored:         true,
		SubType:        "map[string]extractioninformation",
		Type:           "external",
	},
	"Exploits": {
		AllowedChoices: []string{},
		BSONFieldName:  "exploits",
		ConvertedName:  "Exploits",
		Description:    `The various exploits attempts.`,
		Exposed:        true,
		Name:           "exploits",
		Stored:         true,
		SubType:        "map[string]extractioninformation",
		Type:           "external",
	},
	"Intent": {
		AllowedChoices: []string{},
		BSONFieldName:  "intent",
		ConvertedName:  "Intent",
		Description:    `The estimated intent embodied into the text.`,
		Exposed:        true,
		Name:           "intent",
		Stored:         true,
		SubType:        "map[string]extractioninformation",
		Type:           "external",
	},
	"Keywords": {
		AllowedChoices: []string{},
		BSONFieldName:  "keywords",
		ConvertedName:  "Keywords",
		Description:    `The keywords found during classification.`,
		Exposed:        true,
		Name:           "keywords",
		Stored:         true,
		SubType:        "map[string]extractioninformation",
		Type:           "external",
	},
	"Languages": {
		AllowedChoices: []string{},
		BSONFieldName:  "languages",
		ConvertedName:  "Languages",
		Description:    `The language of the classification.`,
		Exposed:        true,
		Name:           "languages",
		Stored:         true,
		SubType:        "map[string]extractioninformation",
		Type:           "external",
	},
	"Modalities": {
		AllowedChoices: []string{},
		BSONFieldName:  "modalities",
		ConvertedName:  "Modalities",
		Description:    `The modalities of data detected in the data.`,
		Exposed:        true,
		Name:           "modalities",
		Stored:         true,
		SubType:        "map[string]extractioninformation",
		Type:           "external",
	},
	"Secrets": {
		AllowedChoices: []string{},
		BSONFieldName:  "secrets",
		ConvertedName:  "Secrets",
		Description:    `The secrets found during classification.`,
		Exposed:        true,
		Name:           "secrets",
		Stored:         true,
		SubType:        "map[string]extractioninformation",
		Type:           "external",
	},
	"Topics": {
		AllowedChoices: []string{},
		BSONFieldName:  "topics",
		ConvertedName:  "Topics",
		Description:    `The topic of the classification.`,
		Exposed:        true,
		Name:           "topics",
		Stored:         true,
		SubType:        "map[string]extractioninformation",
		Type:           "external",
	},
}

ExtractionSummaryAttributesMap represents the map of attribute for ExtractionSummary.

View Source
var ExtractionSummaryLowerCaseAttributesMap = map[string]elemental.AttributeSpecification{
	"piis": {
		AllowedChoices: []string{},
		BSONFieldName:  "piis",
		ConvertedName:  "PIIs",
		Description:    `The PIIs found during classification.`,
		Exposed:        true,
		Name:           "PIIs",
		Stored:         true,
		SubType:        "map[string]extractioninformation",
		Type:           "external",
	},
	"categories": {
		AllowedChoices: []string{},
		BSONFieldName:  "categories",
		ConvertedName:  "Categories",
		Description:    `The categories are remapping of the modalities in a more human friendly way.`,
		Exposed:        true,
		Name:           "categories",
		Stored:         true,
		SubType:        "map[string]extractioninformation",
		Type:           "external",
	},
	"exploits": {
		AllowedChoices: []string{},
		BSONFieldName:  "exploits",
		ConvertedName:  "Exploits",
		Description:    `The various exploits attempts.`,
		Exposed:        true,
		Name:           "exploits",
		Stored:         true,
		SubType:        "map[string]extractioninformation",
		Type:           "external",
	},
	"intent": {
		AllowedChoices: []string{},
		BSONFieldName:  "intent",
		ConvertedName:  "Intent",
		Description:    `The estimated intent embodied into the text.`,
		Exposed:        true,
		Name:           "intent",
		Stored:         true,
		SubType:        "map[string]extractioninformation",
		Type:           "external",
	},
	"keywords": {
		AllowedChoices: []string{},
		BSONFieldName:  "keywords",
		ConvertedName:  "Keywords",
		Description:    `The keywords found during classification.`,
		Exposed:        true,
		Name:           "keywords",
		Stored:         true,
		SubType:        "map[string]extractioninformation",
		Type:           "external",
	},
	"languages": {
		AllowedChoices: []string{},
		BSONFieldName:  "languages",
		ConvertedName:  "Languages",
		Description:    `The language of the classification.`,
		Exposed:        true,
		Name:           "languages",
		Stored:         true,
		SubType:        "map[string]extractioninformation",
		Type:           "external",
	},
	"modalities": {
		AllowedChoices: []string{},
		BSONFieldName:  "modalities",
		ConvertedName:  "Modalities",
		Description:    `The modalities of data detected in the data.`,
		Exposed:        true,
		Name:           "modalities",
		Stored:         true,
		SubType:        "map[string]extractioninformation",
		Type:           "external",
	},
	"secrets": {
		AllowedChoices: []string{},
		BSONFieldName:  "secrets",
		ConvertedName:  "Secrets",
		Description:    `The secrets found during classification.`,
		Exposed:        true,
		Name:           "secrets",
		Stored:         true,
		SubType:        "map[string]extractioninformation",
		Type:           "external",
	},
	"topics": {
		AllowedChoices: []string{},
		BSONFieldName:  "topics",
		ConvertedName:  "Topics",
		Description:    `The topic of the classification.`,
		Exposed:        true,
		Name:           "topics",
		Stored:         true,
		SubType:        "map[string]extractioninformation",
		Type:           "external",
	},
}

ExtractionSummaryLowerCaseAttributesMap represents the map of attribute for ExtractionSummary.

View Source
var LatencyAttributesMap = map[string]elemental.AttributeSpecification{
	"AccessPolicy": {
		AllowedChoices: []string{},
		BSONFieldName:  "accesspolicy",
		ConvertedName:  "AccessPolicy",
		Description:    `How much time it took to run the access policy in nanoseconds.`,
		Exposed:        true,
		Name:           "accessPolicy",
		Stored:         true,
		Type:           "integer",
	},
	"Analysis": {
		AllowedChoices: []string{},
		BSONFieldName:  "analysis",
		ConvertedName:  "Analysis",
		Description:    `How much time it took to run content analysis in nanoseconds.`,
		Exposed:        true,
		Name:           "analysis",
		Stored:         true,
		Type:           "integer",
	},
	"AssignPolicy": {
		AllowedChoices: []string{},
		BSONFieldName:  "assignpolicy",
		ConvertedName:  "AssignPolicy",
		Description:    `How much time it took to run the assign policy in nanoseconds.`,
		Exposed:        true,
		Name:           "assignPolicy",
		Stored:         true,
		Type:           "integer",
	},
	"ContentPolicy": {
		AllowedChoices: []string{},
		BSONFieldName:  "contentpolicy",
		ConvertedName:  "ContentPolicy",
		Description:    `How much time it took to run content policy in nanoseconds.`,
		Exposed:        true,
		Name:           "contentPolicy",
		Stored:         true,
		Type:           "integer",
	},
	"Extraction": {
		AllowedChoices: []string{},
		BSONFieldName:  "extraction",
		ConvertedName:  "Extraction",
		Description:    `How much time it took to run input or output extraction in nanoseconds.`,
		Exposed:        true,
		Name:           "extraction",
		Stored:         true,
		Type:           "integer",
	},
}

LatencyAttributesMap represents the map of attribute for Latency.

View Source
var LatencyIdentity = elemental.Identity{
	Name:     "latency",
	Category: "latencies",
	Package:  "lain",
	Private:  false,
}

LatencyIdentity represents the Identity of the object.

View Source
var LatencyLowerCaseAttributesMap = map[string]elemental.AttributeSpecification{
	"accesspolicy": {
		AllowedChoices: []string{},
		BSONFieldName:  "accesspolicy",
		ConvertedName:  "AccessPolicy",
		Description:    `How much time it took to run the access policy in nanoseconds.`,
		Exposed:        true,
		Name:           "accessPolicy",
		Stored:         true,
		Type:           "integer",
	},
	"analysis": {
		AllowedChoices: []string{},
		BSONFieldName:  "analysis",
		ConvertedName:  "Analysis",
		Description:    `How much time it took to run content analysis in nanoseconds.`,
		Exposed:        true,
		Name:           "analysis",
		Stored:         true,
		Type:           "integer",
	},
	"assignpolicy": {
		AllowedChoices: []string{},
		BSONFieldName:  "assignpolicy",
		ConvertedName:  "AssignPolicy",
		Description:    `How much time it took to run the assign policy in nanoseconds.`,
		Exposed:        true,
		Name:           "assignPolicy",
		Stored:         true,
		Type:           "integer",
	},
	"contentpolicy": {
		AllowedChoices: []string{},
		BSONFieldName:  "contentpolicy",
		ConvertedName:  "ContentPolicy",
		Description:    `How much time it took to run content policy in nanoseconds.`,
		Exposed:        true,
		Name:           "contentPolicy",
		Stored:         true,
		Type:           "integer",
	},
	"extraction": {
		AllowedChoices: []string{},
		BSONFieldName:  "extraction",
		ConvertedName:  "Extraction",
		Description:    `How much time it took to run input or output extraction in nanoseconds.`,
		Exposed:        true,
		Name:           "extraction",
		Stored:         true,
		Type:           "integer",
	},
}

LatencyLowerCaseAttributesMap represents the map of attribute for Latency.

View Source
var ModalityAttributesMap = map[string]elemental.AttributeSpecification{
	"Group": {
		AllowedChoices: []string{},
		BSONFieldName:  "group",
		ConvertedName:  "Group",
		Description:    `The group of data.`,
		Exposed:        true,
		Name:           "group",
		Required:       true,
		Stored:         true,
		Type:           "string",
	},
	"Type": {
		AllowedChoices: []string{},
		BSONFieldName:  "type",
		ConvertedName:  "Type",
		Description:    `The type of data.`,
		Exposed:        true,
		Name:           "type",
		Required:       true,
		Stored:         true,
		Type:           "string",
	},
}

ModalityAttributesMap represents the map of attribute for Modality.

View Source
var ModalityLowerCaseAttributesMap = map[string]elemental.AttributeSpecification{
	"group": {
		AllowedChoices: []string{},
		BSONFieldName:  "group",
		ConvertedName:  "Group",
		Description:    `The group of data.`,
		Exposed:        true,
		Name:           "group",
		Required:       true,
		Stored:         true,
		Type:           "string",
	},
	"type": {
		AllowedChoices: []string{},
		BSONFieldName:  "type",
		ConvertedName:  "Type",
		Description:    `The type of data.`,
		Exposed:        true,
		Name:           "type",
		Required:       true,
		Stored:         true,
		Type:           "string",
	},
}

ModalityLowerCaseAttributesMap represents the map of attribute for Modality.

View Source
var PrincipalAppAttributesMap = map[string]elemental.AttributeSpecification{
	"Labels": {
		AllowedChoices: []string{},
		BSONFieldName:  "labels",
		ConvertedName:  "Labels",
		Description:    `The list of labels attached to an application request.`,
		Exposed:        true,
		Name:           "labels",
		Stored:         true,
		SubType:        "string",
		Type:           "list",
	},
	"Name": {
		AllowedChoices: []string{},
		BSONFieldName:  "name",
		ConvertedName:  "Name",
		Description:    `The name of the application.`,
		Exposed:        true,
		Name:           "name",
		Stored:         true,
		Type:           "string",
	},
	"Tier": {
		AllowedChoices: []string{},
		BSONFieldName:  "tier",
		ConvertedName:  "Tier",
		Description:    `The tier of the application request.`,
		Exposed:        true,
		Name:           "tier",
		Stored:         true,
		Type:           "string",
	},
}

PrincipalAppAttributesMap represents the map of attribute for PrincipalApp.

View Source
var PrincipalAppIdentity = elemental.Identity{
	Name:     "principalapp",
	Category: "principalapps",
	Package:  "colektor",
	Private:  false,
}

PrincipalAppIdentity represents the Identity of the object.

View Source
var PrincipalAppLowerCaseAttributesMap = map[string]elemental.AttributeSpecification{
	"labels": {
		AllowedChoices: []string{},
		BSONFieldName:  "labels",
		ConvertedName:  "Labels",
		Description:    `The list of labels attached to an application request.`,
		Exposed:        true,
		Name:           "labels",
		Stored:         true,
		SubType:        "string",
		Type:           "list",
	},
	"name": {
		AllowedChoices: []string{},
		BSONFieldName:  "name",
		ConvertedName:  "Name",
		Description:    `The name of the application.`,
		Exposed:        true,
		Name:           "name",
		Stored:         true,
		Type:           "string",
	},
	"tier": {
		AllowedChoices: []string{},
		BSONFieldName:  "tier",
		ConvertedName:  "Tier",
		Description:    `The tier of the application request.`,
		Exposed:        true,
		Name:           "tier",
		Stored:         true,
		Type:           "string",
	},
}

PrincipalAppLowerCaseAttributesMap represents the map of attribute for PrincipalApp.

View Source
var PrincipalAttributesMap = map[string]elemental.AttributeSpecification{
	"App": {
		AllowedChoices: []string{},
		BSONFieldName:  "app",
		ConvertedName:  "App",
		Description:    `The application principal information if type is App.`,
		Exposed:        true,
		Name:           "app",
		Stored:         true,
		SubType:        "principalapp",
		Type:           "ref",
	},
	"AuthType": {
		AllowedChoices: []string{"Certificate", "UserToken", "AppToken", "Hostname", "Token", "TierToken", "External"},
		BSONFieldName:  "authtype",
		ConvertedName:  "AuthType",
		Description:    `The type of authentication.`,
		Exposed:        true,
		Name:           "authType",
		Stored:         true,
		Type:           "enum",
	},
	"Claims": {
		AllowedChoices: []string{},
		BSONFieldName:  "claims",
		ConvertedName:  "Claims",
		Description:    `List of claims extracted from the user query.`,
		Exposed:        true,
		Name:           "claims",
		Stored:         true,
		SubType:        "string",
		Type:           "list",
	},
	"Team": {
		AllowedChoices: []string{},
		BSONFieldName:  "team",
		ConvertedName:  "Team",
		Description:    `The team that was used to authorize the request.`,
		Exposed:        true,
		Name:           "team",
		Stored:         true,
		Type:           "string",
	},
	"TokenName": {
		AllowedChoices: []string{},
		BSONFieldName:  "tokenname",
		ConvertedName:  "TokenName",
		Description:    `The name of the token, if any.`,
		Exposed:        true,
		Name:           "tokenName",
		Stored:         true,
		Type:           "string",
	},
	"Type": {
		AllowedChoices: []string{"User", "App"},
		BSONFieldName:  "type",
		ConvertedName:  "Type",
		Description:    `The type of principal.`,
		Exposed:        true,
		Name:           "type",
		Required:       true,
		Stored:         true,
		Type:           "enum",
	},
	"User": {
		AllowedChoices: []string{},
		BSONFieldName:  "user",
		ConvertedName:  "User",
		Description:    `The user principal information if type is User.`,
		Exposed:        true,
		Name:           "user",
		Stored:         true,
		SubType:        "principaluser",
		Type:           "ref",
	},
}

PrincipalAttributesMap represents the map of attribute for Principal.

View Source
var PrincipalIdentity = elemental.Identity{
	Name:     "principal",
	Category: "principals",
	Package:  "colektor",
	Private:  false,
}

PrincipalIdentity represents the Identity of the object.

View Source
var PrincipalLowerCaseAttributesMap = map[string]elemental.AttributeSpecification{
	"app": {
		AllowedChoices: []string{},
		BSONFieldName:  "app",
		ConvertedName:  "App",
		Description:    `The application principal information if type is App.`,
		Exposed:        true,
		Name:           "app",
		Stored:         true,
		SubType:        "principalapp",
		Type:           "ref",
	},
	"authtype": {
		AllowedChoices: []string{"Certificate", "UserToken", "AppToken", "Hostname", "Token", "TierToken", "External"},
		BSONFieldName:  "authtype",
		ConvertedName:  "AuthType",
		Description:    `The type of authentication.`,
		Exposed:        true,
		Name:           "authType",
		Stored:         true,
		Type:           "enum",
	},
	"claims": {
		AllowedChoices: []string{},
		BSONFieldName:  "claims",
		ConvertedName:  "Claims",
		Description:    `List of claims extracted from the user query.`,
		Exposed:        true,
		Name:           "claims",
		Stored:         true,
		SubType:        "string",
		Type:           "list",
	},
	"team": {
		AllowedChoices: []string{},
		BSONFieldName:  "team",
		ConvertedName:  "Team",
		Description:    `The team that was used to authorize the request.`,
		Exposed:        true,
		Name:           "team",
		Stored:         true,
		Type:           "string",
	},
	"tokenname": {
		AllowedChoices: []string{},
		BSONFieldName:  "tokenname",
		ConvertedName:  "TokenName",
		Description:    `The name of the token, if any.`,
		Exposed:        true,
		Name:           "tokenName",
		Stored:         true,
		Type:           "string",
	},
	"type": {
		AllowedChoices: []string{"User", "App"},
		BSONFieldName:  "type",
		ConvertedName:  "Type",
		Description:    `The type of principal.`,
		Exposed:        true,
		Name:           "type",
		Required:       true,
		Stored:         true,
		Type:           "enum",
	},
	"user": {
		AllowedChoices: []string{},
		BSONFieldName:  "user",
		ConvertedName:  "User",
		Description:    `The user principal information if type is User.`,
		Exposed:        true,
		Name:           "user",
		Stored:         true,
		SubType:        "principaluser",
		Type:           "ref",
	},
}

PrincipalLowerCaseAttributesMap represents the map of attribute for Principal.

View Source
var PrincipalUserAttributesMap = map[string]elemental.AttributeSpecification{
	"Name": {
		AllowedChoices: []string{},
		BSONFieldName:  "name",
		ConvertedName:  "Name",
		Description:    `Identification bit that will be used to identify the origin of the request.`,
		Exposed:        true,
		Name:           "name",
		Stored:         true,
		Type:           "string",
	},
}

PrincipalUserAttributesMap represents the map of attribute for PrincipalUser.

View Source
var PrincipalUserIdentity = elemental.Identity{
	Name:     "principaluser",
	Category: "principalusers",
	Package:  "colektor",
	Private:  false,
}

PrincipalUserIdentity represents the Identity of the object.

View Source
var PrincipalUserLowerCaseAttributesMap = map[string]elemental.AttributeSpecification{
	"name": {
		AllowedChoices: []string{},
		BSONFieldName:  "name",
		ConvertedName:  "Name",
		Description:    `Identification bit that will be used to identify the origin of the request.`,
		Exposed:        true,
		Name:           "name",
		Stored:         true,
		Type:           "string",
	},
}

PrincipalUserLowerCaseAttributesMap represents the map of attribute for PrincipalUser.

View Source
var RootAttributesMap = map[string]elemental.AttributeSpecification{}

RootAttributesMap represents the map of attribute for Root.

View Source
var RootIdentity = elemental.Identity{
	Name:     "root",
	Category: "root",
	Package:  "root",
	Private:  false,
}

RootIdentity represents the Identity of the object.

View Source
var RootLowerCaseAttributesMap = map[string]elemental.AttributeSpecification{}

RootLowerCaseAttributesMap represents the map of attribute for Root.

View Source
var TextualDetectionAttributesMap = map[string]elemental.AttributeSpecification{
	"Content": {
		AllowedChoices: []string{},
		ConvertedName:  "Content",
		Description:    `The original detected content.`,
		Name:           "content",
		Type:           "string",
	},
	"End": {
		AllowedChoices: []string{},
		BSONFieldName:  "end",
		ConvertedName:  "End",
		Description:    `The end position of the detection in the original data.`,
		Exposed:        true,
		Name:           "end",
		Stored:         true,
		Type:           "integer",
	},
	"Key": {
		AllowedChoices: []string{},
		BSONFieldName:  "key",
		ConvertedName:  "Key",
		Description:    `The key that is used in the name's place, If empty, a sequence of X's are used.`,
		Exposed:        true,
		Name:           "key",
		Stored:         true,
		Type:           "string",
	},
	"Name": {
		AllowedChoices: []string{},
		BSONFieldName:  "name",
		ConvertedName:  "Name",
		Description:    `The name of the detection.`,
		Exposed:        true,
		Name:           "name",
		Stored:         true,
		Type:           "string",
	},
	"Redacted": {
		AllowedChoices: []string{},
		BSONFieldName:  "redacted",
		ConvertedName:  "Redacted",
		Description:    `If true this detection has been redacted.`,
		Exposed:        true,
		Name:           "redacted",
		Stored:         true,
		Type:           "boolean",
	},
	"RedactedEnd": {
		AllowedChoices: []string{},
		BSONFieldName:  "redactedend",
		ConvertedName:  "RedactedEnd",
		Description:    `The end position of the detection in the redacted data.`,
		Exposed:        true,
		Name:           "redactedEnd",
		Stored:         true,
		Type:           "integer",
	},
	"RedactedStart": {
		AllowedChoices: []string{},
		BSONFieldName:  "redactedstart",
		ConvertedName:  "RedactedStart",
		Description:    `The start position of the detection in the redacted data.`,
		Exposed:        true,
		Name:           "redactedStart",
		Stored:         true,
		Type:           "integer",
	},
	"Score": {
		AllowedChoices: []string{},
		BSONFieldName:  "score",
		ConvertedName:  "Score",
		Description:    `The confidence score of the detection.`,
		Exposed:        true,
		MaxValue:       1,
		Name:           "score",
		Stored:         true,
		Type:           "float",
	},
	"Start": {
		AllowedChoices: []string{},
		BSONFieldName:  "start",
		ConvertedName:  "Start",
		Description:    `The start position of the detection in the original data.`,
		Exposed:        true,
		Name:           "start",
		Stored:         true,
		Type:           "integer",
	},
	"Type": {
		AllowedChoices: []string{"Keyword", "PII", "Secret"},
		BSONFieldName:  "type",
		ConvertedName:  "Type",
		Description:    `The type of detection.`,
		Exposed:        true,
		Name:           "type",
		Stored:         true,
		Type:           "enum",
	},
}

TextualDetectionAttributesMap represents the map of attribute for TextualDetection.

View Source
var TextualDetectionLowerCaseAttributesMap = map[string]elemental.AttributeSpecification{
	"content": {
		AllowedChoices: []string{},
		ConvertedName:  "Content",
		Description:    `The original detected content.`,
		Name:           "content",
		Type:           "string",
	},
	"end": {
		AllowedChoices: []string{},
		BSONFieldName:  "end",
		ConvertedName:  "End",
		Description:    `The end position of the detection in the original data.`,
		Exposed:        true,
		Name:           "end",
		Stored:         true,
		Type:           "integer",
	},
	"key": {
		AllowedChoices: []string{},
		BSONFieldName:  "key",
		ConvertedName:  "Key",
		Description:    `The key that is used in the name's place, If empty, a sequence of X's are used.`,
		Exposed:        true,
		Name:           "key",
		Stored:         true,
		Type:           "string",
	},
	"name": {
		AllowedChoices: []string{},
		BSONFieldName:  "name",
		ConvertedName:  "Name",
		Description:    `The name of the detection.`,
		Exposed:        true,
		Name:           "name",
		Stored:         true,
		Type:           "string",
	},
	"redacted": {
		AllowedChoices: []string{},
		BSONFieldName:  "redacted",
		ConvertedName:  "Redacted",
		Description:    `If true this detection has been redacted.`,
		Exposed:        true,
		Name:           "redacted",
		Stored:         true,
		Type:           "boolean",
	},
	"redactedend": {
		AllowedChoices: []string{},
		BSONFieldName:  "redactedend",
		ConvertedName:  "RedactedEnd",
		Description:    `The end position of the detection in the redacted data.`,
		Exposed:        true,
		Name:           "redactedEnd",
		Stored:         true,
		Type:           "integer",
	},
	"redactedstart": {
		AllowedChoices: []string{},
		BSONFieldName:  "redactedstart",
		ConvertedName:  "RedactedStart",
		Description:    `The start position of the detection in the redacted data.`,
		Exposed:        true,
		Name:           "redactedStart",
		Stored:         true,
		Type:           "integer",
	},
	"score": {
		AllowedChoices: []string{},
		BSONFieldName:  "score",
		ConvertedName:  "Score",
		Description:    `The confidence score of the detection.`,
		Exposed:        true,
		MaxValue:       1,
		Name:           "score",
		Stored:         true,
		Type:           "float",
	},
	"start": {
		AllowedChoices: []string{},
		BSONFieldName:  "start",
		ConvertedName:  "Start",
		Description:    `The start position of the detection in the original data.`,
		Exposed:        true,
		Name:           "start",
		Stored:         true,
		Type:           "integer",
	},
	"type": {
		AllowedChoices: []string{"Keyword", "PII", "Secret"},
		BSONFieldName:  "type",
		ConvertedName:  "Type",
		Description:    `The type of detection.`,
		Exposed:        true,
		Name:           "type",
		Stored:         true,
		Type:           "enum",
	},
}

TextualDetectionLowerCaseAttributesMap represents the map of attribute for TextualDetection.

Functions

func AliasesForIdentity

func AliasesForIdentity(identity elemental.Identity) []string

AliasesForIdentity returns all the aliases for the given identity.

func AllIdentities

func AllIdentities() []elemental.Identity

AllIdentities returns all existing identities.

func Manager

func Manager() elemental.ModelManager

Manager returns the model elemental.ModelManager.

func ModelVersion

func ModelVersion() float64

ModelVersion returns the current version of the model.

func ValidateNonEmptyList

func ValidateNonEmptyList[T any](attribute string, list []T) error

ValidateNonEmptyList validates that a list is not empty.

func ValidatePrincipal

func ValidatePrincipal(principal *Principal) error

ValidatePrincipal validates the principal object.

func ValidateRego

func ValidateRego(attribute string, code string) error

ValidateRego validates the rego input data.

Types

type AlertEvent

type AlertEvent struct {
	// The name of the alert definition that triggered the alert event.
	AlertDefinition string `json:"alertDefinition" msgpack:"alertDefinition" bson:"-" mapstructure:"alertDefinition,omitempty"`

	// The namespace of the alert definition.
	AlertDefinitionNamespace string `json:"alertDefinitionNamespace" msgpack:"alertDefinitionNamespace" bson:"-" mapstructure:"alertDefinitionNamespace,omitempty"`

	// The principal of the object.
	Principal *Principal `json:"principal" msgpack:"principal" bson:"principal" mapstructure:"principal,omitempty"`

	// The provider used that the alert came from.
	Provider string `json:"provider" msgpack:"provider" bson:"-" mapstructure:"provider,omitempty"`

	// When the alert event was raised.
	Timestamp time.Time `json:"timestamp,omitempty" msgpack:"timestamp,omitempty" bson:"-" mapstructure:"timestamp,omitempty"`

	ModelVersion int `json:"-" msgpack:"-" bson:"_modelversion"`
}

AlertEvent represents the model of a alertevent

func NewAlertEvent

func NewAlertEvent() *AlertEvent

NewAlertEvent returns a new *AlertEvent

func (*AlertEvent) AttributeSpecifications

func (*AlertEvent) AttributeSpecifications() map[string]elemental.AttributeSpecification

AttributeSpecifications returns the full attribute specifications map.

func (*AlertEvent) BleveType

func (o *AlertEvent) BleveType() string

BleveType implements the bleve.Classifier Interface.

func (*AlertEvent) DeepCopy

func (o *AlertEvent) DeepCopy() *AlertEvent

DeepCopy returns a deep copy if the AlertEvent.

func (*AlertEvent) DeepCopyInto

func (o *AlertEvent) DeepCopyInto(out *AlertEvent)

DeepCopyInto copies the receiver into the given *AlertEvent.

func (*AlertEvent) GetBSON

func (o *AlertEvent) GetBSON() (any, error)

GetBSON implements the bson marshaling interface. This is used to transparently convert ID to MongoDBID as ObectID.

func (*AlertEvent) SetBSON

func (o *AlertEvent) SetBSON(raw bson.Raw) error

SetBSON implements the bson marshaling interface. This is used to transparently convert ID to MongoDBID as ObectID.

func (*AlertEvent) SpecificationForAttribute

func (*AlertEvent) SpecificationForAttribute(name string) elemental.AttributeSpecification

SpecificationForAttribute returns the AttributeSpecification for the given attribute name key.

func (*AlertEvent) Validate

func (o *AlertEvent) Validate() error

Validate valides the current information stored into the structure.

func (*AlertEvent) ValueForAttribute

func (o *AlertEvent) ValueForAttribute(name string) any

ValueForAttribute returns the value for the given attribute. This is a very advanced function that you should not need but in some very specific use cases.

type Analyzer

type Analyzer struct {
	// ID is the identifier of the object.
	ID string `json:"ID,omitempty" msgpack:"ID,omitempty" bson:"-" mapstructure:"ID,omitempty"`

	// The description of the analyzer.
	Description string `json:"description" msgpack:"description" bson:"-" mapstructure:"description,omitempty"`

	// The detectors the analyzer can use.
	Detectors []*Detector `json:"detectors,omitempty" msgpack:"detectors,omitempty" bson:"-" mapstructure:"detectors,omitempty"`

	// Tell if the analyzer is enabled by default.
	Enabled bool `json:"enabled" msgpack:"enabled" bson:"-" mapstructure:"enabled,omitempty"`

	// The group the analyzer belongs to.
	Group string `json:"group" msgpack:"group" bson:"-" mapstructure:"group,omitempty"`

	// The models used by the analyzer.
	Models []*AnalyzerModel `json:"models,omitempty" msgpack:"models,omitempty" bson:"-" mapstructure:"models,omitempty"`

	// The name of the analyzer.
	Name string `json:"name" msgpack:"name" bson:"-" mapstructure:"name,omitempty"`

	// The namespace of the object.
	Namespace string `json:"namespace,omitempty" msgpack:"namespace,omitempty" bson:"namespace,omitempty" mapstructure:"namespace,omitempty"`

	// A list of trigger or globl pattern that the analyzer will react on.
	// A trigger is the detector Group and Name separated with a /.
	Triggers []string `json:"triggers,omitempty" msgpack:"triggers,omitempty" bson:"-" mapstructure:"triggers,omitempty"`

	ModelVersion int `json:"-" msgpack:"-" bson:"_modelversion"`
}

Analyzer represents the model of a analyzer

func NewAnalyzer

func NewAnalyzer() *Analyzer

NewAnalyzer returns a new *Analyzer

func (*Analyzer) AttributeSpecifications

func (*Analyzer) AttributeSpecifications() map[string]elemental.AttributeSpecification

AttributeSpecifications returns the full attribute specifications map.

func (*Analyzer) BleveType

func (o *Analyzer) BleveType() string

BleveType implements the bleve.Classifier Interface.

func (*Analyzer) DeepCopy

func (o *Analyzer) DeepCopy() *Analyzer

DeepCopy returns a deep copy if the Analyzer.

func (*Analyzer) DeepCopyInto

func (o *Analyzer) DeepCopyInto(out *Analyzer)

DeepCopyInto copies the receiver into the given *Analyzer.

func (*Analyzer) DefaultOrder

func (o *Analyzer) DefaultOrder() []string

DefaultOrder returns the list of default ordering fields.

func (*Analyzer) Doc

func (o *Analyzer) Doc() string

Doc returns the documentation for the object

func (*Analyzer) GetBSON

func (o *Analyzer) GetBSON() (any, error)

GetBSON implements the bson marshaling interface. This is used to transparently convert ID to MongoDBID as ObectID.

func (*Analyzer) GetNamespace

func (o *Analyzer) GetNamespace() string

GetNamespace returns the Namespace of the receiver.

func (*Analyzer) Identifier

func (o *Analyzer) Identifier() string

Identifier returns the value of the object's unique identifier.

func (*Analyzer) Identity

func (o *Analyzer) Identity() elemental.Identity

Identity returns the Identity of the object.

func (*Analyzer) Patch

func (o *Analyzer) Patch(sparse elemental.SparseIdentifiable)

Patch apply the non nil value of a *SparseAnalyzer to the object.

func (*Analyzer) SetBSON

func (o *Analyzer) SetBSON(raw bson.Raw) error

SetBSON implements the bson marshaling interface. This is used to transparently convert ID to MongoDBID as ObectID.

func (*Analyzer) SetIdentifier

func (o *Analyzer) SetIdentifier(id string)

SetIdentifier sets the value of the object's unique identifier.

func (*Analyzer) SetNamespace

func (o *Analyzer) SetNamespace(namespace string)

SetNamespace sets the property Namespace of the receiver using the given value.

func (*Analyzer) SpecificationForAttribute

func (*Analyzer) SpecificationForAttribute(name string) elemental.AttributeSpecification

SpecificationForAttribute returns the AttributeSpecification for the given attribute name key.

func (*Analyzer) String

func (o *Analyzer) String() string

func (*Analyzer) ToSparse

func (o *Analyzer) ToSparse(fields ...string) elemental.SparseIdentifiable

ToSparse returns the sparse version of the model. The returned object will only contain the given fields. No field means entire field set.

func (*Analyzer) Validate

func (o *Analyzer) Validate() error

Validate valides the current information stored into the structure.

func (*Analyzer) ValueForAttribute

func (o *Analyzer) ValueForAttribute(name string) any

ValueForAttribute returns the value for the given attribute. This is a very advanced function that you should not need but in some very specific use cases.

func (*Analyzer) Version

func (o *Analyzer) Version() int

Version returns the hardcoded version of the model.

type AnalyzerModel

type AnalyzerModel struct {
	// The name of the model.
	Name string `json:"name" msgpack:"name" bson:"-" mapstructure:"name,omitempty"`

	// The revision of the model.
	Revision string `json:"revision" msgpack:"revision" bson:"-" mapstructure:"revision,omitempty"`

	ModelVersion int `json:"-" msgpack:"-" bson:"_modelversion"`
}

AnalyzerModel represents the model of a analyzermodel

func NewAnalyzerModel

func NewAnalyzerModel() *AnalyzerModel

NewAnalyzerModel returns a new *AnalyzerModel

func (*AnalyzerModel) AttributeSpecifications

func (*AnalyzerModel) AttributeSpecifications() map[string]elemental.AttributeSpecification

AttributeSpecifications returns the full attribute specifications map.

func (*AnalyzerModel) BleveType

func (o *AnalyzerModel) BleveType() string

BleveType implements the bleve.Classifier Interface.

func (*AnalyzerModel) DeepCopy

func (o *AnalyzerModel) DeepCopy() *AnalyzerModel

DeepCopy returns a deep copy if the AnalyzerModel.

func (*AnalyzerModel) DeepCopyInto

func (o *AnalyzerModel) DeepCopyInto(out *AnalyzerModel)

DeepCopyInto copies the receiver into the given *AnalyzerModel.

func (*AnalyzerModel) GetBSON

func (o *AnalyzerModel) GetBSON() (any, error)

GetBSON implements the bson marshaling interface. This is used to transparently convert ID to MongoDBID as ObectID.

func (*AnalyzerModel) SetBSON

func (o *AnalyzerModel) SetBSON(raw bson.Raw) error

SetBSON implements the bson marshaling interface. This is used to transparently convert ID to MongoDBID as ObectID.

func (*AnalyzerModel) SpecificationForAttribute

func (*AnalyzerModel) SpecificationForAttribute(name string) elemental.AttributeSpecification

SpecificationForAttribute returns the AttributeSpecification for the given attribute name key.

func (*AnalyzerModel) Validate

func (o *AnalyzerModel) Validate() error

Validate valides the current information stored into the structure.

func (*AnalyzerModel) ValueForAttribute

func (o *AnalyzerModel) ValueForAttribute(name string) any

ValueForAttribute returns the value for the given attribute. This is a very advanced function that you should not need but in some very specific use cases.

type AnalyzersList

type AnalyzersList []*Analyzer

AnalyzersList represents a list of Analyzers

func (AnalyzersList) Append

Append appends the objects to the a new copy of the AnalyzersList.

func (AnalyzersList) Copy

Copy returns a pointer to a copy the AnalyzersList.

func (AnalyzersList) DefaultOrder

func (o AnalyzersList) DefaultOrder() []string

DefaultOrder returns the default ordering fields of the content.

func (AnalyzersList) Identity

func (o AnalyzersList) Identity() elemental.Identity

Identity returns the identity of the objects in the list.

func (AnalyzersList) List

List converts the object to an elemental.IdentifiablesList.

func (AnalyzersList) ToSparse

func (o AnalyzersList) ToSparse(fields ...string) elemental.Identifiables

ToSparse returns the AnalyzersList converted to SparseAnalyzersList. Objects in the list will only contain the given fields. No field means entire field set.

func (AnalyzersList) Version

func (o AnalyzersList) Version() int

Version returns the version of the content.

type Detector

type Detector struct {
	// The description of the detection.
	Description string `json:"description" msgpack:"description" bson:"-" mapstructure:"description,omitempty"`

	// The group the detection belongs to.
	Group string `json:"group" msgpack:"group" bson:"-" mapstructure:"group,omitempty"`

	// The label returned by the model.
	Label string `json:"label" msgpack:"label" bson:"-" mapstructure:"label,omitempty"`

	// The name of the detection.
	Name string `json:"name" msgpack:"name" bson:"-" mapstructure:"name,omitempty"`

	// Tell if the detection is positional.
	Positional bool `json:"positional" msgpack:"positional" bson:"-" mapstructure:"positional,omitempty"`

	ModelVersion int `json:"-" msgpack:"-" bson:"_modelversion"`
}

Detector represents the model of a detector

func NewDetector

func NewDetector() *Detector

NewDetector returns a new *Detector

func (*Detector) AttributeSpecifications

func (*Detector) AttributeSpecifications() map[string]elemental.AttributeSpecification

AttributeSpecifications returns the full attribute specifications map.

func (*Detector) BleveType

func (o *Detector) BleveType() string

BleveType implements the bleve.Classifier Interface.

func (*Detector) DeepCopy

func (o *Detector) DeepCopy() *Detector

DeepCopy returns a deep copy if the Detector.

func (*Detector) DeepCopyInto

func (o *Detector) DeepCopyInto(out *Detector)

DeepCopyInto copies the receiver into the given *Detector.

func (*Detector) GetBSON

func (o *Detector) GetBSON() (any, error)

GetBSON implements the bson marshaling interface. This is used to transparently convert ID to MongoDBID as ObectID.

func (*Detector) SetBSON

func (o *Detector) SetBSON(raw bson.Raw) error

SetBSON implements the bson marshaling interface. This is used to transparently convert ID to MongoDBID as ObectID.

func (*Detector) SpecificationForAttribute

func (*Detector) SpecificationForAttribute(name string) elemental.AttributeSpecification

SpecificationForAttribute returns the AttributeSpecification for the given attribute name key.

func (*Detector) Validate

func (o *Detector) Validate() error

Validate valides the current information stored into the structure.

func (*Detector) ValueForAttribute

func (o *Detector) ValueForAttribute(name string) any

ValueForAttribute returns the value for the given attribute. This is a very advanced function that you should not need but in some very specific use cases.

type ExtractionInformation

type ExtractionInformation struct {
	// The number of times it has been seen.
	N int `json:"n,omitempty" msgpack:"n,omitempty" bson:"-" mapstructure:"n,omitempty"`

	ModelVersion int `json:"-" msgpack:"-" bson:"_modelversion"`
}

ExtractionInformation represents the model of a extractioninformation

func NewExtractionInformation

func NewExtractionInformation() *ExtractionInformation

NewExtractionInformation returns a new *ExtractionInformation

func (*ExtractionInformation) AttributeSpecifications

func (*ExtractionInformation) AttributeSpecifications() map[string]elemental.AttributeSpecification

AttributeSpecifications returns the full attribute specifications map.

func (*ExtractionInformation) BleveType

func (o *ExtractionInformation) BleveType() string

BleveType implements the bleve.Classifier Interface.

func (*ExtractionInformation) DeepCopy

DeepCopy returns a deep copy if the ExtractionInformation.

func (*ExtractionInformation) DeepCopyInto

func (o *ExtractionInformation) DeepCopyInto(out *ExtractionInformation)

DeepCopyInto copies the receiver into the given *ExtractionInformation.

func (*ExtractionInformation) GetBSON

func (o *ExtractionInformation) GetBSON() (any, error)

GetBSON implements the bson marshaling interface. This is used to transparently convert ID to MongoDBID as ObectID.

func (*ExtractionInformation) SetBSON

func (o *ExtractionInformation) SetBSON(raw bson.Raw) error

SetBSON implements the bson marshaling interface. This is used to transparently convert ID to MongoDBID as ObectID.

func (*ExtractionInformation) SpecificationForAttribute

func (*ExtractionInformation) SpecificationForAttribute(name string) elemental.AttributeSpecification

SpecificationForAttribute returns the AttributeSpecification for the given attribute name key.

func (*ExtractionInformation) Validate

func (o *ExtractionInformation) Validate() error

Validate valides the current information stored into the structure.

func (*ExtractionInformation) ValueForAttribute

func (o *ExtractionInformation) ValueForAttribute(name string) any

ValueForAttribute returns the value for the given attribute. This is a very advanced function that you should not need but in some very specific use cases.

type ExtractionSummary

type ExtractionSummary struct {
	// The PIIs found during classification.
	PIIs map[string]ExtractionInformation `json:"PIIs,omitempty" msgpack:"PIIs,omitempty" bson:"piis,omitempty" mapstructure:"PIIs,omitempty"`

	// The categories are remapping of the modalities in a more human friendly way.
	Categories map[string]ExtractionInformation `json:"categories,omitempty" msgpack:"categories,omitempty" bson:"categories,omitempty" mapstructure:"categories,omitempty"`

	// The various exploits attempts.
	Exploits map[string]ExtractionInformation `json:"exploits,omitempty" msgpack:"exploits,omitempty" bson:"exploits,omitempty" mapstructure:"exploits,omitempty"`

	// The estimated intent embodied into the text.
	Intent map[string]ExtractionInformation `json:"intent,omitempty" msgpack:"intent,omitempty" bson:"intent,omitempty" mapstructure:"intent,omitempty"`

	// The keywords found during classification.
	Keywords map[string]ExtractionInformation `json:"keywords,omitempty" msgpack:"keywords,omitempty" bson:"keywords,omitempty" mapstructure:"keywords,omitempty"`

	// The language of the classification.
	Languages map[string]ExtractionInformation `json:"languages,omitempty" msgpack:"languages,omitempty" bson:"languages,omitempty" mapstructure:"languages,omitempty"`

	// The modalities of data detected in the data.
	Modalities map[string]ExtractionInformation `json:"modalities,omitempty" msgpack:"modalities,omitempty" bson:"modalities,omitempty" mapstructure:"modalities,omitempty"`

	// The secrets found during classification.
	Secrets map[string]ExtractionInformation `json:"secrets,omitempty" msgpack:"secrets,omitempty" bson:"secrets,omitempty" mapstructure:"secrets,omitempty"`

	// The topic of the classification.
	Topics map[string]ExtractionInformation `json:"topics,omitempty" msgpack:"topics,omitempty" bson:"topics,omitempty" mapstructure:"topics,omitempty"`

	ModelVersion int `json:"-" msgpack:"-" bson:"_modelversion"`
}

ExtractionSummary represents the model of a extractionsummary

func NewExtractionSummary

func NewExtractionSummary() *ExtractionSummary

NewExtractionSummary returns a new *ExtractionSummary

func (*ExtractionSummary) AttributeSpecifications

func (*ExtractionSummary) AttributeSpecifications() map[string]elemental.AttributeSpecification

AttributeSpecifications returns the full attribute specifications map.

func (*ExtractionSummary) BleveType

func (o *ExtractionSummary) BleveType() string

BleveType implements the bleve.Classifier Interface.

func (*ExtractionSummary) DeepCopy

func (o *ExtractionSummary) DeepCopy() *ExtractionSummary

DeepCopy returns a deep copy if the ExtractionSummary.

func (*ExtractionSummary) DeepCopyInto

func (o *ExtractionSummary) DeepCopyInto(out *ExtractionSummary)

DeepCopyInto copies the receiver into the given *ExtractionSummary.

func (*ExtractionSummary) GetBSON

func (o *ExtractionSummary) GetBSON() (any, error)

GetBSON implements the bson marshaling interface. This is used to transparently convert ID to MongoDBID as ObectID.

func (*ExtractionSummary) SetBSON

func (o *ExtractionSummary) SetBSON(raw bson.Raw) error

SetBSON implements the bson marshaling interface. This is used to transparently convert ID to MongoDBID as ObectID.

func (*ExtractionSummary) SpecificationForAttribute

func (*ExtractionSummary) SpecificationForAttribute(name string) elemental.AttributeSpecification

SpecificationForAttribute returns the AttributeSpecification for the given attribute name key.

func (*ExtractionSummary) Validate

func (o *ExtractionSummary) Validate() error

Validate valides the current information stored into the structure.

func (*ExtractionSummary) ValueForAttribute

func (o *ExtractionSummary) ValueForAttribute(name string) any

ValueForAttribute returns the value for the given attribute. This is a very advanced function that you should not need but in some very specific use cases.

type LatenciesList

type LatenciesList []*Latency

LatenciesList represents a list of Latencies

func (LatenciesList) Append

Append appends the objects to the a new copy of the LatenciesList.

func (LatenciesList) Copy

Copy returns a pointer to a copy the LatenciesList.

func (LatenciesList) DefaultOrder

func (o LatenciesList) DefaultOrder() []string

DefaultOrder returns the default ordering fields of the content.

func (LatenciesList) Identity

func (o LatenciesList) Identity() elemental.Identity

Identity returns the identity of the objects in the list.

func (LatenciesList) List

List converts the object to an elemental.IdentifiablesList.

func (LatenciesList) ToSparse

func (o LatenciesList) ToSparse(fields ...string) elemental.Identifiables

ToSparse returns the LatenciesList converted to SparseLatenciesList. Objects in the list will only contain the given fields. No field means entire field set.

func (LatenciesList) Version

func (o LatenciesList) Version() int

Version returns the version of the content.

type Latency

type Latency struct {
	// How much time it took to run the access policy in nanoseconds.
	AccessPolicy int `json:"accessPolicy" msgpack:"accessPolicy" bson:"accesspolicy" mapstructure:"accessPolicy,omitempty"`

	// How much time it took to run content analysis in nanoseconds.
	Analysis int `json:"analysis" msgpack:"analysis" bson:"analysis" mapstructure:"analysis,omitempty"`

	// How much time it took to run the assign policy in nanoseconds.
	AssignPolicy int `json:"assignPolicy" msgpack:"assignPolicy" bson:"assignpolicy" mapstructure:"assignPolicy,omitempty"`

	// How much time it took to run content policy in nanoseconds.
	ContentPolicy int `json:"contentPolicy" msgpack:"contentPolicy" bson:"contentpolicy" mapstructure:"contentPolicy,omitempty"`

	// How much time it took to run input or output extraction in nanoseconds.
	Extraction int `json:"extraction" msgpack:"extraction" bson:"extraction" mapstructure:"extraction,omitempty"`

	ModelVersion int `json:"-" msgpack:"-" bson:"_modelversion"`
}

Latency represents the model of a latency

func NewLatency

func NewLatency() *Latency

NewLatency returns a new *Latency

func (*Latency) AttributeSpecifications

func (*Latency) AttributeSpecifications() map[string]elemental.AttributeSpecification

AttributeSpecifications returns the full attribute specifications map.

func (*Latency) BleveType

func (o *Latency) BleveType() string

BleveType implements the bleve.Classifier Interface.

func (*Latency) DeepCopy

func (o *Latency) DeepCopy() *Latency

DeepCopy returns a deep copy if the Latency.

func (*Latency) DeepCopyInto

func (o *Latency) DeepCopyInto(out *Latency)

DeepCopyInto copies the receiver into the given *Latency.

func (*Latency) DefaultOrder

func (o *Latency) DefaultOrder() []string

DefaultOrder returns the list of default ordering fields.

func (*Latency) Doc

func (o *Latency) Doc() string

Doc returns the documentation for the object

func (*Latency) GetBSON

func (o *Latency) GetBSON() (any, error)

GetBSON implements the bson marshaling interface. This is used to transparently convert ID to MongoDBID as ObectID.

func (*Latency) Identifier

func (o *Latency) Identifier() string

Identifier returns the value of the object's unique identifier.

func (*Latency) Identity

func (o *Latency) Identity() elemental.Identity

Identity returns the Identity of the object.

func (*Latency) Patch

func (o *Latency) Patch(sparse elemental.SparseIdentifiable)

Patch apply the non nil value of a *SparseLatency to the object.

func (*Latency) SetBSON

func (o *Latency) SetBSON(raw bson.Raw) error

SetBSON implements the bson marshaling interface. This is used to transparently convert ID to MongoDBID as ObectID.

func (*Latency) SetIdentifier

func (o *Latency) SetIdentifier(id string)

SetIdentifier sets the value of the object's unique identifier.

func (*Latency) SpecificationForAttribute

func (*Latency) SpecificationForAttribute(name string) elemental.AttributeSpecification

SpecificationForAttribute returns the AttributeSpecification for the given attribute name key.

func (*Latency) String

func (o *Latency) String() string

func (*Latency) ToSparse

func (o *Latency) ToSparse(fields ...string) elemental.SparseIdentifiable

ToSparse returns the sparse version of the model. The returned object will only contain the given fields. No field means entire field set.

func (*Latency) Validate

func (o *Latency) Validate() error

Validate valides the current information stored into the structure.

func (*Latency) ValueForAttribute

func (o *Latency) ValueForAttribute(name string) any

ValueForAttribute returns the value for the given attribute. This is a very advanced function that you should not need but in some very specific use cases.

func (*Latency) Version

func (o *Latency) Version() int

Version returns the hardcoded version of the model.

type Modality

type Modality struct {
	// The group of data.
	Group string `json:"group" msgpack:"group" bson:"group" mapstructure:"group,omitempty"`

	// The type of data.
	Type string `json:"type" msgpack:"type" bson:"type" mapstructure:"type,omitempty"`

	ModelVersion int `json:"-" msgpack:"-" bson:"_modelversion"`
}

Modality represents the model of a modality

func NewModality

func NewModality() *Modality

NewModality returns a new *Modality

func (*Modality) AttributeSpecifications

func (*Modality) AttributeSpecifications() map[string]elemental.AttributeSpecification

AttributeSpecifications returns the full attribute specifications map.

func (*Modality) BleveType

func (o *Modality) BleveType() string

BleveType implements the bleve.Classifier Interface.

func (*Modality) DeepCopy

func (o *Modality) DeepCopy() *Modality

DeepCopy returns a deep copy if the Modality.

func (*Modality) DeepCopyInto

func (o *Modality) DeepCopyInto(out *Modality)

DeepCopyInto copies the receiver into the given *Modality.

func (*Modality) GetBSON

func (o *Modality) GetBSON() (any, error)

GetBSON implements the bson marshaling interface. This is used to transparently convert ID to MongoDBID as ObectID.

func (*Modality) SetBSON

func (o *Modality) SetBSON(raw bson.Raw) error

SetBSON implements the bson marshaling interface. This is used to transparently convert ID to MongoDBID as ObectID.

func (*Modality) SpecificationForAttribute

func (*Modality) SpecificationForAttribute(name string) elemental.AttributeSpecification

SpecificationForAttribute returns the AttributeSpecification for the given attribute name key.

func (*Modality) Validate

func (o *Modality) Validate() error

Validate valides the current information stored into the structure.

func (*Modality) ValueForAttribute

func (o *Modality) ValueForAttribute(name string) any

ValueForAttribute returns the value for the given attribute. This is a very advanced function that you should not need but in some very specific use cases.

type Principal

type Principal struct {
	// The application principal information if type is App.
	App *PrincipalApp `json:"app,omitempty" msgpack:"app,omitempty" bson:"app,omitempty" mapstructure:"app,omitempty"`

	// The type of authentication.
	AuthType PrincipalAuthTypeValue `json:"authType" msgpack:"authType" bson:"authtype" mapstructure:"authType,omitempty"`

	// List of claims extracted from the user query.
	Claims []string `json:"claims,omitempty" msgpack:"claims,omitempty" bson:"claims,omitempty" mapstructure:"claims,omitempty"`

	// The team that was used to authorize the request.
	Team string `json:"team,omitempty" msgpack:"team,omitempty" bson:"team,omitempty" mapstructure:"team,omitempty"`

	// The name of the token, if any.
	TokenName string `json:"tokenName" msgpack:"tokenName" bson:"tokenname" mapstructure:"tokenName,omitempty"`

	// The type of principal.
	Type PrincipalTypeValue `json:"type" msgpack:"type" bson:"type" mapstructure:"type,omitempty"`

	// The user principal information if type is User.
	User *PrincipalUser `json:"user,omitempty" msgpack:"user,omitempty" bson:"user,omitempty" mapstructure:"user,omitempty"`

	ModelVersion int `json:"-" msgpack:"-" bson:"_modelversion"`
}

Principal represents the model of a principal

func NewPrincipal

func NewPrincipal() *Principal

NewPrincipal returns a new *Principal

func (*Principal) AttributeSpecifications

func (*Principal) AttributeSpecifications() map[string]elemental.AttributeSpecification

AttributeSpecifications returns the full attribute specifications map.

func (*Principal) BleveType

func (o *Principal) BleveType() string

BleveType implements the bleve.Classifier Interface.

func (*Principal) DeepCopy

func (o *Principal) DeepCopy() *Principal

DeepCopy returns a deep copy if the Principal.

func (*Principal) DeepCopyInto

func (o *Principal) DeepCopyInto(out *Principal)

DeepCopyInto copies the receiver into the given *Principal.

func (*Principal) DefaultOrder

func (o *Principal) DefaultOrder() []string

DefaultOrder returns the list of default ordering fields.

func (*Principal) Doc

func (o *Principal) Doc() string

Doc returns the documentation for the object

func (*Principal) GetBSON

func (o *Principal) GetBSON() (any, error)

GetBSON implements the bson marshaling interface. This is used to transparently convert ID to MongoDBID as ObectID.

func (*Principal) Identifier

func (o *Principal) Identifier() string

Identifier returns the value of the object's unique identifier.

func (*Principal) Identity

func (o *Principal) Identity() elemental.Identity

Identity returns the Identity of the object.

func (*Principal) Patch

func (o *Principal) Patch(sparse elemental.SparseIdentifiable)

Patch apply the non nil value of a *SparsePrincipal to the object.

func (*Principal) SetBSON

func (o *Principal) SetBSON(raw bson.Raw) error

SetBSON implements the bson marshaling interface. This is used to transparently convert ID to MongoDBID as ObectID.

func (*Principal) SetIdentifier

func (o *Principal) SetIdentifier(id string)

SetIdentifier sets the value of the object's unique identifier.

func (*Principal) SpecificationForAttribute

func (*Principal) SpecificationForAttribute(name string) elemental.AttributeSpecification

SpecificationForAttribute returns the AttributeSpecification for the given attribute name key.

func (*Principal) String

func (o *Principal) String() string

func (*Principal) ToSparse

func (o *Principal) ToSparse(fields ...string) elemental.SparseIdentifiable

ToSparse returns the sparse version of the model. The returned object will only contain the given fields. No field means entire field set.

func (*Principal) Validate

func (o *Principal) Validate() error

Validate valides the current information stored into the structure.

func (*Principal) ValueForAttribute

func (o *Principal) ValueForAttribute(name string) any

ValueForAttribute returns the value for the given attribute. This is a very advanced function that you should not need but in some very specific use cases.

func (*Principal) Version

func (o *Principal) Version() int

Version returns the hardcoded version of the model.

type PrincipalApp

type PrincipalApp struct {
	// The list of labels attached to an application request.
	Labels []string `json:"labels,omitempty" msgpack:"labels,omitempty" bson:"labels,omitempty" mapstructure:"labels,omitempty"`

	// The name of the application.
	Name string `json:"name,omitempty" msgpack:"name,omitempty" bson:"name,omitempty" mapstructure:"name,omitempty"`

	// The tier of the application request.
	Tier string `json:"tier,omitempty" msgpack:"tier,omitempty" bson:"tier,omitempty" mapstructure:"tier,omitempty"`

	ModelVersion int `json:"-" msgpack:"-" bson:"_modelversion"`
}

PrincipalApp represents the model of a principalapp

func NewPrincipalApp

func NewPrincipalApp() *PrincipalApp

NewPrincipalApp returns a new *PrincipalApp

func (*PrincipalApp) AttributeSpecifications

func (*PrincipalApp) AttributeSpecifications() map[string]elemental.AttributeSpecification

AttributeSpecifications returns the full attribute specifications map.

func (*PrincipalApp) BleveType

func (o *PrincipalApp) BleveType() string

BleveType implements the bleve.Classifier Interface.

func (*PrincipalApp) DeepCopy

func (o *PrincipalApp) DeepCopy() *PrincipalApp

DeepCopy returns a deep copy if the PrincipalApp.

func (*PrincipalApp) DeepCopyInto

func (o *PrincipalApp) DeepCopyInto(out *PrincipalApp)

DeepCopyInto copies the receiver into the given *PrincipalApp.

func (*PrincipalApp) DefaultOrder

func (o *PrincipalApp) DefaultOrder() []string

DefaultOrder returns the list of default ordering fields.

func (*PrincipalApp) Doc

func (o *PrincipalApp) Doc() string

Doc returns the documentation for the object

func (*PrincipalApp) GetBSON

func (o *PrincipalApp) GetBSON() (any, error)

GetBSON implements the bson marshaling interface. This is used to transparently convert ID to MongoDBID as ObectID.

func (*PrincipalApp) Identifier

func (o *PrincipalApp) Identifier() string

Identifier returns the value of the object's unique identifier.

func (*PrincipalApp) Identity

func (o *PrincipalApp) Identity() elemental.Identity

Identity returns the Identity of the object.

func (*PrincipalApp) Patch

func (o *PrincipalApp) Patch(sparse elemental.SparseIdentifiable)

Patch apply the non nil value of a *SparsePrincipalApp to the object.

func (*PrincipalApp) SetBSON

func (o *PrincipalApp) SetBSON(raw bson.Raw) error

SetBSON implements the bson marshaling interface. This is used to transparently convert ID to MongoDBID as ObectID.

func (*PrincipalApp) SetIdentifier

func (o *PrincipalApp) SetIdentifier(id string)

SetIdentifier sets the value of the object's unique identifier.

func (*PrincipalApp) SpecificationForAttribute

func (*PrincipalApp) SpecificationForAttribute(name string) elemental.AttributeSpecification

SpecificationForAttribute returns the AttributeSpecification for the given attribute name key.

func (*PrincipalApp) String

func (o *PrincipalApp) String() string

func (*PrincipalApp) ToSparse

func (o *PrincipalApp) ToSparse(fields ...string) elemental.SparseIdentifiable

ToSparse returns the sparse version of the model. The returned object will only contain the given fields. No field means entire field set.

func (*PrincipalApp) Validate

func (o *PrincipalApp) Validate() error

Validate valides the current information stored into the structure.

func (*PrincipalApp) ValueForAttribute

func (o *PrincipalApp) ValueForAttribute(name string) any

ValueForAttribute returns the value for the given attribute. This is a very advanced function that you should not need but in some very specific use cases.

func (*PrincipalApp) Version

func (o *PrincipalApp) Version() int

Version returns the hardcoded version of the model.

type PrincipalAppsList

type PrincipalAppsList []*PrincipalApp

PrincipalAppsList represents a list of PrincipalApps

func (PrincipalAppsList) Append

Append appends the objects to the a new copy of the PrincipalAppsList.

func (PrincipalAppsList) Copy

Copy returns a pointer to a copy the PrincipalAppsList.

func (PrincipalAppsList) DefaultOrder

func (o PrincipalAppsList) DefaultOrder() []string

DefaultOrder returns the default ordering fields of the content.

func (PrincipalAppsList) Identity

func (o PrincipalAppsList) Identity() elemental.Identity

Identity returns the identity of the objects in the list.

func (PrincipalAppsList) List

List converts the object to an elemental.IdentifiablesList.

func (PrincipalAppsList) ToSparse

func (o PrincipalAppsList) ToSparse(fields ...string) elemental.Identifiables

ToSparse returns the PrincipalAppsList converted to SparsePrincipalAppsList. Objects in the list will only contain the given fields. No field means entire field set.

func (PrincipalAppsList) Version

func (o PrincipalAppsList) Version() int

Version returns the version of the content.

type PrincipalAuthTypeValue

type PrincipalAuthTypeValue string

PrincipalAuthTypeValue represents the possible values for attribute "authType".

const (
	// PrincipalAuthTypeAppToken represents the value AppToken.
	PrincipalAuthTypeAppToken PrincipalAuthTypeValue = "AppToken"

	// PrincipalAuthTypeCertificate represents the value Certificate.
	PrincipalAuthTypeCertificate PrincipalAuthTypeValue = "Certificate"

	// PrincipalAuthTypeExternal represents the value External.
	PrincipalAuthTypeExternal PrincipalAuthTypeValue = "External"

	// PrincipalAuthTypeHostname represents the value Hostname.
	PrincipalAuthTypeHostname PrincipalAuthTypeValue = "Hostname"

	// PrincipalAuthTypeTierToken represents the value TierToken.
	PrincipalAuthTypeTierToken PrincipalAuthTypeValue = "TierToken"

	// PrincipalAuthTypeToken represents the value Token.
	PrincipalAuthTypeToken PrincipalAuthTypeValue = "Token"

	// PrincipalAuthTypeUserToken represents the value UserToken.
	PrincipalAuthTypeUserToken PrincipalAuthTypeValue = "UserToken"
)

type PrincipalTypeValue

type PrincipalTypeValue string

PrincipalTypeValue represents the possible values for attribute "type".

const (
	// PrincipalTypeApp represents the value App.
	PrincipalTypeApp PrincipalTypeValue = "App"

	// PrincipalTypeUser represents the value User.
	PrincipalTypeUser PrincipalTypeValue = "User"
)

type PrincipalUser

type PrincipalUser struct {
	// Identification bit that will be used to identify the origin of the request.
	Name string `json:"name" msgpack:"name" bson:"name" mapstructure:"name,omitempty"`

	ModelVersion int `json:"-" msgpack:"-" bson:"_modelversion"`
}

PrincipalUser represents the model of a principaluser

func NewPrincipalUser

func NewPrincipalUser() *PrincipalUser

NewPrincipalUser returns a new *PrincipalUser

func (*PrincipalUser) AttributeSpecifications

func (*PrincipalUser) AttributeSpecifications() map[string]elemental.AttributeSpecification

AttributeSpecifications returns the full attribute specifications map.

func (*PrincipalUser) BleveType

func (o *PrincipalUser) BleveType() string

BleveType implements the bleve.Classifier Interface.

func (*PrincipalUser) DeepCopy

func (o *PrincipalUser) DeepCopy() *PrincipalUser

DeepCopy returns a deep copy if the PrincipalUser.

func (*PrincipalUser) DeepCopyInto

func (o *PrincipalUser) DeepCopyInto(out *PrincipalUser)

DeepCopyInto copies the receiver into the given *PrincipalUser.

func (*PrincipalUser) DefaultOrder

func (o *PrincipalUser) DefaultOrder() []string

DefaultOrder returns the list of default ordering fields.

func (*PrincipalUser) Doc

func (o *PrincipalUser) Doc() string

Doc returns the documentation for the object

func (*PrincipalUser) GetBSON

func (o *PrincipalUser) GetBSON() (any, error)

GetBSON implements the bson marshaling interface. This is used to transparently convert ID to MongoDBID as ObectID.

func (*PrincipalUser) Identifier

func (o *PrincipalUser) Identifier() string

Identifier returns the value of the object's unique identifier.

func (*PrincipalUser) Identity

func (o *PrincipalUser) Identity() elemental.Identity

Identity returns the Identity of the object.

func (*PrincipalUser) Patch

func (o *PrincipalUser) Patch(sparse elemental.SparseIdentifiable)

Patch apply the non nil value of a *SparsePrincipalUser to the object.

func (*PrincipalUser) SetBSON

func (o *PrincipalUser) SetBSON(raw bson.Raw) error

SetBSON implements the bson marshaling interface. This is used to transparently convert ID to MongoDBID as ObectID.

func (*PrincipalUser) SetIdentifier

func (o *PrincipalUser) SetIdentifier(id string)

SetIdentifier sets the value of the object's unique identifier.

func (*PrincipalUser) SpecificationForAttribute

func (*PrincipalUser) SpecificationForAttribute(name string) elemental.AttributeSpecification

SpecificationForAttribute returns the AttributeSpecification for the given attribute name key.

func (*PrincipalUser) String

func (o *PrincipalUser) String() string

func (*PrincipalUser) ToSparse

func (o *PrincipalUser) ToSparse(fields ...string) elemental.SparseIdentifiable

ToSparse returns the sparse version of the model. The returned object will only contain the given fields. No field means entire field set.

func (*PrincipalUser) Validate

func (o *PrincipalUser) Validate() error

Validate valides the current information stored into the structure.

func (*PrincipalUser) ValueForAttribute

func (o *PrincipalUser) ValueForAttribute(name string) any

ValueForAttribute returns the value for the given attribute. This is a very advanced function that you should not need but in some very specific use cases.

func (*PrincipalUser) Version

func (o *PrincipalUser) Version() int

Version returns the hardcoded version of the model.

type PrincipalUsersList

type PrincipalUsersList []*PrincipalUser

PrincipalUsersList represents a list of PrincipalUsers

func (PrincipalUsersList) Append

Append appends the objects to the a new copy of the PrincipalUsersList.

func (PrincipalUsersList) Copy

Copy returns a pointer to a copy the PrincipalUsersList.

func (PrincipalUsersList) DefaultOrder

func (o PrincipalUsersList) DefaultOrder() []string

DefaultOrder returns the default ordering fields of the content.

func (PrincipalUsersList) Identity

func (o PrincipalUsersList) Identity() elemental.Identity

Identity returns the identity of the objects in the list.

func (PrincipalUsersList) List

List converts the object to an elemental.IdentifiablesList.

func (PrincipalUsersList) ToSparse

func (o PrincipalUsersList) ToSparse(fields ...string) elemental.Identifiables

ToSparse returns the PrincipalUsersList converted to SparsePrincipalUsersList. Objects in the list will only contain the given fields. No field means entire field set.

func (PrincipalUsersList) Version

func (o PrincipalUsersList) Version() int

Version returns the version of the content.

type PrincipalsList

type PrincipalsList []*Principal

PrincipalsList represents a list of Principals

func (PrincipalsList) Append

Append appends the objects to the a new copy of the PrincipalsList.

func (PrincipalsList) Copy

Copy returns a pointer to a copy the PrincipalsList.

func (PrincipalsList) DefaultOrder

func (o PrincipalsList) DefaultOrder() []string

DefaultOrder returns the default ordering fields of the content.

func (PrincipalsList) Identity

func (o PrincipalsList) Identity() elemental.Identity

Identity returns the identity of the objects in the list.

func (PrincipalsList) List

List converts the object to an elemental.IdentifiablesList.

func (PrincipalsList) ToSparse

func (o PrincipalsList) ToSparse(fields ...string) elemental.Identifiables

ToSparse returns the PrincipalsList converted to SparsePrincipalsList. Objects in the list will only contain the given fields. No field means entire field set.

func (PrincipalsList) Version

func (o PrincipalsList) Version() int

Version returns the version of the content.

type Root

type Root struct {
	ModelVersion int `json:"-" msgpack:"-" bson:"_modelversion"`
}

Root represents the model of a root

func NewRoot

func NewRoot() *Root

NewRoot returns a new *Root

func (*Root) AttributeSpecifications

func (*Root) AttributeSpecifications() map[string]elemental.AttributeSpecification

AttributeSpecifications returns the full attribute specifications map.

func (*Root) BleveType

func (o *Root) BleveType() string

BleveType implements the bleve.Classifier Interface.

func (*Root) DeepCopy

func (o *Root) DeepCopy() *Root

DeepCopy returns a deep copy if the Root.

func (*Root) DeepCopyInto

func (o *Root) DeepCopyInto(out *Root)

DeepCopyInto copies the receiver into the given *Root.

func (*Root) DefaultOrder

func (o *Root) DefaultOrder() []string

DefaultOrder returns the list of default ordering fields.

func (*Root) Doc

func (o *Root) Doc() string

Doc returns the documentation for the object

func (*Root) GetBSON

func (o *Root) GetBSON() (any, error)

GetBSON implements the bson marshaling interface. This is used to transparently convert ID to MongoDBID as ObectID.

func (*Root) Identifier

func (o *Root) Identifier() string

Identifier returns the value of the object's unique identifier.

func (*Root) Identity

func (o *Root) Identity() elemental.Identity

Identity returns the Identity of the object.

func (*Root) SetBSON

func (o *Root) SetBSON(raw bson.Raw) error

SetBSON implements the bson marshaling interface. This is used to transparently convert ID to MongoDBID as ObectID.

func (*Root) SetIdentifier

func (o *Root) SetIdentifier(id string)

SetIdentifier sets the value of the object's unique identifier.

func (*Root) SpecificationForAttribute

func (*Root) SpecificationForAttribute(name string) elemental.AttributeSpecification

SpecificationForAttribute returns the AttributeSpecification for the given attribute name key.

func (*Root) String

func (o *Root) String() string

func (*Root) Validate

func (o *Root) Validate() error

Validate valides the current information stored into the structure.

func (*Root) ValueForAttribute

func (o *Root) ValueForAttribute(name string) any

ValueForAttribute returns the value for the given attribute. This is a very advanced function that you should not need but in some very specific use cases.

func (*Root) Version

func (o *Root) Version() int

Version returns the hardcoded version of the model.

type SparseAnalyzer

type SparseAnalyzer struct {
	// ID is the identifier of the object.
	ID *string `json:"ID,omitempty" msgpack:"ID,omitempty" bson:"-" mapstructure:"ID,omitempty"`

	// The description of the analyzer.
	Description *string `json:"description,omitempty" msgpack:"description,omitempty" bson:"-" mapstructure:"description,omitempty"`

	// The detectors the analyzer can use.
	Detectors *[]*Detector `json:"detectors,omitempty" msgpack:"detectors,omitempty" bson:"-" mapstructure:"detectors,omitempty"`

	// Tell if the analyzer is enabled by default.
	Enabled *bool `json:"enabled,omitempty" msgpack:"enabled,omitempty" bson:"-" mapstructure:"enabled,omitempty"`

	// The group the analyzer belongs to.
	Group *string `json:"group,omitempty" msgpack:"group,omitempty" bson:"-" mapstructure:"group,omitempty"`

	// The models used by the analyzer.
	Models *[]*AnalyzerModel `json:"models,omitempty" msgpack:"models,omitempty" bson:"-" mapstructure:"models,omitempty"`

	// The name of the analyzer.
	Name *string `json:"name,omitempty" msgpack:"name,omitempty" bson:"-" mapstructure:"name,omitempty"`

	// The namespace of the object.
	Namespace *string `json:"namespace,omitempty" msgpack:"namespace,omitempty" bson:"namespace,omitempty" mapstructure:"namespace,omitempty"`

	// A list of trigger or globl pattern that the analyzer will react on.
	// A trigger is the detector Group and Name separated with a /.
	Triggers *[]string `json:"triggers,omitempty" msgpack:"triggers,omitempty" bson:"-" mapstructure:"triggers,omitempty"`

	ModelVersion int `json:"-" msgpack:"-" bson:"_modelversion"`
}

SparseAnalyzer represents the sparse version of a analyzer.

func NewSparseAnalyzer

func NewSparseAnalyzer() *SparseAnalyzer

NewSparseAnalyzer returns a new SparseAnalyzer.

func (*SparseAnalyzer) DeepCopy

func (o *SparseAnalyzer) DeepCopy() *SparseAnalyzer

DeepCopy returns a deep copy if the SparseAnalyzer.

func (*SparseAnalyzer) DeepCopyInto

func (o *SparseAnalyzer) DeepCopyInto(out *SparseAnalyzer)

DeepCopyInto copies the receiver into the given *SparseAnalyzer.

func (*SparseAnalyzer) GetBSON

func (o *SparseAnalyzer) GetBSON() (any, error)

GetBSON implements the bson marshaling interface. This is used to transparently convert ID to MongoDBID as ObectID.

func (*SparseAnalyzer) GetNamespace

func (o *SparseAnalyzer) GetNamespace() (out string)

GetNamespace returns the Namespace of the receiver.

func (*SparseAnalyzer) Identifier

func (o *SparseAnalyzer) Identifier() string

Identifier returns the value of the sparse object's unique identifier.

func (*SparseAnalyzer) Identity

func (o *SparseAnalyzer) Identity() elemental.Identity

Identity returns the Identity of the sparse object.

func (*SparseAnalyzer) SetBSON

func (o *SparseAnalyzer) SetBSON(raw bson.Raw) error

SetBSON implements the bson marshaling interface. This is used to transparently convert ID to MongoDBID as ObectID.

func (*SparseAnalyzer) SetIdentifier

func (o *SparseAnalyzer) SetIdentifier(id string)

SetIdentifier sets the value of the sparse object's unique identifier.

func (*SparseAnalyzer) SetNamespace

func (o *SparseAnalyzer) SetNamespace(namespace string)

SetNamespace sets the property Namespace of the receiver using the address of the given value.

func (*SparseAnalyzer) ToPlain

ToPlain returns the plain version of the sparse model.

func (*SparseAnalyzer) Version

func (o *SparseAnalyzer) Version() int

Version returns the hardcoded version of the model.

type SparseAnalyzersList

type SparseAnalyzersList []*SparseAnalyzer

SparseAnalyzersList represents a list of SparseAnalyzers

func (SparseAnalyzersList) Append

Append appends the objects to the a new copy of the SparseAnalyzersList.

func (SparseAnalyzersList) Copy

Copy returns a pointer to a copy the SparseAnalyzersList.

func (SparseAnalyzersList) DefaultOrder

func (o SparseAnalyzersList) DefaultOrder() []string

DefaultOrder returns the default ordering fields of the content.

func (SparseAnalyzersList) Identity

func (o SparseAnalyzersList) Identity() elemental.Identity

Identity returns the identity of the objects in the list.

func (SparseAnalyzersList) List

List converts the object to an elemental.IdentifiablesList.

func (SparseAnalyzersList) ToPlain

ToPlain returns the SparseAnalyzersList converted to AnalyzersList.

func (SparseAnalyzersList) Version

func (o SparseAnalyzersList) Version() int

Version returns the version of the content.

type SparseLatenciesList

type SparseLatenciesList []*SparseLatency

SparseLatenciesList represents a list of SparseLatencies

func (SparseLatenciesList) Append

Append appends the objects to the a new copy of the SparseLatenciesList.

func (SparseLatenciesList) Copy

Copy returns a pointer to a copy the SparseLatenciesList.

func (SparseLatenciesList) DefaultOrder

func (o SparseLatenciesList) DefaultOrder() []string

DefaultOrder returns the default ordering fields of the content.

func (SparseLatenciesList) Identity

func (o SparseLatenciesList) Identity() elemental.Identity

Identity returns the identity of the objects in the list.

func (SparseLatenciesList) List

List converts the object to an elemental.IdentifiablesList.

func (SparseLatenciesList) ToPlain

ToPlain returns the SparseLatenciesList converted to LatenciesList.

func (SparseLatenciesList) Version

func (o SparseLatenciesList) Version() int

Version returns the version of the content.

type SparseLatency

type SparseLatency struct {
	// How much time it took to run the access policy in nanoseconds.
	AccessPolicy *int `` /* 130-byte string literal not displayed */

	// How much time it took to run content analysis in nanoseconds.
	Analysis *int `json:"analysis,omitempty" msgpack:"analysis,omitempty" bson:"analysis,omitempty" mapstructure:"analysis,omitempty"`

	// How much time it took to run the assign policy in nanoseconds.
	AssignPolicy *int `` /* 130-byte string literal not displayed */

	// How much time it took to run content policy in nanoseconds.
	ContentPolicy *int `` /* 134-byte string literal not displayed */

	// How much time it took to run input or output extraction in nanoseconds.
	Extraction *int `json:"extraction,omitempty" msgpack:"extraction,omitempty" bson:"extraction,omitempty" mapstructure:"extraction,omitempty"`

	ModelVersion int `json:"-" msgpack:"-" bson:"_modelversion"`
}

SparseLatency represents the sparse version of a latency.

func NewSparseLatency

func NewSparseLatency() *SparseLatency

NewSparseLatency returns a new SparseLatency.

func (*SparseLatency) DeepCopy

func (o *SparseLatency) DeepCopy() *SparseLatency

DeepCopy returns a deep copy if the SparseLatency.

func (*SparseLatency) DeepCopyInto

func (o *SparseLatency) DeepCopyInto(out *SparseLatency)

DeepCopyInto copies the receiver into the given *SparseLatency.

func (*SparseLatency) GetBSON

func (o *SparseLatency) GetBSON() (any, error)

GetBSON implements the bson marshaling interface. This is used to transparently convert ID to MongoDBID as ObectID.

func (*SparseLatency) Identifier

func (o *SparseLatency) Identifier() string

Identifier returns the value of the sparse object's unique identifier.

func (*SparseLatency) Identity

func (o *SparseLatency) Identity() elemental.Identity

Identity returns the Identity of the sparse object.

func (*SparseLatency) SetBSON

func (o *SparseLatency) SetBSON(raw bson.Raw) error

SetBSON implements the bson marshaling interface. This is used to transparently convert ID to MongoDBID as ObectID.

func (*SparseLatency) SetIdentifier

func (o *SparseLatency) SetIdentifier(id string)

SetIdentifier sets the value of the sparse object's unique identifier.

func (*SparseLatency) ToPlain

ToPlain returns the plain version of the sparse model.

func (*SparseLatency) Version

func (o *SparseLatency) Version() int

Version returns the hardcoded version of the model.

type SparsePrincipal

type SparsePrincipal struct {
	// The application principal information if type is App.
	App *PrincipalApp `json:"app,omitempty" msgpack:"app,omitempty" bson:"app,omitempty" mapstructure:"app,omitempty"`

	// The type of authentication.
	AuthType *PrincipalAuthTypeValue `json:"authType,omitempty" msgpack:"authType,omitempty" bson:"authtype,omitempty" mapstructure:"authType,omitempty"`

	// List of claims extracted from the user query.
	Claims *[]string `json:"claims,omitempty" msgpack:"claims,omitempty" bson:"claims,omitempty" mapstructure:"claims,omitempty"`

	// The team that was used to authorize the request.
	Team *string `json:"team,omitempty" msgpack:"team,omitempty" bson:"team,omitempty" mapstructure:"team,omitempty"`

	// The name of the token, if any.
	TokenName *string `json:"tokenName,omitempty" msgpack:"tokenName,omitempty" bson:"tokenname,omitempty" mapstructure:"tokenName,omitempty"`

	// The type of principal.
	Type *PrincipalTypeValue `json:"type,omitempty" msgpack:"type,omitempty" bson:"type,omitempty" mapstructure:"type,omitempty"`

	// The user principal information if type is User.
	User *PrincipalUser `json:"user,omitempty" msgpack:"user,omitempty" bson:"user,omitempty" mapstructure:"user,omitempty"`

	ModelVersion int `json:"-" msgpack:"-" bson:"_modelversion"`
}

SparsePrincipal represents the sparse version of a principal.

func NewSparsePrincipal

func NewSparsePrincipal() *SparsePrincipal

NewSparsePrincipal returns a new SparsePrincipal.

func (*SparsePrincipal) DeepCopy

func (o *SparsePrincipal) DeepCopy() *SparsePrincipal

DeepCopy returns a deep copy if the SparsePrincipal.

func (*SparsePrincipal) DeepCopyInto

func (o *SparsePrincipal) DeepCopyInto(out *SparsePrincipal)

DeepCopyInto copies the receiver into the given *SparsePrincipal.

func (*SparsePrincipal) GetBSON

func (o *SparsePrincipal) GetBSON() (any, error)

GetBSON implements the bson marshaling interface. This is used to transparently convert ID to MongoDBID as ObectID.

func (*SparsePrincipal) Identifier

func (o *SparsePrincipal) Identifier() string

Identifier returns the value of the sparse object's unique identifier.

func (*SparsePrincipal) Identity

func (o *SparsePrincipal) Identity() elemental.Identity

Identity returns the Identity of the sparse object.

func (*SparsePrincipal) SetBSON

func (o *SparsePrincipal) SetBSON(raw bson.Raw) error

SetBSON implements the bson marshaling interface. This is used to transparently convert ID to MongoDBID as ObectID.

func (*SparsePrincipal) SetIdentifier

func (o *SparsePrincipal) SetIdentifier(id string)

SetIdentifier sets the value of the sparse object's unique identifier.

func (*SparsePrincipal) ToPlain

ToPlain returns the plain version of the sparse model.

func (*SparsePrincipal) Version

func (o *SparsePrincipal) Version() int

Version returns the hardcoded version of the model.

type SparsePrincipalApp

type SparsePrincipalApp struct {
	// The list of labels attached to an application request.
	Labels *[]string `json:"labels,omitempty" msgpack:"labels,omitempty" bson:"labels,omitempty" mapstructure:"labels,omitempty"`

	// The name of the application.
	Name *string `json:"name,omitempty" msgpack:"name,omitempty" bson:"name,omitempty" mapstructure:"name,omitempty"`

	// The tier of the application request.
	Tier *string `json:"tier,omitempty" msgpack:"tier,omitempty" bson:"tier,omitempty" mapstructure:"tier,omitempty"`

	ModelVersion int `json:"-" msgpack:"-" bson:"_modelversion"`
}

SparsePrincipalApp represents the sparse version of a principalapp.

func NewSparsePrincipalApp

func NewSparsePrincipalApp() *SparsePrincipalApp

NewSparsePrincipalApp returns a new SparsePrincipalApp.

func (*SparsePrincipalApp) DeepCopy

func (o *SparsePrincipalApp) DeepCopy() *SparsePrincipalApp

DeepCopy returns a deep copy if the SparsePrincipalApp.

func (*SparsePrincipalApp) DeepCopyInto

func (o *SparsePrincipalApp) DeepCopyInto(out *SparsePrincipalApp)

DeepCopyInto copies the receiver into the given *SparsePrincipalApp.

func (*SparsePrincipalApp) GetBSON

func (o *SparsePrincipalApp) GetBSON() (any, error)

GetBSON implements the bson marshaling interface. This is used to transparently convert ID to MongoDBID as ObectID.

func (*SparsePrincipalApp) Identifier

func (o *SparsePrincipalApp) Identifier() string

Identifier returns the value of the sparse object's unique identifier.

func (*SparsePrincipalApp) Identity

func (o *SparsePrincipalApp) Identity() elemental.Identity

Identity returns the Identity of the sparse object.

func (*SparsePrincipalApp) SetBSON

func (o *SparsePrincipalApp) SetBSON(raw bson.Raw) error

SetBSON implements the bson marshaling interface. This is used to transparently convert ID to MongoDBID as ObectID.

func (*SparsePrincipalApp) SetIdentifier

func (o *SparsePrincipalApp) SetIdentifier(id string)

SetIdentifier sets the value of the sparse object's unique identifier.

func (*SparsePrincipalApp) ToPlain

ToPlain returns the plain version of the sparse model.

func (*SparsePrincipalApp) Version

func (o *SparsePrincipalApp) Version() int

Version returns the hardcoded version of the model.

type SparsePrincipalAppsList

type SparsePrincipalAppsList []*SparsePrincipalApp

SparsePrincipalAppsList represents a list of SparsePrincipalApps

func (SparsePrincipalAppsList) Append

Append appends the objects to the a new copy of the SparsePrincipalAppsList.

func (SparsePrincipalAppsList) Copy

Copy returns a pointer to a copy the SparsePrincipalAppsList.

func (SparsePrincipalAppsList) DefaultOrder

func (o SparsePrincipalAppsList) DefaultOrder() []string

DefaultOrder returns the default ordering fields of the content.

func (SparsePrincipalAppsList) Identity

Identity returns the identity of the objects in the list.

func (SparsePrincipalAppsList) List

List converts the object to an elemental.IdentifiablesList.

func (SparsePrincipalAppsList) ToPlain

ToPlain returns the SparsePrincipalAppsList converted to PrincipalAppsList.

func (SparsePrincipalAppsList) Version

func (o SparsePrincipalAppsList) Version() int

Version returns the version of the content.

type SparsePrincipalUser

type SparsePrincipalUser struct {
	// Identification bit that will be used to identify the origin of the request.
	Name *string `json:"name,omitempty" msgpack:"name,omitempty" bson:"name,omitempty" mapstructure:"name,omitempty"`

	ModelVersion int `json:"-" msgpack:"-" bson:"_modelversion"`
}

SparsePrincipalUser represents the sparse version of a principaluser.

func NewSparsePrincipalUser

func NewSparsePrincipalUser() *SparsePrincipalUser

NewSparsePrincipalUser returns a new SparsePrincipalUser.

func (*SparsePrincipalUser) DeepCopy

DeepCopy returns a deep copy if the SparsePrincipalUser.

func (*SparsePrincipalUser) DeepCopyInto

func (o *SparsePrincipalUser) DeepCopyInto(out *SparsePrincipalUser)

DeepCopyInto copies the receiver into the given *SparsePrincipalUser.

func (*SparsePrincipalUser) GetBSON

func (o *SparsePrincipalUser) GetBSON() (any, error)

GetBSON implements the bson marshaling interface. This is used to transparently convert ID to MongoDBID as ObectID.

func (*SparsePrincipalUser) Identifier

func (o *SparsePrincipalUser) Identifier() string

Identifier returns the value of the sparse object's unique identifier.

func (*SparsePrincipalUser) Identity

func (o *SparsePrincipalUser) Identity() elemental.Identity

Identity returns the Identity of the sparse object.

func (*SparsePrincipalUser) SetBSON

func (o *SparsePrincipalUser) SetBSON(raw bson.Raw) error

SetBSON implements the bson marshaling interface. This is used to transparently convert ID to MongoDBID as ObectID.

func (*SparsePrincipalUser) SetIdentifier

func (o *SparsePrincipalUser) SetIdentifier(id string)

SetIdentifier sets the value of the sparse object's unique identifier.

func (*SparsePrincipalUser) ToPlain

ToPlain returns the plain version of the sparse model.

func (*SparsePrincipalUser) Version

func (o *SparsePrincipalUser) Version() int

Version returns the hardcoded version of the model.

type SparsePrincipalUsersList

type SparsePrincipalUsersList []*SparsePrincipalUser

SparsePrincipalUsersList represents a list of SparsePrincipalUsers

func (SparsePrincipalUsersList) Append

Append appends the objects to the a new copy of the SparsePrincipalUsersList.

func (SparsePrincipalUsersList) Copy

Copy returns a pointer to a copy the SparsePrincipalUsersList.

func (SparsePrincipalUsersList) DefaultOrder

func (o SparsePrincipalUsersList) DefaultOrder() []string

DefaultOrder returns the default ordering fields of the content.

func (SparsePrincipalUsersList) Identity

Identity returns the identity of the objects in the list.

func (SparsePrincipalUsersList) List

List converts the object to an elemental.IdentifiablesList.

func (SparsePrincipalUsersList) ToPlain

ToPlain returns the SparsePrincipalUsersList converted to PrincipalUsersList.

func (SparsePrincipalUsersList) Version

func (o SparsePrincipalUsersList) Version() int

Version returns the version of the content.

type SparsePrincipalsList

type SparsePrincipalsList []*SparsePrincipal

SparsePrincipalsList represents a list of SparsePrincipals

func (SparsePrincipalsList) Append

Append appends the objects to the a new copy of the SparsePrincipalsList.

func (SparsePrincipalsList) Copy

Copy returns a pointer to a copy the SparsePrincipalsList.

func (SparsePrincipalsList) DefaultOrder

func (o SparsePrincipalsList) DefaultOrder() []string

DefaultOrder returns the default ordering fields of the content.

func (SparsePrincipalsList) Identity

Identity returns the identity of the objects in the list.

func (SparsePrincipalsList) List

List converts the object to an elemental.IdentifiablesList.

func (SparsePrincipalsList) ToPlain

ToPlain returns the SparsePrincipalsList converted to PrincipalsList.

func (SparsePrincipalsList) Version

func (o SparsePrincipalsList) Version() int

Version returns the version of the content.

type TextualDetection

type TextualDetection struct {
	// The original detected content.
	Content string `json:"-" msgpack:"-" bson:"-" mapstructure:"-,omitempty"`

	// The end position of the detection in the original data.
	End int `json:"end" msgpack:"end" bson:"end" mapstructure:"end,omitempty"`

	// The key that is used in the name's place, If empty, a sequence of X's are used.
	Key string `json:"key,omitempty" msgpack:"key,omitempty" bson:"key,omitempty" mapstructure:"key,omitempty"`

	// The name of the detection.
	Name string `json:"name,omitempty" msgpack:"name,omitempty" bson:"name,omitempty" mapstructure:"name,omitempty"`

	// If true this detection has been redacted.
	Redacted bool `json:"redacted,omitempty" msgpack:"redacted,omitempty" bson:"redacted,omitempty" mapstructure:"redacted,omitempty"`

	// The end position of the detection in the redacted data.
	RedactedEnd int `` /* 126-byte string literal not displayed */

	// The start position of the detection in the redacted data.
	RedactedStart int `` /* 134-byte string literal not displayed */

	// The confidence score of the detection.
	Score float64 `json:"score" msgpack:"score" bson:"score" mapstructure:"score,omitempty"`

	// The start position of the detection in the original data.
	Start int `json:"start" msgpack:"start" bson:"start" mapstructure:"start,omitempty"`

	// The type of detection.
	Type TextualDetectionTypeValue `json:"type" msgpack:"type" bson:"type" mapstructure:"type,omitempty"`

	ModelVersion int `json:"-" msgpack:"-" bson:"_modelversion"`
}

TextualDetection represents the model of a textualdetection

func NewTextualDetection

func NewTextualDetection() *TextualDetection

NewTextualDetection returns a new *TextualDetection

func (*TextualDetection) AttributeSpecifications

func (*TextualDetection) AttributeSpecifications() map[string]elemental.AttributeSpecification

AttributeSpecifications returns the full attribute specifications map.

func (*TextualDetection) BleveType

func (o *TextualDetection) BleveType() string

BleveType implements the bleve.Classifier Interface.

func (*TextualDetection) DeepCopy

func (o *TextualDetection) DeepCopy() *TextualDetection

DeepCopy returns a deep copy if the TextualDetection.

func (*TextualDetection) DeepCopyInto

func (o *TextualDetection) DeepCopyInto(out *TextualDetection)

DeepCopyInto copies the receiver into the given *TextualDetection.

func (*TextualDetection) GetBSON

func (o *TextualDetection) GetBSON() (any, error)

GetBSON implements the bson marshaling interface. This is used to transparently convert ID to MongoDBID as ObectID.

func (*TextualDetection) SetBSON

func (o *TextualDetection) SetBSON(raw bson.Raw) error

SetBSON implements the bson marshaling interface. This is used to transparently convert ID to MongoDBID as ObectID.

func (*TextualDetection) SpecificationForAttribute

func (*TextualDetection) SpecificationForAttribute(name string) elemental.AttributeSpecification

SpecificationForAttribute returns the AttributeSpecification for the given attribute name key.

func (*TextualDetection) Validate

func (o *TextualDetection) Validate() error

Validate valides the current information stored into the structure.

func (*TextualDetection) ValueForAttribute

func (o *TextualDetection) ValueForAttribute(name string) any

ValueForAttribute returns the value for the given attribute. This is a very advanced function that you should not need but in some very specific use cases.

type TextualDetectionTypeValue

type TextualDetectionTypeValue string

TextualDetectionTypeValue represents the possible values for attribute "type".

const (
	// TextualDetectionTypeKeyword represents the value Keyword.
	TextualDetectionTypeKeyword TextualDetectionTypeValue = "Keyword"

	// TextualDetectionTypePII represents the value PII.
	TextualDetectionTypePII TextualDetectionTypeValue = "PII"

	// TextualDetectionTypeSecret represents the value Secret.
	TextualDetectionTypeSecret TextualDetectionTypeValue = "Secret"
)

Jump to

Keyboard shortcuts

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