schema

package
v0.1.0-beta.202310111440 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2023 License: AGPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// require blocks
	BlockTypeSteampipe = "steampipe"
	BlockTypeMod       = "mod"
	BlockTypePlugin    = "plugin"
	// resource blocks
	BlockTypeQuery          = "query"
	BlockTypeControl        = "control"
	BlockTypeBenchmark      = "benchmark"
	BlockTypeDashboard      = "dashboard"
	BlockTypeContainer      = "container"
	BlockTypeChart          = "chart"
	BlockTypeCard           = "card"
	BlockTypeFlow           = "flow"
	BlockTypeGraph          = "graph"
	BlockTypeHierarchy      = "hierarchy"
	BlockTypeImage          = "image"
	BlockTypeInput          = "input"
	BlockTypeTable          = "table"
	BlockTypeText           = "text"
	BlockTypeLocals         = "locals"
	BlockTypeVariable       = "variable"
	BlockTypeParam          = "param"
	BlockTypeRequire        = "require"
	BlockTypeNode           = "node"
	BlockTypeEdge           = "edge"
	BlockTypeLegacyRequires = "requires"
	BlockTypeCategory       = "category"
	BlockTypeWith           = "with"
	BlockTypeError          = "error"

	// config blocks
	BlockTypeConnection       = "connection"
	BlockTypeOptions          = "options"
	BlockTypeWorkspaceProfile = "workspace"
	BlockTypePipeline         = "pipeline"
	BlockTypePipelineStep     = "step"
	BlockTypePipelineOutput   = "output"
	BlockTypeTrigger          = "trigger"

	AttributeTypeValue     = "value"
	AttributeTypeSensitive = "sensitive"

	AttributeTypeType    = "type"
	AttributeTypeDefault = "default"

	// Pipeline blocks
	BlockTypePipelineStepHttp     = "http"
	BlockTypePipelineStepSleep    = "sleep"
	BlockTypePipelineStepEmail    = "email"
	BlockTypePipelineStepEcho     = "echo"
	BlockTypePipelineStepQuery    = "query"
	BlockTypePipelineStepExec     = "exec"
	BlockTypePipelineStepPipeline = "pipeline"

	// error block
	AttributeTypeIgnore  = "ignore"
	AttributeTypeRetries = "retries"

	// Common step attributes
	AttributeTypeTitle       = "title"
	AttributeTypeDependsOn   = "depends_on"
	AttributeTypeForEach     = "for_each"
	AttributeTypeDescription = "description"
	AttributeTypeIf          = "if"

	// pipeline attributes
	AttributeTypeTags          = "tags"
	AttributeTypeDocumentation = "documentation"

	AttributeTypeStartedAt  = "started_at"
	AttributeTypeFinishedAt = "finished_at"

	// Used by query step
	AttributeTypeSql              = "sql"
	AttributeTypeArgs             = "args"
	AttributeTypeQuery            = "query"
	AttributeTypeRows             = "rows"
	AttributeTypeConnectionString = "connection_string"

	// Used by email step
	AttributeTypeBcc              = "bcc"
	AttributeTypeBody             = "body"
	AttributeTypeCc               = "cc"
	AttributeTypeContentType      = "content_type"
	AttributeTypeFrom             = "from"
	AttributeTypeHost             = "host"
	AttributeTypePort             = "port"
	AttributeTypeSenderCredential = "sender_credential" //nolint:gosec // Getting Potential hardcoded credentials warning
	AttributeTypeSenderName       = "sender_name"
	AttributeTypeSubject          = "subject"
	AttributeTypeTo               = "to"

	// Used by sleep step
	AttributeTypeDuration = "duration"

	// Used by http step
	AttributeTypeUrl              = "url"
	AttributeTypeMethod           = "method"
	AttributeTypeRequestBody      = "request_body"
	AttributeTypeRequestHeaders   = "request_headers"
	AttributeTypeRequestTimeoutMs = "request_timeout_ms"
	AttributeTypeCaCertPem        = "ca_cert_pem"
	AttributeTypeInsecure         = "insecure"
	AttributeTypeResponseHeaders  = "response_headers"
	AttributeTypeResponseBody     = "response_body"
	AttributeTypeStatusCode       = "status_code"
	AttributeTypeStatus           = "status"

	// Used by echo step
	AttributeTypeText    = "text"
	AttributeTypeNumeric = "numeric"
	AttributeTypeJson    = "json"

	// Used byy Pipeline step
	AttributeTypePipeline = "pipeline"

	AttributeTypeMessage = "message"

	// All possible trigger attributes
	AttributeTypeSchedule   = "schedule"
	AttributeTypePrimaryKey = "primary_key"
	AttributeTypeEvents     = "events"

	// All Possible Trigger Types
	TriggerTypeSchedule = "schedule"
	TriggerTypeInterval = "interval"
	TriggerTypeQuery    = "query"
	TriggerTypeHttp     = "http"

	LabelName = "name"
	LabelType = "type"

	ResourceTypeSnapshot = "snapshot"
	AttributeArgs        = "args"
	AttributeQuery       = "query"

	AttributeVar   = "var"
	AttributeLocal = "local"

	AttributeEach = "each"
	AttributeKey  = "key"
)

NOTE: when adding a block type, be sure to update QueryProviderBlocks/ReferenceBlocks/AllBlockTypes as needed

Variables

View Source
var NodeAndEdgeProviderBlocks = []string{
	BlockTypeHierarchy,
	BlockTypeFlow,
	BlockTypeGraph,
}

NodeAndEdgeProviderBlocks is a list of block types which implementnodeAndEdgeProvider

QueryProviderBlocks is a list of block types which implement QueryProvider

ReferenceBlocks is a list of block types we store references for

Functions

func IsValidResourceItemType

func IsValidResourceItemType(blockType string) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

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