Documentation
¶
Index ¶
- Constants
- func CortexHTTPClient(ctx context.Context, config *SteampipeConfig) *req.Client
- func FromStructSlice[T any](field string, child string) *transform.ColumnTransforms
- func Plugin(ctx context.Context) *plugin.Plugin
- func TagArrayToMap(ctx context.Context, d *transform.TransformData) (interface{}, error)
- type Cortex
- type CortexDependency
- type CortexDependencyAWS
- type CortexDependencyCortex
- type CortexDescriptorsResponse
- type CortexEntityElement
- type CortexEntityElementHierarchy
- type CortexEntityElementMetadata
- type CortexEntityOwners
- type CortexEntityOwnersIndividual
- type CortexEntityOwnersTeam
- type CortexEntityResponse
- type CortexGit
- type CortexGithub
- type CortexInfo
- type CortexIssues
- type CortexIssuesJira
- type CortexLevel
- type CortexLink
- type CortexOncall
- type CortexOncallVictorOps
- type CortexOwner
- type CortexRelationshipsEdge
- type CortexRelationshipsResponse
- type CortexRuleInfo
- type CortexRuleScore
- type CortexScore
- type CortexScorecard
- type CortexScorecardLevel
- type CortexScorecardResponse
- type CortexScorecardScoreResponse
- type CortexScorecardScoreRow
- type CortexServiceScore
- type CortexSlack
- type CortexSlackChannel
- type CortexTag
- type CortexTeam
- type CortexTeamElement
- type CortexTeamGroup
- type CortexTeamIDPGroup
- type CortexTeamMember
- type CortexTeamResponse
- type Relationships
- type ScalarOrMap
- type SteampipeConfig
- type Tag
Constants ¶
View Source
const DefaultBaseURL = "https://api.getcortexapp.com"
Variables ¶
This section is empty.
Functions ¶
func CortexHTTPClient ¶
func CortexHTTPClient(ctx context.Context, config *SteampipeConfig) *req.Client
Create a req http client for the Cortex API. This will set the BaseURL and Auth from config, as well as common retry settings.
func FromStructSlice ¶
func FromStructSlice[T any](field string, child string) *transform.ColumnTransforms
Get field from the data and for each item of type T, get the nested field "child" always returns a string array
func TagArrayToMap ¶
func TagArrayToMap(ctx context.Context, d *transform.TransformData) (interface{}, error)
Types ¶
type Cortex ¶
type Cortex struct { Openapi string `yaml:"openapi"` Info CortexInfo `yaml:"info"` }
type CortexDependency ¶
type CortexDependency struct { Cortex []CortexDependencyCortex `yaml:"cortex,omitempty"` AWS CortexDependencyAWS `yaml:"aws,omitempty"` }
type CortexDependencyAWS ¶
type CortexDependencyAWS struct {
Tags []Tag `yaml:"tags"`
}
type CortexDependencyCortex ¶
type CortexEntityElement ¶
type CortexEntityElement struct { Name string `yaml:"name"` Tag string `yaml:"tag"` Description string `yaml:"description"` Type string `yaml:"type"` Hierarchy CortexEntityElementHierarchy `yaml:"hierarchy"` Groups []string `yaml:"groups"` Metadata []CortexEntityElementMetadata `yaml:"metadata"` LastUpdated string `yaml:"lastUpdated"` Links []CortexLink `yaml:"links"` Archived bool `yaml:"isArchived"` Git CortexGithub `yaml:"git"` Slack []CortexSlackChannel `yaml:"slackChannels"` Owners CortexEntityOwners `yaml:"owners"` }
type CortexEntityElementHierarchy ¶
type CortexEntityElementHierarchy struct {
Parents []CortexTag `yaml:"parents"`
}
type CortexEntityElementMetadata ¶
type CortexEntityElementMetadata struct { Key string `yaml:"key"` Value ScalarOrMap `yaml:"value"` }
type CortexEntityOwners ¶
type CortexEntityOwners struct { Teams []CortexEntityOwnersTeam `yaml:"teams"` Individuals []CortexEntityOwnersIndividual `yaml:"individuals"` }
type CortexEntityOwnersIndividual ¶
type CortexEntityOwnersIndividual struct {
Email string `yaml:"email"`
}
type CortexEntityOwnersTeam ¶
type CortexEntityOwnersTeam struct {
Tag string `yaml:"tag"`
}
type CortexEntityResponse ¶
type CortexEntityResponse struct { Entities []CortexEntityElement `yaml:"entities"` Page int `yaml:"page"` TotalPages int `yaml:"totalPages"` Total int `yaml:"total"` }
type CortexGit ¶
type CortexGit struct {
Github CortexGithub `yaml:"github"`
}
type CortexGithub ¶
type CortexInfo ¶
type CortexInfo struct { Tag string `yaml:"x-cortex-tag"` Title string `yaml:"title"` Description string `yaml:"description,omitempty"` Type string `yaml:"x-cortex-type,omitempty"` Parents []CortexTag `yaml:"x-cortex-parents,omitempty"` Groups []string `yaml:"x-cortex-groups,omitempty"` Team CortexTeam `yaml:"x-cortex-team,omitempty"` Owners []CortexOwner `yaml:"x-cortex-owners,omitempty"` Slack CortexSlack `yaml:"x-cortex-slack,omitempty"` Link []CortexLink `yaml:"x-cortex-link,omitempty"` CustomMetadata map[string]interface{} `yaml:"x-cortex-custom-metadata,omitempty"` Git CortexGit `yaml:"x-cortex-git,omitempty"` Oncall CortexOncall `yaml:"x-cortex-oncall,omitempty"` Issues CortexIssues `yaml:"x-cortex-issues,omitempty"` Dependency CortexDependency `yaml:"x-cortex-dependency,omitempty"` }
type CortexIssues ¶
type CortexIssues struct {
Jira CortexIssuesJira `yaml:"jira"`
}
type CortexIssuesJira ¶
type CortexIssuesJira struct {
Projects []string `yaml:"projects"`
}
type CortexLevel ¶
type CortexLink ¶
type CortexOncall ¶
type CortexOncall struct {
VictorOps CortexOncallVictorOps `yaml:"victorops"`
}
type CortexOncallVictorOps ¶
type CortexOwner ¶
type CortexRelationshipsEdge ¶
type CortexRelationshipsResponse ¶
type CortexRelationshipsResponse struct {
Edges []CortexRelationshipsEdge `yaml:"edges"`
}
type CortexRuleInfo ¶
type CortexRuleInfo struct { Description string `yaml:"description"` EffectiveFrom string `yaml:"effectiveFrom"` Identifier string `yaml:"identifier"` LevelName string `yaml:"levelName"` Title string `yaml:"title"` Weight int `yaml:"weight"` // Not in the API response, but used to enrich the data LevelNumber int `yaml:"-"` }
type CortexRuleScore ¶
type CortexScore ¶
type CortexScore struct {
Rules []*CortexRuleScore `yaml:"rules"`
}
type CortexScorecard ¶
type CortexScorecard struct { Levels []*CortexScorecardLevel `yaml:"levels"` Rules []*CortexRuleInfo `yaml:"rules"` }
type CortexScorecardLevel ¶
type CortexScorecardLevel struct {
Level CortexLevel `yaml:"level"`
}
type CortexScorecardResponse ¶
type CortexScorecardResponse struct {
Scorecard CortexScorecard `yaml:"scorecard"`
}
Response elements for the /scorecard/{tag} endpoint
type CortexScorecardScoreResponse ¶
type CortexScorecardScoreResponse struct { ScorecardName string `yaml:"scorecardName"` ScorecardTag string `yaml:"scorecardTag"` ServiceScores []*CortexServiceScore `yaml:"serviceScores"` Page int `yaml:"page"` TotalPages int `yaml:"totalPages"` Total int `yaml:"total"` }
Response elements for the /scorecards/{tag}/scores endpoint
type CortexScorecardScoreRow ¶
type CortexScorecardScoreRow struct { ScorecardName string ScorecardTag string LastEvaluated string Service *CortexEntityElement RuleScore *CortexRuleScore RuleInfo *CortexRuleInfo }
Used to represent the data we want to return in the table
func (*CortexScorecardScoreRow) IsRulePass ¶
func (r *CortexScorecardScoreRow) IsRulePass() bool
type CortexServiceScore ¶
type CortexServiceScore struct { LastEvaluated string `yaml:"lastEvaluated"` Service *CortexEntityElement `yaml:"service"` Score *CortexScore `yaml:"score"` }
type CortexSlack ¶
type CortexSlack struct {
Channels []CortexSlackChannel `yaml:"channels"`
}
type CortexSlackChannel ¶
type CortexTeam ¶
type CortexTeam struct { Groups []CortexTeamGroup `yaml:"groups,omitempty"` Members []CortexTeamMember `yaml:"members,omitempty"` }
type CortexTeamElement ¶
type CortexTeamElement struct { Tag string `yaml:"teamTag"` Metadata map[string]interface{} `yaml:"metadata"` Links []CortexLink `yaml:"links"` Archived bool `yaml:"isArchived"` Slack []CortexSlackChannel `yaml:"slackChannels"` IDPGroup CortexTeamIDPGroup `yaml:"idpGroup"` // Enriched data Children []string `yaml:"-"` Parents []string `yaml:"-"` }
type CortexTeamGroup ¶
type CortexTeamIDPGroup ¶
type CortexTeamIDPGroup struct { Group string `yaml:"group"` Provider string `yaml:"provider"` Members []CortexTeamMember `yaml:"members"` }
type CortexTeamMember ¶
type CortexTeamResponse ¶
type CortexTeamResponse struct {
Teams []CortexTeamElement `yaml:"teams"`
}
type Relationships ¶
type ScalarOrMap ¶
type ScalarOrMap struct { Scalar interface{} Map map[string]interface{} }
func (*ScalarOrMap) UnmarshalYAML ¶
func (s *ScalarOrMap) UnmarshalYAML(unmarshal func(interface{}) error) error
func (*ScalarOrMap) Value ¶
func (s *ScalarOrMap) Value() interface{}
type SteampipeConfig ¶
func GetConfig ¶
func GetConfig(connection *plugin.Connection) *SteampipeConfig
func NewSteampipeConfig ¶
func NewSteampipeConfig(token, url string) *SteampipeConfig
Click to show internal directories.
Click to hide internal directories.