Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrUnsupportedType = errors.New("unsupported type")
)
Functions ¶
func ResourceID ¶
func ResourceID(r Resourceable) string
Types ¶
type AssertionData ¶
type AssertionData struct {
Tag string `json:"tag"`
Type StringOrArray `json:"type"`
}
type AssertionResult ¶
type AssertionResult struct {
AssertionKey string `json:"assertionKey"`
CreatedAt string `json:"createdAt"`
Data AssertionData `json:"data"`
DisabledJustification string `json:"disabledJustification"`
Enabled bool `json:"enabled"`
Pass bool `json:"pass"`
Optional bool `json:"optional"`
Resourceable *Resourceable `json:"resourceable"`
FailMessage string `json:"failMessage"`
}
type AssertionResults ¶
type AssertionResults struct {
Collection []AssertionResult `json:"collection"`
}
type Resourceable ¶
type Resourceable struct {
ID string `json:"id"`
DeviceName string `json:"deviceName"`
Email string `json:"email"`
RepositoryName string `json:"repositoryName"`
CompanyUserName string `json:"companyUserName"`
VendorName string `json:"vendorName"`
Account string `json:"account"`
CloudResourceType string `json:"cloudResourceType"`
Region string `json:"region"`
ThirdPartyID string `json:"thirdPartyId"`
Description string `json:"description"`
Name string `json:"name"`
}
type StringOrArray ¶ added in v1.0.2
type StringOrArray []string
StringOrArray handles cases where the API can return a string or array of strings
func (*StringOrArray) String ¶ added in v1.0.2
func (sa *StringOrArray) String() string
func (*StringOrArray) UnmarshalJSON ¶ added in v1.0.2
func (sa *StringOrArray) UnmarshalJSON(data []byte) error
type Test ¶
type Test struct {
ID string `json:"id"`
Key string `json:"key"`
Description string `json:"description"`
Enabled bool `json:"enabled"`
Pass bool `json:"pass"`
DisabledJustification string `json:"disabledJustification"`
PassedWithUploadJustification string `json:"passedWithUploadJustification"`
Optional bool `json:"optional"`
// The following fields are only returned if getTest is called?
AssertionKeys []string `json:"assertionKeys"`
AssertionResults AssertionResults `json:"assertionResults"`
Title string `json:"title"`
EvidenceType string `json:"evidenceType"`
V2 TestV2 `json:"testV2"`
}
type TestV2 ¶
type TestV2 struct {
ID string `json:"id"`
Key string `json:"key"`
Title string `json:"title"`
Description string `json:"description"`
AssertionKey string `json:"assertion_key"`
AssertionData AssertionData `json:"assertionData"`
ConditionKey string `json:"conditionKey"`
Controls []Control `json:"controls"`
ControlV2s []ControlV2 `json:"controlV2s"`
TestDomain string `json:"testDomain"`
TestFunction string `json:"testFunction"`
TestType string `json:"testType"`
ResourceCategory string `json:"resourceCategory"`
DetailedRemediationSteps string `json:"detailedRemediationSteps"`
RecommendedAction string `json:"recommendedAction"`
AssertionResults *AssertionResults `json:"assertionResults"`
Status string `json:"status"`
}
Click to show internal directories.
Click to hide internal directories.