types

package
v0.8.8 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2025 License: MIT Imports: 2 Imported by: 1

Documentation

Index

Constants

View Source
const (
	MediaTypeProblemJson = "application/problem+json"
	MediaTypeLDJson      = "application/ld+json"
)

Variables

This section is empty.

Functions

func AllInfrastructureProvidersString

func AllInfrastructureProvidersString() (providers []string)

func AllPartitionsString

func AllPartitionsString() (partitions []string)

func AllRegionsString

func AllRegionsString() (regions []string)

func AllResilienceZonesString

func AllResilienceZonesString() (rzs []string)

func HasRegion

func HasRegion(partition Partition, region Region) bool

func IntPointer

func IntPointer(i int) *int

IntPointer will return a pointer to the given int

Types

type CVSS added in v0.2.0

type CVSS struct {
	Version   string
	Vector    string
	BaseScore float64
}

CVSS represents the Common Vulnerability Scoring System

type InfrastructureProvider

type InfrastructureProvider string
const (
	NeticInfrastructureProvider InfrastructureProvider = "netic"
	AzureInfrastructureProvider InfrastructureProvider = "azure"
	AWSInfrastructureProvider   InfrastructureProvider = "aws"
)

func ParseInfrastructureProvider

func ParseInfrastructureProvider(name string) (InfrastructureProvider, bool)

func (InfrastructureProvider) String

func (p InfrastructureProvider) String() string

type InfrastructureProviders

type InfrastructureProviders []InfrastructureProvider

func AllInfrastructureProviders

func AllInfrastructureProviders() InfrastructureProviders

type Partition

type Partition string
const (
	NeticPartition Partition = "netic"
	AzurePartition Partition = "azure"
	AWSPartition   Partition = "aws"
)

func ParsePartition

func ParsePartition(name string) (Partition, bool)

func (Partition) String

func (p Partition) String() string

type Partitions

type Partitions []Partition

func AllPartitions

func AllPartitions() Partitions

type Problem

type Problem struct {
	// Type identify problem type RFC-9457#3.1.1
	//schema:format uri
	Type string `json:"type,omitempty"`

	// Status is the http status code and must be consistent with the server status code RFC-9457#3.1.2
	Status *int `json:"status,omitempty"`

	// Title is short humanreadable summary RFC-9457#3.1.3
	Title string `json:"title,omitempty"`

	// Detail is humanreadable explanation of the specific occurence of the problem RFC-9457#3.1.4
	Detail string `json:"detail,omitempty"`

	// Instance identifies the specific instance of the problem RFC-9457#3.1.5
	Instance string `json:"instance,omitempty"`

	// Err is containing wrapped error and will not be serialized to JSON
	Err error `json:"-"`
}

Problem is simple implementation of RFC9457

func (*Problem) Error

func (p *Problem) Error() string

Error implements the [error.Error] function to let Problem act as an [error]

func (*Problem) Unwrap

func (p *Problem) Unwrap() error

Unwrap allows for nested errors to be unwrapped

type Region

type Region string
const (
	NeticRegionDKNorth            Region = "dk-north"
	AzureRegionAustraliacentral   Region = "australiacentral"
	AzureRegionAustraliaeast      Region = "australiaeast"
	AzureRegionAustraliasoutheast Region = "australiasoutheast"
	AzureRegionAustriaeast        Region = "austriaeast"
	AzureRegionBelgiumcentral     Region = "belgiumcentral"
	AzureRegionBrazilsouth        Region = "brazilsouth"
	AzureRegionCanadacentral      Region = "canadacentral"
	AzureRegionCanadaeast         Region = "canadaeast"
	AzureRegionCentralindia       Region = "centralindia"
	AzureRegionCentralus          Region = "centralus"
	AzureRegionChilecentral       Region = "chilecentral"
	AzureRegionChinaeast          Region = "chinaeast"
	AzureRegionChinaeast2         Region = "chinaeast2"
	AzureRegionChinanorth         Region = "chinanorth"
	AzureRegionChinanorth2        Region = "chinanorth2"
	AzureRegionChinanorth3        Region = "chinanorth3"
	AzureRegionDenmarkeast        Region = "denmarkeast"
	AzureRegionEastasia           Region = "eastasia"
	AzureRegionEastus             Region = "eastus"
	AzureRegionEastus2            Region = "eastus2"
	AzureRegionEastus3            Region = "eastus3"
	AzureRegionFinlandcentral     Region = "finlandcentral"
	AzureRegionFrancecentral      Region = "francecentral"
	AzureRegionGermanywestcentral Region = "germanywestcentral"
	AzureRegionGreececentral      Region = "greececentral"
	AzureRegionIndiasouthcentral  Region = "indiasouthcentral"
	AzureRegionIndonesiacentral   Region = "indonesiacentral"
	AzureRegionIsraelcentral      Region = "israelcentral"
	AzureRegionItalynorth         Region = "italynorth"
	AzureRegionJapaneast          Region = "japaneast"
	AzureRegionJapanwest          Region = "japanwest"
	AzureRegionKoreacentral       Region = "koreacentral"
	AzureRegionMalaysiawest       Region = "malaysiawest"
	AzureRegionMexicocentral      Region = "mexicocentral"
	AzureRegionNewzealandnorth    Region = "newzealandnorth"
	AzureRegionNorthcentralus     Region = "northcentralus"
	AzureRegionNortheurope        Region = "northeurope"
	AzureRegionNorwayeast         Region = "norwayeast"
	AzureRegionPolandcentral      Region = "polandcentral"
	AzureRegionQatarcentral       Region = "qatarcentral"
	AzureRegionSaudiarabiacentral Region = "saudiarabiacentral"
	AzureRegionSouthafricanorth   Region = "southafricanorth"
	AzureRegionSouthcentralus     Region = "southcentralus"
	AzureRegionSoutheastasia      Region = "southeastasia"
	AzureRegionSouthindia         Region = "southindia"
	AzureRegionSpaincentral       Region = "spaincentral"
	AzureRegionSwedencentral      Region = "swedencentral"
	AzureRegionSwitzerlandnorth   Region = "switzerlandnorth"
	AzureRegionTaiwannorth        Region = "taiwannorth"
	AzureRegionUaenorth           Region = "uaenorth"
	AzureRegionUksouth            Region = "uksouth"
	AzureRegionUkwest             Region = "ukwest"
	AzureRegionUsdodcentral       Region = "usdodcentral"
	AzureRegionUsdodeast          Region = "usdodeast"
	AzureRegionUsgovarizona       Region = "usgovarizona"
	AzureRegionUsgovtexas         Region = "usgovtexas"
	AzureRegionUsgovvirginia      Region = "usgovvirginia"
	AzureRegionUsseceast          Region = "usseceast"
	AzureRegionUssecwest          Region = "ussecwest"
	AzureRegionUssecwestcentral   Region = "ussecwestcentral"
	AzureRegionWestcentralus      Region = "westcentralus"
	AzureRegionWesteurope         Region = "westeurope"
	AzureRegionWestus             Region = "westus"
	AzureRegionWestus2            Region = "westus2"
	AzureRegionWestus3            Region = "westus3"
	AWSRegionAPEast1              Region = "ap-east-1"
	AWSRegionAPNortheast1         Region = "ap-northeast-1"
	AWSRegionAPNortheast3         Region = "ap-northeast-3"
	AWSRegionAPSouth1             Region = "ap-south-1"
	AWSRegionAPSouth2             Region = "ap-south-2"
	AWSRegionAPSoutheast1         Region = "ap-southeast-1"
	AWSRegionAPSoutheast2         Region = "ap-southeast-2"
	AWSRegionAPSoutheast3         Region = "ap-southeast-3"
	AWSRegionAPSoutheast4         Region = "ap-southeast-4"
	AWSRegionCACentral1           Region = "ca-central-1"
	AWSRegionEUCentral1           Region = "eu-central-1"
	AWSRegionEUCentral2           Region = "eu-central-2"
	AWSRegionEUNorth1             Region = "eu-north-1"
	AWSRegionEUSouth1             Region = "eu-south-1"
	AWSRegionEUSouth2             Region = "eu-south-2"
	AWSRegionEUWest1              Region = "eu-west-1"
	AWSRegionEUWest3              Region = "eu-west-3"
	AWSRegionMESouth1             Region = "me-south-1"
	AWSRegionSAEast1              Region = "sa-east-1"
)

func ParseAWSRegion

func ParseAWSRegion(name string) (Region, bool)

func ParseAzureRegion

func ParseAzureRegion(name string) (Region, bool)

func ParseNeticRegion

func ParseNeticRegion(name string) (Region, bool)

func ParseRegion

func ParseRegion(name string) (Region, bool)

func (Region) String

func (r Region) String() string

type Regions

type Regions []Region

func AllRegions

func AllRegions() Regions

func PartitionRegions

func PartitionRegions(p Partition) Regions

type ResilienceZone

type ResilienceZone string
const (
	PlatformResilienceZone       ResilienceZone = "platform"
	Internal1ResilienceZone      ResilienceZone = "internal-1"
	Innovators1ResilienceZone    ResilienceZone = "innovators-1"
	EarlyAdopters1ResilienceZone ResilienceZone = "early-adopters-1"
	EarlyMajority1ResilienceZone ResilienceZone = "early-majority-1"
	EarlyMajority2ResilienceZone ResilienceZone = "early-majority-2"
	LateMajority1ResilienceZone  ResilienceZone = "late-majority-1"
	LateMajority2ResilienceZone  ResilienceZone = "late-majority-2"
	Laggards1ResilienceZone      ResilienceZone = "laggards-1"
)

func ParseResilienceZone

func ParseResilienceZone(name string) (ResilienceZone, bool)

func (ResilienceZone) String

func (r ResilienceZone) String() string

type ResilienceZones

type ResilienceZones []ResilienceZone

func AllResilienceZones

func AllResilienceZones() ResilienceZones

type Vulnerability added in v0.2.0

type Vulnerability struct {
	ID          string
	PackageName string
	Description string
	Severity    string
	FixState    string
	CVSS        *CVSS
}

Vulnerability represents a vulnerability

Jump to

Keyboard shortcuts

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