sarif

package
v2.3.1 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2024 License: Unlicense Imports: 5 Imported by: 53

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Address

type Address struct {
	Index              *uint   `json:"index,omitempty"`
	AbsoluteAddress    *uint   `json:"absoluteAddress,omitempty"`
	RelativeAddress    *int    `json:"relativeAddress,omitempty"`
	OffsetFromParent   *int    `json:"offsetFromParent,omitempty"`
	Length             *int    `json:"length,omitempty"`
	Name               *string `json:"name,omitempty"`
	FullyQualifiedName *string `json:"fullyQualifiedName,omitempty"`
	Kind               *string `json:"kind,omitempty"`
	ParentIndex        *uint   `json:"parentIndex,omitempty"`
	PropertyBag
}

Address ...

func NewAddress

func NewAddress() *Address

NewAddress create a new Address and returns a pointer to it

func (*Address) WithAbsoluteAddress

func (address *Address) WithAbsoluteAddress(absoluteAddress int) *Address

WithAbsoluteAddress sets the AbsoluteAddress

func (*Address) WithFullyQualifiedName

func (address *Address) WithFullyQualifiedName(fullyQualifiedName string) *Address

WithFullyQualifiedName sets the FullyQualifiedName

func (*Address) WithIndex

func (address *Address) WithIndex(index int) *Address

WithIndex sets the Index

func (*Address) WithKind

func (address *Address) WithKind(kind string) *Address

WithKind sets the Kind

func (*Address) WithLength

func (address *Address) WithLength(length int) *Address

WithLength sets the Length

func (*Address) WithName

func (address *Address) WithName(name string) *Address

WithName sets the Name

func (*Address) WithOffsetFromParent

func (address *Address) WithOffsetFromParent(offsetFromParent int) *Address

WithOffsetFromParent sets the OffsetFromParent

func (*Address) WithParentIndex

func (address *Address) WithParentIndex(parentIndex int) *Address

WithParentIndex sets the ParentIndex

func (*Address) WithRelativeAddress

func (address *Address) WithRelativeAddress(relativeAddress int) *Address

WithRelativeAddress sets the RelativeAddress

type Artifact

type Artifact struct {
	Location            *ArtifactLocation `json:"location,omitempty"`
	ParentIndex         *uint             `json:"parentIndex,omitempty"`
	Offset              *uint             `json:"offset,omitempty"`
	Length              int               `json:"length"`
	Roles               []string          `json:"roles,omitempty"`
	MimeType            *string           `json:"mimeType,omitempty"`
	Contents            *ArtifactContent  `json:"contents,omitempty"`
	Encoding            *string           `json:"encoding,omitempty"`
	SourceLanguage      *string           `json:"sourceLanguage,omitempty"`
	Hashes              map[string]string `json:"hashes,omitempty"`
	LastModifiedTimeUtc *string           `json:"lastModifiedTimeUtc,omitempty"`
	Description         *Message          `json:"description,omitempty"`
	PropertyBag
}

Artifact ...

func NewArtifact

func NewArtifact() *Artifact

NewArtifact creates a new Artifact and returns a pointer to it

func (*Artifact) WithContents

func (artifact *Artifact) WithContents(artifactContent *ArtifactContent) *Artifact

WithContents sets the Contents

func (*Artifact) WithDescription

func (artifact *Artifact) WithDescription(message *Message) *Artifact

WithDescription sets the Description

func (*Artifact) WithDescriptionMarkdown added in v2.0.1

func (artifact *Artifact) WithDescriptionMarkdown(markdown string) *Artifact

WithDescriptionMarkdown sets the DescriptionMarkdown

func (*Artifact) WithDescriptionText added in v2.0.1

func (artifact *Artifact) WithDescriptionText(text string) *Artifact

WithDescriptionText sets the DescriptionText

func (*Artifact) WithEncoding

func (artifact *Artifact) WithEncoding(encoding string) *Artifact

WithEncoding sets the Encoding

func (*Artifact) WithHashes

func (artifact *Artifact) WithHashes(hashes map[string]string) *Artifact

WithHashes sets the Hashes

func (*Artifact) WithLastModifiedTimeUtc

func (artifact *Artifact) WithLastModifiedTimeUtc(lastModified string) *Artifact

WithLastModifiedTimeUtc sets the LastModifiedTimeUtc

func (*Artifact) WithLength

func (artifact *Artifact) WithLength(length int) *Artifact

WithLength sets the Length

func (*Artifact) WithLocation

func (artifact *Artifact) WithLocation(artifactLocation *ArtifactLocation) *Artifact

WithLocation sets the Location

func (*Artifact) WithMimeType

func (artifact *Artifact) WithMimeType(mimeType string) *Artifact

WithMimeType sets the MimeType

func (*Artifact) WithOffset

func (artifact *Artifact) WithOffset(offset int) *Artifact

WithOffset sets the Offset

func (*Artifact) WithParentIndex

func (artifact *Artifact) WithParentIndex(parentIndex int) *Artifact

WithParentIndex sets the ParentIndex

func (*Artifact) WithRole

func (artifact *Artifact) WithRole(role string) *Artifact

WithRole sets the Role

func (*Artifact) WithSourceLanguage

func (artifact *Artifact) WithSourceLanguage(sourceLanguage string) *Artifact

WithSourceLanguage sets the SourceLanguage

type ArtifactChange

type ArtifactChange struct {
	ArtifactLocation ArtifactLocation `json:"artifactLocation"`
	Replacements     []*Replacement   `json:"replacements"`
	PropertyBag
}

ArtifactChange ...

func NewArtifactChange

func NewArtifactChange(artifactLocation *ArtifactLocation) *ArtifactChange

NewArtifactChange creates a new ArtifactChange and returns a pointer to it

func (*ArtifactChange) WithReplacement

func (artifactChange *ArtifactChange) WithReplacement(replacement *Replacement) *ArtifactChange

WithReplacement sets the Replacement

type ArtifactContent

type ArtifactContent struct {
	Text     *string                   `json:"text,omitempty"`
	Binary   *string                   `json:"binary,omitempty"`
	Rendered *MultiformatMessageString `json:"rendered,omitempty"`
	PropertyBag
}

ArtifactContent ...

func NewArtifactContent

func NewArtifactContent() *ArtifactContent

NewArtifactContent creates a new ArtifactContent and returns a pointer to it

func (*ArtifactContent) WithBinary

func (artifactContent *ArtifactContent) WithBinary(binary string) *ArtifactContent

WithBinary sets the Binary

func (*ArtifactContent) WithRendered

func (artifactContent *ArtifactContent) WithRendered(mms *MultiformatMessageString) *ArtifactContent

WithRendered sets the Rendered

func (*ArtifactContent) WithText

func (artifactContent *ArtifactContent) WithText(text string) *ArtifactContent

WithText sets the Text

type ArtifactLocation

type ArtifactLocation struct {
	URI         *string  `json:"uri,omitempty"`
	URIBaseId   *string  `json:"uriBaseId,omitempty"`
	Index       *uint    `json:"index,omitempty"`
	Description *Message `json:"description,omitempty"`
	PropertyBag
}

ArtifactLocation ...

func NewArtifactLocation

func NewArtifactLocation() *ArtifactLocation

NewArtifactLocation creates a new ArtifactLocation and returns a pointer to it

func NewSimpleArtifactLocation

func NewSimpleArtifactLocation(uri string) *ArtifactLocation

NewSimpleArtifactLocation creates a new SimpleArtifactLocation and returns a pointer to it

func (*ArtifactLocation) WithDescription

func (artifactLocation *ArtifactLocation) WithDescription(message *Message) *ArtifactLocation

WithDescription sets the Description

func (*ArtifactLocation) WithDescriptionMarkdown added in v2.0.1

func (artifactLocation *ArtifactLocation) WithDescriptionMarkdown(markdown string) *ArtifactLocation

WithDescriptionMarkdown sets the DescriptionMarkdown

func (*ArtifactLocation) WithDescriptionText added in v2.0.1

func (artifactLocation *ArtifactLocation) WithDescriptionText(text string) *ArtifactLocation

WithDescriptionText sets the DescriptionText

func (*ArtifactLocation) WithIndex

func (artifactLocation *ArtifactLocation) WithIndex(index int) *ArtifactLocation

WithIndex sets the Index

func (*ArtifactLocation) WithUri

func (artifactLocation *ArtifactLocation) WithUri(uri string) *ArtifactLocation

WithUri sets the Uri

func (*ArtifactLocation) WithUriBaseId

func (artifactLocation *ArtifactLocation) WithUriBaseId(uriBaseId string) *ArtifactLocation

WithUriBaseId sets the UriBaseId

type Attachment added in v2.0.1

type Attachment struct {
	ArtifactLocation *ArtifactLocation `json:"artifactLocation,omitempty"`
	Description      *Message          `json:"description,omitempty"`
	Rectangles       []*Rectangle      `json:"rectangles,omitempty"`
	PropertyBag
}

Attachment ...

func NewAttachment added in v2.0.1

func NewAttachment() *Attachment

NewAttachment creates a new Attachment and returns a pointer to it

func (*Attachment) AddRectangle added in v2.0.1

func (attachment *Attachment) AddRectangle(rectangle *Rectangle)

AddRectangle ...

func (*Attachment) WithArtifactionLocation added in v2.0.1

func (attachment *Attachment) WithArtifactionLocation(artifactLocation *ArtifactLocation) *Attachment

WithArtifactionLocation sets the ArtifactionLocation

func (*Attachment) WithDescription added in v2.0.1

func (attachment *Attachment) WithDescription(description *Message) *Attachment

WithDescription sets the Description

func (*Attachment) WithDescriptionMarkdown added in v2.0.1

func (attachment *Attachment) WithDescriptionMarkdown(markdown string) *Attachment

WithDescriptionMarkdown sets the DescriptionMarkdown

func (*Attachment) WithDescriptionText added in v2.0.1

func (attachment *Attachment) WithDescriptionText(text string) *Attachment

WithDescriptionText sets the DescriptionText

func (*Attachment) WithRectangles added in v2.0.1

func (attachment *Attachment) WithRectangles(rectangles []*Rectangle) *Attachment

WithRectangles sets the Rectangles

type CodeFlow added in v2.0.1

type CodeFlow struct {
	Message     *Message      `json:"message,omitempty"`
	ThreadFlows []*ThreadFlow `json:"threadFlows,omitempty"`
	PropertyBag
}

CodeFlow ...

func NewCodeFlow added in v2.0.1

func NewCodeFlow() *CodeFlow

NewCodeFlow creates a new CodeFlow and returns a pointer to it

func (*CodeFlow) AddThreadFlow added in v2.0.1

func (codeFlow *CodeFlow) AddThreadFlow(threadFlow *ThreadFlow)

AddThreadFlow ...

func (*CodeFlow) WithMessage added in v2.0.1

func (codeFlow *CodeFlow) WithMessage(message *Message) *CodeFlow

WithMessage sets the Message

func (*CodeFlow) WithMessageMarkdown added in v2.0.1

func (codeFlow *CodeFlow) WithMessageMarkdown(markdown string) *CodeFlow

WithMessageMarkdown sets the Message markdown

func (*CodeFlow) WithTextMessage added in v2.0.1

func (codeFlow *CodeFlow) WithTextMessage(text string) *CodeFlow

WithTextMessage sets the Message text

func (*CodeFlow) WithThreadFlows added in v2.0.1

func (codeFlow *CodeFlow) WithThreadFlows(threadFlows []*ThreadFlow) *CodeFlow

WithThreadFlows sets the ThreadFlows

type ConfigurationOverride added in v2.0.1

type ConfigurationOverride struct {
	Configuration *ReportingConfiguration       `json:"configuration,omitempty"`
	Descriptor    *ReportingDescriptorReference `json:"descriptor,omitempty"`
	PropertyBag
}

ConfigurationOverride ...

func NewConfigurationOverride added in v2.0.1

func NewConfigurationOverride() *ConfigurationOverride

NewConfigurationOverride creates a new ConfigurationOverride and returns a pointer to it

func (*ConfigurationOverride) WithConfiguration added in v2.0.1

func (configurationOverride *ConfigurationOverride) WithConfiguration(configuration *ReportingConfiguration) *ConfigurationOverride

WithConfiguration sets the Configuration

func (*ConfigurationOverride) WithDescriptor added in v2.0.1

func (configurationOverride *ConfigurationOverride) WithDescriptor(descriptor *ReportingDescriptorReference) *ConfigurationOverride

WithDescriptor sets the Descriptor

type Conversion added in v2.0.1

type Conversion struct {
	AnalysisToolLogFiles []*ArtifactLocation `json:"analysisToolLogFiles,omitempty"`
	Invocation           *Invocation         `json:"invocation,omitempty"`
	Tool                 *Tool               `json:"tool"`
	PropertyBag
}

Conversion ...

func NewConversion added in v2.0.1

func NewConversion() *Conversion

NewConversion creates a new Conversion and returns a pointer to it

func (*Conversion) WithInvocation added in v2.0.1

func (conversion *Conversion) WithInvocation(invocation *Invocation) *Conversion

WithInvocation sets the Invocation

func (*Conversion) WithTool added in v2.0.1

func (conversion *Conversion) WithTool(tool *Tool) *Conversion

WithTool sets the Tool

type Edge added in v2.0.1

type Edge struct {
	ID           string   `json:"id"`
	Label        *Message `json:"label,omitempty"`
	SourceNodeID string   `json:"sourceNodeId"`
	TargetNodeID string   `json:"targetNodeId"`
	PropertyBag
}

Edge ...

func NewEdge added in v2.0.1

func NewEdge(id, sourceNodeID, targetNodeID string) *Edge

NewEdge creates a new Edge and returns a pointer to it

func (*Edge) WithID added in v2.0.1

func (edge *Edge) WithID(id string) *Edge

WithID sets the ID

func (*Edge) WithLabel added in v2.0.1

func (edge *Edge) WithLabel(label *Message) *Edge

WithLabel sets the Label

func (*Edge) WithLabelMarkdown added in v2.0.1

func (edge *Edge) WithLabelMarkdown(markdown string) *Edge

WithLabelMarkdown sets the LabelMarkdown

func (*Edge) WithLabelText added in v2.0.1

func (edge *Edge) WithLabelText(text string) *Edge

WithLabelText sets the LabelText

type EdgeTraversal added in v2.0.1

type EdgeTraversal struct {
	EdgeID            string                               `json:"edgeId"`
	FinalState        map[string]*MultiformatMessageString `json:"finalState,omitempty"`
	Message           *Message                             `json:"message,omitempty"`
	StepOverEdgeCount *int                                 `json:"stepOverEdgeCount,omitempty"`
	PropertyBag
}

EdgeTraversal ...

func NewEdgeTraversal added in v2.0.1

func NewEdgeTraversal(edgeID string) *EdgeTraversal

NewEdgeTraversal creates a new EdgeTraversal and returns a pointer to it

func (*EdgeTraversal) SetFinalState added in v2.0.1

func (edgeTraversal *EdgeTraversal) SetFinalState(key string, state *MultiformatMessageString)

SetFinalState ...

func (*EdgeTraversal) WithDescription added in v2.0.1

func (edgeTraversal *EdgeTraversal) WithDescription(message *Message) *EdgeTraversal

WithDescription sets the Description

func (*EdgeTraversal) WithDescriptionMarkdown added in v2.0.1

func (edgeTraversal *EdgeTraversal) WithDescriptionMarkdown(markdown string) *EdgeTraversal

WithDescriptionMarkdown sets the DescriptionMarkdown

func (*EdgeTraversal) WithDescriptionText added in v2.0.1

func (edgeTraversal *EdgeTraversal) WithDescriptionText(text string) *EdgeTraversal

WithDescriptionText sets the DescriptionText

func (*EdgeTraversal) WithFinalState added in v2.0.1

func (edgeTraversal *EdgeTraversal) WithFinalState(finalState map[string]*MultiformatMessageString) *EdgeTraversal

WithFinalState sets the FinalState

func (*EdgeTraversal) WithStepOverEdgeCount added in v2.0.1

func (edgeTraversal *EdgeTraversal) WithStepOverEdgeCount(stepOverEdgeCount int) *EdgeTraversal

WithStepOverEdgeCount sets the StepOverEdgeCount

type Exception added in v2.0.1

type Exception struct {
	InnerExceptions []*Exception `json:"innerExceptions,omitempty"`
	Kind            *string      `json:"kind,omitempty"`
	Message         *string      `json:"message,omitempty"`
	Stack           *Stack       `json:"stack,omitempty"`
	PropertyBag
}

Exception ...

func NewException added in v2.0.1

func NewException() *Exception

NewException creates a new Exception and returns a pointer to it

func (*Exception) AddInnerException added in v2.0.1

func (exception *Exception) AddInnerException(toAdd *Exception)

AddInnerException ...

func (*Exception) WithInnerExceptions added in v2.0.1

func (exception *Exception) WithInnerExceptions(exceptions []*Exception) *Exception

WithInnerExceptions sets the InnerExceptions

func (*Exception) WithKind added in v2.0.1

func (exception *Exception) WithKind(kind string) *Exception

WithKind sets the Kind

func (*Exception) WithMessage added in v2.0.1

func (exception *Exception) WithMessage(message string) *Exception

WithMessage sets the Message

func (*Exception) WithStack added in v2.0.1

func (exception *Exception) WithStack(stack Stack) *Exception

WithStack sets the Stack

type ExternalProperties added in v2.0.1

type ExternalProperties struct {
	Addresses              []*Address            `json:"addresses,omitempty"`
	Artifacts              []*Artifact           `json:"artifacts,omitempty"`
	Conversion             *Conversion           `json:"conversion,omitempty"`
	Driver                 *ToolComponent        `json:"driver,omitempty"`
	Extensions             []*ToolComponent      `json:"extensions,omitempty"`
	ExternalizedProperties *PropertyBag          `json:"externalizedProperties,omitempty"`
	Graphs                 []*Graph              `json:"graphs,omitempty"`
	GUID                   *string               `json:"guid,omitempty"`
	Invocations            []*Invocation         `json:"invocations,omitempty"`
	LogicalLocations       []*LogicalLocation    `json:"logicalLocations,omitempty"`
	Policies               []*ToolComponent      `json:"policies,omitempty"`
	Results                []*Result             `json:"results,omitempty"`
	RunGUID                *string               `json:"runGuid,omitempty"`
	Schema                 *string               `json:"schema,omitempty"`
	Taxonomies             []*ToolComponent      `json:"taxonomies,omitempty"`
	ThreadFlowLocations    []*ThreadFlowLocation `json:"threadFlowLocations,omitempty"`
	Translations           []*ToolComponent      `json:"translations,omitempty"`
	Version                string                `json:"version,omitempty"`
	WebRequests            []*WebRequest         `json:"webRequests,omitempty"`
	WebResponses           []*WebResponse        `json:"webResponses,omitempty"`
	PropertyBag
}

ExternalProperties ...

func NewExternalProperties added in v2.0.1

func NewExternalProperties() *ExternalProperties

NewExternalProperties creates a new ExternalProperties and returns a pointer to it

func (*ExternalProperties) AddAddress added in v2.0.1

func (externalProperties *ExternalProperties) AddAddress(address *Address)

AddAddress ...

func (*ExternalProperties) AddArtifact added in v2.0.1

func (externalProperties *ExternalProperties) AddArtifact(artifact *Artifact)

AddArtifact ...

func (*ExternalProperties) AddExtension added in v2.0.1

func (externalProperties *ExternalProperties) AddExtension(extension *ToolComponent)

AddExtension ...

func (*ExternalProperties) AddGraph added in v2.0.1

func (externalProperties *ExternalProperties) AddGraph(graph *Graph)

AddGraph ...

func (*ExternalProperties) AddInvocation added in v2.0.1

func (externalProperties *ExternalProperties) AddInvocation(invocation *Invocation)

AddInvocation ...

func (*ExternalProperties) AddLogicalLocation added in v2.0.1

func (externalProperties *ExternalProperties) AddLogicalLocation(logicalLocation *LogicalLocation)

AddLogicalLocation ...

func (*ExternalProperties) AddPolicy added in v2.0.1

func (externalProperties *ExternalProperties) AddPolicy(policy *ToolComponent)

AddPolicy ...

func (*ExternalProperties) AddResult added in v2.0.1

func (externalProperties *ExternalProperties) AddResult(result *Result)

AddResult ...

func (*ExternalProperties) AddTaxonomie added in v2.0.1

func (externalProperties *ExternalProperties) AddTaxonomie(taxonomy *ToolComponent)

AddTaxonomie ...

func (*ExternalProperties) AddThreadFlowLocations added in v2.0.1

func (externalProperties *ExternalProperties) AddThreadFlowLocations(threadFlowLocation *ThreadFlowLocation)

AddThreadFlowLocations ...

func (*ExternalProperties) AddTranslation added in v2.0.1

func (externalProperties *ExternalProperties) AddTranslation(translation *ToolComponent)

AddTranslation ...

func (*ExternalProperties) AddWebRequest added in v2.0.1

func (externalProperties *ExternalProperties) AddWebRequest(webRequest *WebRequest)

AddWebRequest ...

func (*ExternalProperties) AddWebResponse added in v2.0.1

func (externalProperties *ExternalProperties) AddWebResponse(webResponse *WebResponse)

AddWebResponse ...

func (*ExternalProperties) WithAddress added in v2.0.1

func (externalProperties *ExternalProperties) WithAddress(addresses []*Address) *ExternalProperties

WithAddress sets the Address

func (*ExternalProperties) WithArtifact added in v2.0.1

func (externalProperties *ExternalProperties) WithArtifact(artifacts []*Artifact) *ExternalProperties

WithArtifact sets the Artifact

func (*ExternalProperties) WithConversion added in v2.0.1

func (externalProperties *ExternalProperties) WithConversion(conversion *Conversion) *ExternalProperties

WithConversion sets the Conversion

func (*ExternalProperties) WithDriver added in v2.0.1

func (externalProperties *ExternalProperties) WithDriver(driver *ToolComponent) *ExternalProperties

WithDriver sets the Driver

func (*ExternalProperties) WithExtensions added in v2.0.1

func (externalProperties *ExternalProperties) WithExtensions(extensions []*ToolComponent) *ExternalProperties

WithExtensions sets the Extensions

func (*ExternalProperties) WithExternalizedProperties added in v2.0.1

func (externalProperties *ExternalProperties) WithExternalizedProperties(externalizedProperties *PropertyBag) *ExternalProperties

WithExternalizedProperties sets the ExternalizedProperties

func (*ExternalProperties) WithGUID added in v2.0.1

func (externalProperties *ExternalProperties) WithGUID(guid string) *ExternalProperties

WithGUID sets the GUID

func (*ExternalProperties) WithGraphs added in v2.0.1

func (externalProperties *ExternalProperties) WithGraphs(graphs []*Graph) *ExternalProperties

WithGraphs sets the Graphs

func (*ExternalProperties) WithInvocations added in v2.0.1

func (externalProperties *ExternalProperties) WithInvocations(invocations []*Invocation) *ExternalProperties

WithInvocations sets the Invocations

func (*ExternalProperties) WithLogicalLocations added in v2.0.1

func (externalProperties *ExternalProperties) WithLogicalLocations(logicalLocations []*LogicalLocation) *ExternalProperties

WithLogicalLocations sets the LogicalLocations

func (*ExternalProperties) WithPolicies added in v2.0.1

func (externalProperties *ExternalProperties) WithPolicies(policies []*ToolComponent) *ExternalProperties

WithPolicies sets the Policies

func (*ExternalProperties) WithResults added in v2.0.1

func (externalProperties *ExternalProperties) WithResults(results []*Result) *ExternalProperties

WithResults sets the Results

func (*ExternalProperties) WithRunGUID added in v2.0.1

func (externalProperties *ExternalProperties) WithRunGUID(runGUID string) *ExternalProperties

WithRunGUID sets the RunGUID

func (*ExternalProperties) WithSchema added in v2.0.1

func (externalProperties *ExternalProperties) WithSchema(schema string) *ExternalProperties

WithSchema sets the Schema

func (*ExternalProperties) WithTaxonomies added in v2.0.1

func (externalProperties *ExternalProperties) WithTaxonomies(taxonomies []*ToolComponent) *ExternalProperties

WithTaxonomies sets the Taxonomies

func (*ExternalProperties) WithThreadFlowLocations added in v2.0.1

func (externalProperties *ExternalProperties) WithThreadFlowLocations(threadFlowLocations []*ThreadFlowLocation) *ExternalProperties

WithThreadFlowLocations sets the ThreadFlowLocations

func (*ExternalProperties) WithTranslations added in v2.0.1

func (externalProperties *ExternalProperties) WithTranslations(translation []*ToolComponent) *ExternalProperties

WithTranslations sets the Translations

func (*ExternalProperties) WithVersion added in v2.0.1

func (externalProperties *ExternalProperties) WithVersion(version string) *ExternalProperties

WithVersion sets the Version

func (*ExternalProperties) WithWebRequests added in v2.0.1

func (externalProperties *ExternalProperties) WithWebRequests(webRequests []*WebRequest) *ExternalProperties

WithWebRequests sets the WebRequests

func (*ExternalProperties) WithWebResponses added in v2.0.1

func (externalProperties *ExternalProperties) WithWebResponses(webResponses []*WebResponse) *ExternalProperties

WithWebResponses sets the WebResponses

type ExternalPropertyFileReference added in v2.0.1

type ExternalPropertyFileReference struct {
	GUID      *string           `json:"guid,omitempty"`
	ItemCount *int              `json:"itemCount,omitempty"`
	Location  *ArtifactLocation `json:"location,omitempty"`
	PropertyBag
}

ExternalPropertyFileReference ...

func NewExternalPropertyFileReference added in v2.0.1

func NewExternalPropertyFileReference() *ExternalPropertyFileReference

NewExternalPropertyFileReference creates a new ExternalPropertyFileReference and returns a pointer to it

func (*ExternalPropertyFileReference) WithGUID added in v2.0.1

func (externalPropertyFileReferences *ExternalPropertyFileReference) WithGUID(guid string) *ExternalPropertyFileReference

WithGUID sets the GUID

func (*ExternalPropertyFileReference) WithItemCount added in v2.0.1

func (externalPropertyFileReferences *ExternalPropertyFileReference) WithItemCount(itemCount int) *ExternalPropertyFileReference

WithItemCount sets the ItemCount

type ExternalPropertyFileReferences added in v2.0.1

type ExternalPropertyFileReferences struct {
	Addresses              []*ExternalPropertyFileReference `json:"addresses,omitempty"`
	Artifacts              []*ExternalPropertyFileReference `json:"artifacts,omitempty"`
	Conversion             *ExternalPropertyFileReference   `json:"conversion,omitempty"`
	Driver                 *ExternalPropertyFileReference   `json:"driver,omitempty"`
	Extensions             []*ExternalPropertyFileReference `json:"extensions,omitempty"`
	ExternalizedProperties *ExternalPropertyFileReference   `json:"externalizedProperties,omitempty"`
	Graphs                 []*ExternalPropertyFileReference `json:"graphs,omitempty"`
	Invocations            []*ExternalPropertyFileReference `json:"invocations,omitempty"`
	LogicalLocations       []*ExternalPropertyFileReference `json:"logicalLocations,omitempty"`
	Policies               []*ExternalPropertyFileReference `json:"policies,omitempty"`
	Properties             *PropertyBag                     `json:"properties,omitempty"`
	Results                []*ExternalPropertyFileReference `json:"results,omitempty"`
	Taxonomies             []*ExternalPropertyFileReference `json:"taxonomies,omitempty"`
	ThreadFlowLocations    []*ExternalPropertyFileReference `json:"threadFlowLocations,omitempty"`
	Translations           []*ExternalPropertyFileReference `json:"translations,omitempty"`
	WebRequests            []*ExternalPropertyFileReference `json:"webRequests,omitempty"`
	WebResponses           []*ExternalPropertyFileReference `json:"webResponses,omitempty"`
	PropertyBag
}

ExternalPropertyFileReferences ...

func NewExternalPropertyFileReferences added in v2.0.1

func NewExternalPropertyFileReferences() *ExternalPropertyFileReferences

NewExternalPropertyFileReferences creates a new ExternalPropertyFileReferences and returns a pointer to it

func (*ExternalPropertyFileReferences) AddAddress added in v2.0.1

func (externalPropertyFileReferences *ExternalPropertyFileReferences) AddAddress(address *ExternalPropertyFileReference)

AddAddress ...

func (*ExternalPropertyFileReferences) AddArtifact added in v2.0.1

func (externalPropertyFileReferences *ExternalPropertyFileReferences) AddArtifact(artifact *ExternalPropertyFileReference)

AddArtifact ...

func (*ExternalPropertyFileReferences) AddExtension added in v2.0.1

func (externalPropertyFileReferences *ExternalPropertyFileReferences) AddExtension(extension *ExternalPropertyFileReference)

AddExtension ...

func (*ExternalPropertyFileReferences) AddGraph added in v2.0.1

func (externalPropertyFileReferences *ExternalPropertyFileReferences) AddGraph(graph *ExternalPropertyFileReference)

AddGraph ...

func (*ExternalPropertyFileReferences) AddInvocation added in v2.0.1

func (externalPropertyFileReferences *ExternalPropertyFileReferences) AddInvocation(invocation *ExternalPropertyFileReference)

AddInvocation ...

func (*ExternalPropertyFileReferences) AddLogicalLocation added in v2.0.1

func (externalPropertyFileReferences *ExternalPropertyFileReferences) AddLogicalLocation(logicalLocation *ExternalPropertyFileReference)

AddLogicalLocation ...

func (*ExternalPropertyFileReferences) AddPolicy added in v2.0.1

func (externalPropertyFileReferences *ExternalPropertyFileReferences) AddPolicy(policy *ExternalPropertyFileReference)

AddPolicy ...

func (*ExternalPropertyFileReferences) AddResult added in v2.0.1

func (externalPropertyFileReferences *ExternalPropertyFileReferences) AddResult(result *ExternalPropertyFileReference)

AddResult ...

func (*ExternalPropertyFileReferences) AddTaxonomie added in v2.0.1

func (externalPropertyFileReferences *ExternalPropertyFileReferences) AddTaxonomie(taxonomy *ExternalPropertyFileReference)

AddTaxonomie ...

func (*ExternalPropertyFileReferences) AddThreadFlowLocations added in v2.0.1

func (externalPropertyFileReferences *ExternalPropertyFileReferences) AddThreadFlowLocations(threadFlowLocation *ExternalPropertyFileReference)

AddThreadFlowLocations ...

func (*ExternalPropertyFileReferences) AddTranslation added in v2.0.1

func (externalPropertyFileReferences *ExternalPropertyFileReferences) AddTranslation(translation *ExternalPropertyFileReference)

AddTranslation ...

func (*ExternalPropertyFileReferences) AddWebRequest added in v2.0.1

func (externalPropertyFileReferences *ExternalPropertyFileReferences) AddWebRequest(webRequest *ExternalPropertyFileReference)

AddWebRequest ...

func (*ExternalPropertyFileReferences) AddWebResponse added in v2.0.1

func (externalPropertyFileReferences *ExternalPropertyFileReferences) AddWebResponse(webResponse *ExternalPropertyFileReference)

AddWebResponse ...

func (*ExternalPropertyFileReferences) WithAddress added in v2.0.1

func (externalPropertyFileReferences *ExternalPropertyFileReferences) WithAddress(addresses []*ExternalPropertyFileReference) *ExternalPropertyFileReferences

WithAddress sets the Address

func (*ExternalPropertyFileReferences) WithArtifact added in v2.0.1

func (externalPropertyFileReferences *ExternalPropertyFileReferences) WithArtifact(artifacts []*ExternalPropertyFileReference) *ExternalPropertyFileReferences

WithArtifact sets the Artifact

func (*ExternalPropertyFileReferences) WithConversion added in v2.0.1

func (externalPropertyFileReferences *ExternalPropertyFileReferences) WithConversion(conversion *ExternalPropertyFileReference) *ExternalPropertyFileReferences

WithConversion sets the Conversion

func (*ExternalPropertyFileReferences) WithDriver added in v2.0.1

func (externalPropertyFileReferences *ExternalPropertyFileReferences) WithDriver(driver *ExternalPropertyFileReference) *ExternalPropertyFileReferences

WithDriver sets the Driver

func (*ExternalPropertyFileReferences) WithExtensions added in v2.0.1

func (externalPropertyFileReferences *ExternalPropertyFileReferences) WithExtensions(extensions []*ExternalPropertyFileReference) *ExternalPropertyFileReferences

WithExtensions sets the Extensions

func (*ExternalPropertyFileReferences) WithExternalizedProperties added in v2.0.1

func (externalPropertyFileReferences *ExternalPropertyFileReferences) WithExternalizedProperties(externalizedProperties *ExternalPropertyFileReference) *ExternalPropertyFileReferences

WithExternalizedProperties sets the ExternalizedProperties

func (*ExternalPropertyFileReferences) WithGraphs added in v2.0.1

func (externalPropertyFileReferences *ExternalPropertyFileReferences) WithGraphs(graphs []*ExternalPropertyFileReference) *ExternalPropertyFileReferences

WithGraphs sets the Graphs

func (*ExternalPropertyFileReferences) WithInvocations added in v2.0.1

func (externalPropertyFileReferences *ExternalPropertyFileReferences) WithInvocations(invocations []*ExternalPropertyFileReference) *ExternalPropertyFileReferences

WithInvocations sets the Invocations

func (*ExternalPropertyFileReferences) WithLogicalLocations added in v2.0.1

func (externalPropertyFileReferences *ExternalPropertyFileReferences) WithLogicalLocations(logicalLocations []*ExternalPropertyFileReference) *ExternalPropertyFileReferences

WithLogicalLocations sets the LogicalLocations

func (*ExternalPropertyFileReferences) WithPolicies added in v2.0.1

func (externalPropertyFileReferences *ExternalPropertyFileReferences) WithPolicies(policies []*ExternalPropertyFileReference) *ExternalPropertyFileReferences

WithPolicies sets the Policies

func (*ExternalPropertyFileReferences) WithResults added in v2.0.1

func (externalPropertyFileReferences *ExternalPropertyFileReferences) WithResults(results []*ExternalPropertyFileReference) *ExternalPropertyFileReferences

WithResults sets the Results

func (*ExternalPropertyFileReferences) WithTaxonomies added in v2.0.1

func (externalPropertyFileReferences *ExternalPropertyFileReferences) WithTaxonomies(taxonomies []*ExternalPropertyFileReference) *ExternalPropertyFileReferences

WithTaxonomies sets the Taxonomies

func (*ExternalPropertyFileReferences) WithThreadFlowLocations added in v2.0.1

func (externalPropertyFileReferences *ExternalPropertyFileReferences) WithThreadFlowLocations(threadFlowLocations []*ExternalPropertyFileReference) *ExternalPropertyFileReferences

WithThreadFlowLocations sets the ThreadFlowLocations

func (*ExternalPropertyFileReferences) WithTranslations added in v2.0.1

func (externalPropertyFileReferences *ExternalPropertyFileReferences) WithTranslations(translation []*ExternalPropertyFileReference) *ExternalPropertyFileReferences

WithTranslations sets the Translations

func (*ExternalPropertyFileReferences) WithWebRequests added in v2.0.1

func (externalPropertyFileReferences *ExternalPropertyFileReferences) WithWebRequests(webRequests []*ExternalPropertyFileReference) *ExternalPropertyFileReferences

WithWebRequests sets the WebRequests

func (*ExternalPropertyFileReferences) WithWebResponses added in v2.0.1

func (externalPropertyFileReferences *ExternalPropertyFileReferences) WithWebResponses(webResponses []*ExternalPropertyFileReference) *ExternalPropertyFileReferences

WithWebResponses sets the WebResponses

type Fix

type Fix struct {
	Description     *Message          `json:"description,omitempty"`
	ArtifactChanges []*ArtifactChange `json:"artifactChanges"`
	PropertyBag
}

Fix ...

func NewFix

func NewFix() *Fix

NewFix creates a new Fix and returns a pointer to it

func (*Fix) AddArtifactChanges added in v2.0.1

func (fix *Fix) AddArtifactChanges(artifactChange *ArtifactChange)

AddArtifactChanges ...

func (*Fix) WithArtifactChanges added in v2.0.1

func (fix *Fix) WithArtifactChanges(artifactChanges []*ArtifactChange) *Fix

WithArtifactChanges sets the ArtifactChanges

func (*Fix) WithDescription

func (fix *Fix) WithDescription(message *Message) *Fix

WithDescription sets the Description

func (*Fix) WithDescriptionMarkdown added in v2.0.1

func (fix *Fix) WithDescriptionMarkdown(markdown string) *Fix

WithDescriptionMarkdown sets the DescriptionMarkdown

func (*Fix) WithDescriptionText added in v2.0.1

func (fix *Fix) WithDescriptionText(text string) *Fix

WithDescriptionText sets the DescriptionText

type Graph added in v2.0.1

type Graph struct {
	Description *Message `json:"description,omitempty"`
	Edges       []*Edge  `json:"edges,omitempty"`
	Nodes       []*Node  `json:"nodes,omitempty"`
	PropertyBag
}

Graph ...

func NewGraph added in v2.0.1

func NewGraph() *Graph

NewGraph creates a new Graph and returns a pointer to it

func (*Graph) AddEdge added in v2.0.1

func (graph *Graph) AddEdge(edge *Edge)

AddEdge ...

func (*Graph) AddNode added in v2.0.1

func (graph *Graph) AddNode(node *Node)

AddNode ...

func (*Graph) WithDescription added in v2.0.1

func (graph *Graph) WithDescription(message *Message) *Graph

WithDescription sets the Description

func (*Graph) WithDescriptionMarkdown added in v2.0.1

func (graph *Graph) WithDescriptionMarkdown(markdown string) *Graph

WithDescriptionMarkdown sets the DescriptionMarkdown

func (*Graph) WithDescriptionText added in v2.0.1

func (graph *Graph) WithDescriptionText(text string) *Graph

WithDescriptionText sets the DescriptionText

func (*Graph) WithEdges added in v2.0.1

func (graph *Graph) WithEdges(edges []*Edge) *Graph

WithEdges sets the Edges

func (*Graph) WithNodes added in v2.0.1

func (graph *Graph) WithNodes(nodes []*Node) *Graph

WithNodes sets the Nodes

type GraphTraversal added in v2.0.1

type GraphTraversal struct {
	Description      *Message                             `json:"description,omitempty"`
	EdgeTraversals   []*EdgeTraversal                     `json:"edgeTraversals,omitempty"`
	ImmutableState   map[string]*MultiformatMessageString `json:"immutableState,omitempty"`
	InitialState     map[string]*MultiformatMessageString `json:"initialState,omitempty"`
	ResultGraphIndex *int                                 `json:"resultGraphIndex,omitempty"`
	RunGraphIndex    *int                                 `json:"runGraphIndex,omitempty"`
	PropertyBag
}

GraphTraversal ...

func NewGraphTraversal added in v2.0.1

func NewGraphTraversal() *GraphTraversal

NewGraphTraversal creates a new GraphTraversal and returns a pointer to it

func (*GraphTraversal) AddEdge added in v2.0.1

func (graphTraversal *GraphTraversal) AddEdge(edgeTraversal *EdgeTraversal)

AddEdge ...

func (*GraphTraversal) WithDescription added in v2.0.1

func (graphTraversal *GraphTraversal) WithDescription(message *Message) *GraphTraversal

WithDescription sets the Description

func (*GraphTraversal) WithDescriptionMarkdown added in v2.0.1

func (graphTraversal *GraphTraversal) WithDescriptionMarkdown(markdown string) *GraphTraversal

WithDescriptionMarkdown sets the DescriptionMarkdown

func (*GraphTraversal) WithDescriptionText added in v2.0.1

func (graphTraversal *GraphTraversal) WithDescriptionText(text string) *GraphTraversal

WithDescriptionText sets the DescriptionText

func (*GraphTraversal) WithEdgeTraversals added in v2.0.1

func (graphTraversal *GraphTraversal) WithEdgeTraversals(edgeTraversals []*EdgeTraversal) *GraphTraversal

WithEdgeTraversals sets the EdgeTraversals

func (*GraphTraversal) WithImmutableState added in v2.0.1

func (graphTraversal *GraphTraversal) WithImmutableState(immutableState map[string]*MultiformatMessageString) *GraphTraversal

WithImmutableState sets the ImmutableState

func (*GraphTraversal) WithInitialState added in v2.0.1

func (graphTraversal *GraphTraversal) WithInitialState(initialState map[string]*MultiformatMessageString) *GraphTraversal

WithInitialState sets the InitialState

func (*GraphTraversal) WithResultGraphIndex added in v2.0.1

func (graphTraversal *GraphTraversal) WithResultGraphIndex(index int) *GraphTraversal

WithResultGraphIndex sets the ResultGraphIndex

func (*GraphTraversal) WithRunGraphIndex added in v2.0.1

func (graphTraversal *GraphTraversal) WithRunGraphIndex(index int) *GraphTraversal

WithRunGraphIndex sets the RunGraphIndex

type Invocation

type Invocation struct {
	Account                            *string                  `json:"account,omitempty"`
	Arguments                          []string                 `json:"arguments,omitempty"`
	CommandLine                        *string                  `json:"commandLine,omitempty"`
	EndTimeUTC                         *time.Time               `json:"endTimeUtc,omitempty"`
	EnvironmentVariables               map[string]string        `json:"environmentVariables,omitempty"`
	ExecutableLocation                 *ArtifactLocation        `json:"executableLocation,omitempty"`
	ExecutionSuccessful                *bool                    `json:"executionSuccessful"`
	ExitCode                           *int                     `json:"exitCode,omitempty"`
	ExitCodeDescription                *string                  `json:"exitCodeDescription,omitempty"`
	ExitSignalName                     *string                  `json:"exitSignalName,omitempty"`
	ExitSignalNumber                   *int                     `json:"exitSignalNumber,omitempty"`
	Machine                            *string                  `json:"machine,omitempty"`
	NotificationConfigurationOverrides []*ConfigurationOverride `json:"notificationConfigurationOverrides,omitempty"`
	ProcessID                          *int                     `json:"processId,omitempty"`
	ProcessStartFailureMessage         *string                  `json:"processStartFailureMessage,omitempty"`
	ResponseFiles                      []*ArtifactLocation      `json:"responseFiles,omitempty"`
	RuleConfigurationOverrides         []*ConfigurationOverride `json:"ruleConfigurationOverrides,omitempty"`
	StartTimeUTC                       *time.Time               `json:"startTimeUtc,omitempty"`
	Stderr                             *ArtifactLocation        `json:"stderr,omitempty"`
	Stdin                              *ArtifactLocation        `json:"stdin,omitempty"`
	Stdout                             *ArtifactLocation        `json:"stdout,omitempty"`
	StdoutStderr                       *ArtifactLocation        `json:"stdoutStderr,omitempty"`
	ToolConfigurationNotifications     []*Notification          `json:"toolConfigurationNotifications,omitempty"`
	ToolExecutionNotifications         []*Notification          `json:"toolExecutionNotifications,omitempty"`
	WorkingDirectory                   *ArtifactLocation        `json:"workingDirectory,omitempty"`
	PropertyBag
}

Invocation describes the runtime environment of the analysis tool run.

func NewInvocation added in v2.0.1

func NewInvocation() *Invocation

NewInvocation creates a new Invocation and returns a pointer to it

func (*Invocation) AddArgument added in v2.0.1

func (invocation *Invocation) AddArgument(argument string)

AddArgument ...

func (*Invocation) AddNotificationConfigurationOverride added in v2.0.1

func (invocation *Invocation) AddNotificationConfigurationOverride(override *ConfigurationOverride)

AddNotificationConfigurationOverride ...

func (*Invocation) AddResponseFile added in v2.0.1

func (invocation *Invocation) AddResponseFile(responseFile *ArtifactLocation)

AddResponseFile ...

func (*Invocation) AddRuleConfigurationOverride added in v2.0.1

func (invocation *Invocation) AddRuleConfigurationOverride(override *ConfigurationOverride)

AddRuleConfigurationOverride ...

func (*Invocation) AddTToolExecutionNotification added in v2.0.1

func (invocation *Invocation) AddTToolExecutionNotification(toolExecutionNotification *Notification)

AddTToolExecutionNotification ...

func (*Invocation) AddToolConfigurationNotification added in v2.0.1

func (invocation *Invocation) AddToolConfigurationNotification(toolConfigNotification *Notification)

AddToolConfigurationNotification ...

func (*Invocation) SetEnvironmentVariable added in v2.0.1

func (invocation *Invocation) SetEnvironmentVariable(name, value string)

SetEnvironmentVariable ...

func (*Invocation) WithAccount added in v2.0.1

func (invocation *Invocation) WithAccount(account string) *Invocation

WithAccount sets the Account

func (*Invocation) WithArguments added in v2.0.1

func (invocation *Invocation) WithArguments(arguments []string) *Invocation

WithArguments sets the Arguments

func (*Invocation) WithCommanLine added in v2.0.1

func (invocation *Invocation) WithCommanLine(commandLine string) *Invocation

WithCommanLine sets the CommanLine

func (*Invocation) WithEndTimeUTC

func (invocation *Invocation) WithEndTimeUTC(endTime time.Time) *Invocation

WithEndTimeUTC sets the instant when the invocation ended and returns the same Invocation.

func (*Invocation) WithEnvironmentVariables added in v2.0.1

func (invocation *Invocation) WithEnvironmentVariables(environmentVariables map[string]string) *Invocation

WithEnvironmentVariables sets the EnvironmentVariables

func (*Invocation) WithExecutableLocation added in v2.0.1

func (invocation *Invocation) WithExecutableLocation(executableLocation *ArtifactLocation) *Invocation

WithExecutableLocation sets the ExecutableLocation

func (*Invocation) WithExecutionSuccess added in v2.0.1

func (invocation *Invocation) WithExecutionSuccess(executionSuccessful bool) *Invocation

WithExecutionSuccess sets the ExecutionSuccess

func (*Invocation) WithExitCode added in v2.0.1

func (invocation *Invocation) WithExitCode(exitCode int) *Invocation

WithExitCode sets the ExitCode

func (*Invocation) WithExitCodeDescription added in v2.0.1

func (invocation *Invocation) WithExitCodeDescription(exitCodeDescription string) *Invocation

WithExitCodeDescription sets the ExitCodeDescription

func (*Invocation) WithExitSignalName added in v2.0.1

func (invocation *Invocation) WithExitSignalName(exitSignalName string) *Invocation

WithExitSignalName sets the ExitSignalName

func (*Invocation) WithExitSignalNumber added in v2.0.1

func (invocation *Invocation) WithExitSignalNumber(exitSignalNumber int) *Invocation

WithExitSignalNumber sets the ExitSignalNumber

func (*Invocation) WithMachine added in v2.0.1

func (invocation *Invocation) WithMachine(machine string) *Invocation

WithMachine sets the Machine

func (*Invocation) WithNotificationConfigurationOverrides added in v2.0.1

func (invocation *Invocation) WithNotificationConfigurationOverrides(overrides []*ConfigurationOverride) *Invocation

WithNotificationConfigurationOverrides sets the NotificationConfigurationOverrides

func (*Invocation) WithProcessID added in v2.0.1

func (invocation *Invocation) WithProcessID(processID int) *Invocation

WithProcessID sets the ProcessID

func (*Invocation) WithProcessStartFailureMessage added in v2.0.1

func (invocation *Invocation) WithProcessStartFailureMessage(failureMessage string) *Invocation

WithProcessStartFailureMessage sets the ProcessStartFailureMessage

func (*Invocation) WithResponseFiles added in v2.0.1

func (invocation *Invocation) WithResponseFiles(responseFiles []*ArtifactLocation) *Invocation

WithResponseFiles sets the ResponseFiles

func (*Invocation) WithRuleConfigurationOverrides added in v2.0.1

func (invocation *Invocation) WithRuleConfigurationOverrides(overrides []*ConfigurationOverride) *Invocation

WithRuleConfigurationOverrides sets the RuleConfigurationOverrides

func (*Invocation) WithStartTimeUTC

func (invocation *Invocation) WithStartTimeUTC(startTime time.Time) *Invocation

WithStartTimeUTC sets the instant when the invocation started and returns the same Invocation.

func (*Invocation) WithStdErr added in v2.0.1

func (invocation *Invocation) WithStdErr(stdErr *ArtifactLocation) *Invocation

WithStdErr sets the StdErr

func (*Invocation) WithStdIn added in v2.0.1

func (invocation *Invocation) WithStdIn(stdIn *ArtifactLocation) *Invocation

WithStdIn sets the StdIn

func (*Invocation) WithStdout added in v2.0.1

func (invocation *Invocation) WithStdout(stdOut *ArtifactLocation) *Invocation

WithStdout sets the Stdout

func (*Invocation) WithStdoutStderr added in v2.0.1

func (invocation *Invocation) WithStdoutStderr(stdoutStderr *ArtifactLocation) *Invocation

WithStdoutStderr sets the StdoutStderr

func (*Invocation) WithToolConfigurationNotifications added in v2.0.1

func (invocation *Invocation) WithToolConfigurationNotifications(toolConfigNotifications []*Notification) *Invocation

WithToolConfigurationNotifications sets the ToolConfigurationNotifications

func (*Invocation) WithToolExecutionNotifications added in v2.0.1

func (invocation *Invocation) WithToolExecutionNotifications(toolExecutionNotification []*Notification) *Invocation

WithToolExecutionNotifications sets the ToolExecutionNotifications

func (*Invocation) WithWorkingDirectory

func (invocation *Invocation) WithWorkingDirectory(workingDirectory *ArtifactLocation) *Invocation

WithWorkingDirectory sets the current working directory of the invocation and returns the same Invocation.

type Location

type Location struct {
	Id               *uint                   `json:"id,omitempty"`
	PhysicalLocation *PhysicalLocation       `json:"physicalLocation,omitempty"`
	LogicalLocations []*LogicalLocation      `json:"logicalLocations,omitempty"`
	Message          *Message                `json:"message,omitempty"`
	Annotations      []*Region               `json:"annotations,omitempty"`
	Relationships    []*LocationRelationship `json:"relationships,omitempty"`
	PropertyBag
}

Location ...

func NewLocation

func NewLocation() *Location

NewLocation creates a new Location and returns a pointer to it

func NewLocationWithPhysicalLocation

func NewLocationWithPhysicalLocation(physicalLocation *PhysicalLocation) *Location

NewLocationWithPhysicalLocation creates a new LocationWithPhysicalLocation and returns a pointer to it

func (*Location) AddAnnotation added in v2.0.1

func (location *Location) AddAnnotation(annotation *Region)

AddAnnotation ...

func (*Location) AddLogicalLocations added in v2.0.1

func (location *Location) AddLogicalLocations(logicalLocation *LogicalLocation)

AddLogicalLocations ...

func (*Location) AddRelationship added in v2.0.1

func (location *Location) AddRelationship(locationRelationship *LocationRelationship)

AddRelationship ...

func (*Location) WithAnnotations added in v2.0.1

func (location *Location) WithAnnotations(annotations []*Region) *Location

WithAnnotations sets the Annotations

func (*Location) WithDescriptionMarkdown added in v2.0.1

func (location *Location) WithDescriptionMarkdown(markdown string) *Location

WithDescriptionMarkdown sets the DescriptionMarkdown

func (*Location) WithDescriptionText added in v2.0.1

func (location *Location) WithDescriptionText(text string) *Location

WithDescriptionText sets the DescriptionText

func (*Location) WithId

func (location *Location) WithId(id int) *Location

WithId sets the Id

func (*Location) WithLogicalLocations added in v2.0.1

func (location *Location) WithLogicalLocations(logicalLocations []*LogicalLocation) *Location

WithLogicalLocations sets the LogicalLocations

func (*Location) WithMessage

func (location *Location) WithMessage(message *Message) *Location

WithMessage sets the Message

func (*Location) WithPhysicalLocation

func (location *Location) WithPhysicalLocation(physicalLocation *PhysicalLocation) *Location

WithPhysicalLocation sets the PhysicalLocation

func (*Location) WithRelationships added in v2.0.1

func (location *Location) WithRelationships(locationRelationships []*LocationRelationship) *Location

WithRelationships sets the Relationships

type LocationRelationship

type LocationRelationship struct {
	Target      uint     `json:"target"`
	Kinds       []string `json:"kinds,omitempty"`
	Description *Message `json:"description,omitempty"`
	PropertyBag
}

LocationRelationship ...

func NewLocationRelationship

func NewLocationRelationship(target int) *LocationRelationship

NewLocationRelationship creates a new LocationRelationship and returns a pointer to it

func (*LocationRelationship) AddKind added in v2.0.1

func (locationRelationship *LocationRelationship) AddKind(kind string)

AddKind ...

func (*LocationRelationship) WithDescription

func (locationRelationship *LocationRelationship) WithDescription(message *Message) *LocationRelationship

WithDescription sets the Description

func (*LocationRelationship) WithDescriptionMarkdown added in v2.0.1

func (locationRelationship *LocationRelationship) WithDescriptionMarkdown(markdown string) *LocationRelationship

WithDescriptionMarkdown sets the DescriptionMarkdown

func (*LocationRelationship) WithDescriptionText added in v2.0.1

func (locationRelationship *LocationRelationship) WithDescriptionText(text string) *LocationRelationship

WithDescriptionText sets the DescriptionText

func (*LocationRelationship) WithKinds added in v2.0.1

func (locationRelationship *LocationRelationship) WithKinds(kinds []string) *LocationRelationship

WithKinds sets the Kinds

type LogicalLocation

type LogicalLocation struct {
	Index              *uint   `json:"index,omitempty"`
	Name               *string `json:"name,omitempty"`
	FullyQualifiedName *string `json:"fullyQualifiedName,omitempty"`
	DecoratedName      *string `json:"decoratedName,omitempty"`
	Kind               *string `json:"kind,omitempty"`
	ParentIndex        *uint   `json:"parentIndex,omitempty"`
	PropertyBag
}

LogicalLocation ...

func NewLogicalLocation

func NewLogicalLocation() *LogicalLocation

NewLogicalLocation creates a new LogicalLocation and returns a pointer to it

func (*LogicalLocation) WithDecoratedName

func (l *LogicalLocation) WithDecoratedName(decoratedName string) *LogicalLocation

WithDecoratedName sets the DecoratedName

func (*LogicalLocation) WithFullyQualifiedName

func (l *LogicalLocation) WithFullyQualifiedName(fullyQualifiedName string) *LogicalLocation

WithFullyQualifiedName sets the FullyQualifiedName

func (*LogicalLocation) WithIndex

func (l *LogicalLocation) WithIndex(index int) *LogicalLocation

WithIndex sets the Index

func (*LogicalLocation) WithKind

func (l *LogicalLocation) WithKind(kind string) *LogicalLocation

WithKind sets the Kind

func (*LogicalLocation) WithName

func (l *LogicalLocation) WithName(name string) *LogicalLocation

WithName sets the Name

func (*LogicalLocation) WithParentIndex

func (l *LogicalLocation) WithParentIndex(parentIndex int) *LogicalLocation

WithParentIndex sets the ParentIndex

type Message

type Message struct {
	Text      *string  `json:"text,omitempty"`
	Markdown  *string  `json:"markdown,omitempty"`
	ID        *string  `json:"id,omitempty"`
	Arguments []string `json:"arguments,omitempty"`
	PropertyBag
}

Message ...

func NewMarkdownMessage

func NewMarkdownMessage(markdown string) *Message

NewMarkdownMessage creates a new MarkdownMessage and returns a pointer to it

func NewMessage

func NewMessage() *Message

NewMessage creates a new Message and returns a pointer to it

func NewTextMessage

func NewTextMessage(text string) *Message

NewTextMessage creates a new TextMessage and returns a pointer to it

func (*Message) AddArgument added in v2.0.1

func (message *Message) AddArgument(argument string)

AddArgument ...

func (*Message) WithArguments added in v2.0.1

func (message *Message) WithArguments(arguments []string) *Message

WithArguments sets the Arguments

func (*Message) WithID added in v2.0.11

func (message *Message) WithID(id string) *Message

WithId sets the ID

func (*Message) WithMarkdown

func (message *Message) WithMarkdown(markdown string) *Message

WithMarkdown sets the Markdown

func (*Message) WithText

func (message *Message) WithText(text string) *Message

WithText sets the Text

type MessageStrings added in v2.2.1

type MessageStrings map[string]MultiformatMessageString

type MultiformatMessageString

type MultiformatMessageString struct {
	Text     *string `json:"text,omitempty"`
	Markdown *string `json:"markdown,omitempty"`
	PropertyBag
}

MultiformatMessageString ...

func NewMarkdownMultiformatMessageString

func NewMarkdownMultiformatMessageString(markdown string) *MultiformatMessageString

NewMarkdownMultiformatMessageString creates a new MarkdownMultiformatMessageString and returns a pointer to it

func NewMultiformatMessageString

func NewMultiformatMessageString(text string) *MultiformatMessageString

NewMultiformatMessageString creates a new MultiformatMessageString and returns a pointer to it

func (*MultiformatMessageString) WithMarkdown

func (multiFormatMessageString *MultiformatMessageString) WithMarkdown(markdown string) *MultiformatMessageString

WithMarkdown sets the Markdown

func (*MultiformatMessageString) WithText added in v2.0.1

func (multiFormatMessageString *MultiformatMessageString) WithText(text string) *MultiformatMessageString

WithText sets the Text

type Node added in v2.0.1

type Node struct {
	Children []*Node   `json:"children,omitempty"`
	ID       string    `json:"id"`
	Label    *Message  `json:"label,omitempty"`
	Location *Location `json:"location,omitempty"`
	PropertyBag
}

Node ...

func NewNode added in v2.0.1

func NewNode(id string) *Node

NewNode creates a new Node and returns a pointer to it

func (*Node) AddChild added in v2.0.1

func (node *Node) AddChild(child *Node)

AddChild ...

func (*Node) WithChildren added in v2.0.1

func (node *Node) WithChildren(children []*Node) *Node

WithChildren sets the Children

func (*Node) WithLabel added in v2.0.1

func (node *Node) WithLabel(message *Message) *Node

WithLabel sets the Label

func (*Node) WithLabelMarkdown added in v2.0.1

func (node *Node) WithLabelMarkdown(markdown string) *Node

WithLabelMarkdown sets the LabelMarkdown

func (*Node) WithLabelText added in v2.0.1

func (node *Node) WithLabelText(text string) *Node

WithLabelText sets the LabelText

type Notification added in v2.0.1

type Notification struct {
	AssociatedRule *ReportingDescriptorReference `json:"associatedRule,omitempty"`
	Descriptor     *ReportingDescriptorReference `json:"descriptor,omitempty"`
	Exception      *Exception                    `json:"exception,omitempty"`
	Level          string                        `json:"level,omitempty"`
	Locations      []*Location                   `json:"locations,omitempty"`
	Message        *Message                      `json:"message"`
	ThreadID       *int                          `json:"threadId,omitempty"`
	TimeUTC        *time.Time                    `json:"timeUtc,omitempty"`
	PropertyBag
}

Notification ...

func NewNotification added in v2.0.1

func NewNotification() *Notification

NewNotification creates a new Notification and returns a pointer to it

func (*Notification) AddLocation added in v2.0.1

func (notification *Notification) AddLocation(location *Location)

AddLocation ...

func (*Notification) WithAssociatedRule added in v2.0.1

func (notification *Notification) WithAssociatedRule(associatedRule *ReportingDescriptorReference) *Notification

WithAssociatedRule sets the AssociatedRule

func (*Notification) WithDescriptor added in v2.0.1

func (notification *Notification) WithDescriptor(descriptor *ReportingDescriptorReference) *Notification

WithDescriptor sets the Descriptor

func (*Notification) WithException added in v2.0.1

func (notification *Notification) WithException(exception *Exception) *Notification

WithException sets the Exception

func (*Notification) WithLevel added in v2.0.1

func (notification *Notification) WithLevel(level string) *Notification

WithLevel sets the Level

func (*Notification) WithLocations added in v2.0.1

func (notification *Notification) WithLocations(locations []*Location) *Notification

WithLocations sets the Locations

func (*Notification) WithMessage added in v2.0.1

func (notification *Notification) WithMessage(message *Message) *Notification

WithMessage sets the Message

func (*Notification) WithMessageMarkdown added in v2.0.1

func (notification *Notification) WithMessageMarkdown(markdown string) *Notification

WithMessageMarkdown sets the Message markdown

func (*Notification) WithTextMessage added in v2.0.1

func (notification *Notification) WithTextMessage(text string) *Notification

WithTextMessage sets the Message text

func (*Notification) WithThreadID added in v2.0.1

func (notification *Notification) WithThreadID(threadID int) *Notification

WithThreadID sets the ThreadID

func (*Notification) WithTimeUTC added in v2.0.1

func (notification *Notification) WithTimeUTC(timeUTC *time.Time) *Notification

WithTimeUTC sets the TimeUTC

type PhysicalLocation

type PhysicalLocation struct {
	ArtifactLocation *ArtifactLocation `json:"artifactLocation,omitempty"`
	Region           *Region           `json:"region,omitempty"`
	ContextRegion    *Region           `json:"contextRegion,omitempty"`
	Address          *Address          `json:"address,omitempty"`
	PropertyBag
}

PhysicalLocation ...

func NewPhysicalLocation

func NewPhysicalLocation() *PhysicalLocation

NewPhysicalLocation creates a new PhysicalLocation and returns a pointer to it

func (*PhysicalLocation) WithAddress

func (pl *PhysicalLocation) WithAddress(address *Address) *PhysicalLocation

WithAddress sets the Address

func (*PhysicalLocation) WithArtifactLocation

func (pl *PhysicalLocation) WithArtifactLocation(artifactLocation *ArtifactLocation) *PhysicalLocation

WithArtifactLocation sets the ArtifactLocation

func (*PhysicalLocation) WithContextRegion

func (pl *PhysicalLocation) WithContextRegion(contextRegion *Region) *PhysicalLocation

WithContextRegion sets the ContextRegion

func (*PhysicalLocation) WithRegion

func (pl *PhysicalLocation) WithRegion(region *Region) *PhysicalLocation

WithRegion sets the Region

type Properties

type Properties map[string]interface{}

Properties ...

type PropertyBag

type PropertyBag struct {
	Properties Properties `json:"properties,omitempty"`
}

PropertyBag ...

func NewPropertyBag

func NewPropertyBag() *PropertyBag

NewPropertyBag creates a new PropertyBag and returns a pointer to it

func (*PropertyBag) Add

func (propertyBag *PropertyBag) Add(key string, value interface{})

Add ...

func (*PropertyBag) AddBoolean

func (propertyBag *PropertyBag) AddBoolean(key string, value bool)

AddBoolean ...

func (*PropertyBag) AddInteger

func (propertyBag *PropertyBag) AddInteger(key string, value int)

AddInteger ...

func (*PropertyBag) AddString

func (propertyBag *PropertyBag) AddString(key, value string)

AddString ...

func (*PropertyBag) AttachPropertyBag added in v2.0.1

func (propertyBag *PropertyBag) AttachPropertyBag(pb *PropertyBag)

AttachPropertyBag adds a property bag to a rule

type Rectangle added in v2.0.1

type Rectangle struct {
	Bottom  *float64 `json:"bottom,omitempty"`
	Left    *float64 `json:"left,omitempty"`
	Right   *float64 `json:"right,omitempty"`
	Top     *float64 `json:"top,omitempty"`
	Message *Message `json:"message,omitempty"`
	PropertyBag
}

Rectangle ...

func NewRectangle added in v2.0.1

func NewRectangle() *Rectangle

NewRectangle creates a new Rectangle and returns a pointer to it

func (*Rectangle) WithBottom added in v2.0.1

func (rectangle *Rectangle) WithBottom(bottom float64) *Rectangle

WithBottom sets the Bottom

func (*Rectangle) WithLeft added in v2.0.1

func (rectangle *Rectangle) WithLeft(withLeft float64) *Rectangle

WithLeft sets the Left

func (*Rectangle) WithMessage added in v2.0.1

func (rectangle *Rectangle) WithMessage(message *Message) *Rectangle

WithMessage sets the Message

func (*Rectangle) WithMessageMarkdown added in v2.0.1

func (rectangle *Rectangle) WithMessageMarkdown(markdown string) *Rectangle

WithMessageMarkdown sets the Message markdown

func (*Rectangle) WithRight added in v2.0.1

func (rectangle *Rectangle) WithRight(right float64) *Rectangle

WithRight sets the Right

func (*Rectangle) WithTextMessage added in v2.0.1

func (rectangle *Rectangle) WithTextMessage(text string) *Rectangle

WithTextMessage sets the Message text

func (*Rectangle) WithTop added in v2.0.1

func (rectangle *Rectangle) WithTop(top float64) *Rectangle

WithTop sets the Top

type Region

type Region struct {
	StartLine      *int             `json:"startLine,omitempty"`
	StartColumn    *int             `json:"startColumn,omitempty"`
	EndLine        *int             `json:"endLine,omitempty"`
	EndColumn      *int             `json:"endColumn,omitempty"`
	CharOffset     *int             `json:"charOffset,omitempty"`
	CharLength     *int             `json:"charLength,omitempty"`
	ByteOffset     *int             `json:"byteOffset,omitempty"`
	ByteLength     *int             `json:"byteLength,omitempty"`
	Snippet        *ArtifactContent `json:"snippet,omitempty"`
	Message        *Message         `json:"message,omitempty"`
	SourceLanguage *string          `json:"sourceLanguage,omitempty"`
	PropertyBag
}

Region ...

func NewRegion

func NewRegion() *Region

NewRegion creates a new Region and returns a pointer to it

func NewSimpleRegion

func NewSimpleRegion(startLine, endLine int) *Region

NewSimpleRegion creates a new SimpleRegion and returns a pointer to it

func (*Region) WithByteLength

func (region *Region) WithByteLength(byteLength int) *Region

WithByteLength sets the ByteLength

func (*Region) WithByteOffset

func (region *Region) WithByteOffset(byteOffset int) *Region

WithByteOffset sets the ByteOffset

func (*Region) WithCharLength

func (region *Region) WithCharLength(charLength int) *Region

WithCharLength sets the CharLength

func (*Region) WithCharOffset

func (region *Region) WithCharOffset(charOffset int) *Region

WithCharOffset sets the CharOffset

func (*Region) WithEndColumn

func (region *Region) WithEndColumn(endColumn int) *Region

WithEndColumn sets the EndColumn

func (*Region) WithEndLine

func (region *Region) WithEndLine(endLine int) *Region

WithEndLine sets the EndLine

func (*Region) WithMessage

func (region *Region) WithMessage(message *Message) *Region

WithMessage sets the Message

func (*Region) WithMessageMarkdown added in v2.0.1

func (region *Region) WithMessageMarkdown(markdown string) *Region

WithMessageMarkdown sets the Message markdown

func (*Region) WithSnippet

func (region *Region) WithSnippet(snippet *ArtifactContent) *Region

WithSnippet sets the Snippet

func (*Region) WithSourceLanguage

func (region *Region) WithSourceLanguage(sourceLanguage string) *Region

WithSourceLanguage sets the SourceLanguage

func (*Region) WithStartColumn

func (region *Region) WithStartColumn(startColumn int) *Region

WithStartColumn sets the StartColumn

func (*Region) WithStartLine

func (region *Region) WithStartLine(startLine int) *Region

WithStartLine sets the StartLine

func (*Region) WithTextMessage added in v2.0.1

func (region *Region) WithTextMessage(text string) *Region

WithTextMessage sets the Message text

type Replacement

type Replacement struct {
	DeletedRegion   Region           `json:"deletedRegion"`
	InsertedContent *ArtifactContent `json:"insertedContent,omitempty"`
	PropertyBag
}

Replacement ...

func NewReplacement

func NewReplacement(region *Region) *Replacement

NewReplacement creates a new Replacement and returns a pointer to it

func (*Replacement) WithInsertedContent

func (r *Replacement) WithInsertedContent(artifactContent *ArtifactContent) *Replacement

WithInsertedContent sets the InsertedContent

type Report

type Report struct {
	PropertyBag
	InlineExternalProperties []*ExternalProperties `json:"inlineExternalProperties,omitempty"`
	Version                  string                `json:"version"`
	Schema                   string                `json:"$schema,omitempty"`
	Runs                     []*Run                `json:"runs"`
}

Report is the encapsulating type representing a Sarif Report

func FromBytes

func FromBytes(content []byte) (*Report, error)

FromBytes loads a Report from a byte array

func FromString

func FromString(content string) (*Report, error)

FromString loads a Report from string content

func New

func New(version Version, includeSchema ...bool) (*Report, error)

New Creates a new Report or returns an error

func Open

func Open(filename string) (*Report, error)

Open loads a Report from a file

func (*Report) AddRun

func (sarif *Report) AddRun(run *Run)

AddRun allows adding run information to the current report

func (*Report) PrettyWrite

func (sarif *Report) PrettyWrite(w io.Writer) error

PrettyWrite writes the JSON output with indentation

func (*Report) Write

func (sarif *Report) Write(w io.Writer) error

Write writes the JSON as a string with no formatting

func (*Report) WriteFile

func (sarif *Report) WriteFile(filename string) error

WriteFile will write the report to a file using a pretty formatter

type ReportingConfiguration

type ReportingConfiguration struct {
	Enabled    *bool        `json:"enabled,omitempty"`
	Level      string       `json:"level,omitempty"`
	Parameters *PropertyBag `json:"parameters,omitempty"`
	Rank       *float64     `json:"rank,omitempty"`
	PropertyBag
}

ReportingConfiguration ...

func NewReportingConfiguration added in v2.0.1

func NewReportingConfiguration() *ReportingConfiguration

NewReportingConfiguration creates a new ReportingConfiguration and returns a pointer to it

func (*ReportingConfiguration) WithEnabled added in v2.0.1

func (reportingConfiguration *ReportingConfiguration) WithEnabled(enabled bool) *ReportingConfiguration

WithEnabled sets the Enabled

func (*ReportingConfiguration) WithLevel added in v2.0.1

func (reportingConfiguration *ReportingConfiguration) WithLevel(level string) *ReportingConfiguration

WithLevel sets the Level

func (*ReportingConfiguration) WithParameters added in v2.0.1

func (reportingConfiguration *ReportingConfiguration) WithParameters(parameters *PropertyBag) *ReportingConfiguration

WithParameters sets the Parameters

func (*ReportingConfiguration) WithRank added in v2.0.1

func (reportingConfiguration *ReportingConfiguration) WithRank(rank float64) *ReportingConfiguration

WithRank sets the Rank

type ReportingDescriptor

type ReportingDescriptor struct {
	PropertyBag
	ID                   string                    `json:"id"`
	Name                 *string                   `json:"name,omitempty"`
	ShortDescription     *MultiformatMessageString `json:"shortDescription"`
	FullDescription      *MultiformatMessageString `json:"fullDescription,omitempty"`
	DefaultConfiguration *ReportingConfiguration   `json:"defaultConfiguration,omitempty"`
	DeprecatedIds        []string                  `json:"deprecatedIds,omitempty"`
	DeprecatedGuids      []string                  `json:"deprecatedGuids,omitempty"`
	DeprecatedNames      []string                  `json:"deprecatedNames,omitempty"`
	HelpURI              *string                   `json:"helpUri,omitempty"`
	Help                 *MultiformatMessageString `json:"help,omitempty"`
	MessageStrings       *MessageStrings           `json:"messageStrings,omitempty"`
	Properties           Properties                `json:"properties,omitempty"`
}

ReportingDescriptor specifies a Sarif ReportingDescriptor object

func NewRule added in v2.0.1

func NewRule(ruleID string) *ReportingDescriptor

NewRule creates a new Rule and returns a pointer to it

func (*ReportingDescriptor) AttachPropertyBag

func (rule *ReportingDescriptor) AttachPropertyBag(pb *PropertyBag)

AttachPropertyBag adds a property bag to a rule

func (*ReportingDescriptor) WithDefaultConfiguration added in v2.0.15

func (rule *ReportingDescriptor) WithDefaultConfiguration(configuration *ReportingConfiguration) *ReportingDescriptor

WithDefaultConfiguration adds the default configuration to the rule

func (*ReportingDescriptor) WithDescription

func (rule *ReportingDescriptor) WithDescription(description string) *ReportingDescriptor

WithDescription specifies short description for a rule and returns the updated rule. Short description should be a single sentence that is understandable when visible space is limited to a single line of text.

func (*ReportingDescriptor) WithFullDescription

func (rule *ReportingDescriptor) WithFullDescription(description *MultiformatMessageString) *ReportingDescriptor

WithFullDescription specifies full description for a rule and returns the updated rule. Full description should, as far as possible, provide details sufficient to enable resolution of any problem indicated by the result.

func (*ReportingDescriptor) WithHelp

WithHelp sets the rule Help to the provided multiformat message

func (*ReportingDescriptor) WithHelpURI

func (rule *ReportingDescriptor) WithHelpURI(helpURI string) *ReportingDescriptor

WithHelpURI specifies a helpURI for a rule and returns the updated rule

func (*ReportingDescriptor) WithMarkdownHelp

func (rule *ReportingDescriptor) WithMarkdownHelp(markdown string) *ReportingDescriptor

WithMarkdownHelp specifies a help text for a rule and returns the updated rule

func (*ReportingDescriptor) WithName

func (rule *ReportingDescriptor) WithName(name string) *ReportingDescriptor

WithName specifies rule name that is understandable to an end user and returns the updated rule.

func (*ReportingDescriptor) WithProperties

func (rule *ReportingDescriptor) WithProperties(properties Properties) *ReportingDescriptor

WithProperties specifies properties for a rule and returns the updated rule

func (*ReportingDescriptor) WithShortDescription

func (rule *ReportingDescriptor) WithShortDescription(description *MultiformatMessageString) *ReportingDescriptor

WithShortDescription specifies short description for a rule and returns the updated rule. Short description should be a single sentence that is understandable when visible space is limited to a single line of text.

func (*ReportingDescriptor) WithTextHelp added in v2.0.1

func (rule *ReportingDescriptor) WithTextHelp(text string) *ReportingDescriptor

WithTextHelp specifies a help text for a rule and returns the updated rule

type ReportingDescriptorReference

type ReportingDescriptorReference struct {
	PropertyBag
	Id            *string                 `json:"id,omitempty"`
	Index         *uint                   `json:"index,omitempty"`
	Guid          *string                 `json:"guid,omitempty"`
	ToolComponent *ToolComponentReference `json:"toolComponent,omitempty"`
}

ReportingDescriptorReference ...

func NewReportingDescriptorReference

func NewReportingDescriptorReference() *ReportingDescriptorReference

NewReportingDescriptorReference creates a new ReportingDescriptorReference and returns a pointer to it

func (*ReportingDescriptorReference) WithGuid

WithGuid sets the Guid

func (*ReportingDescriptorReference) WithId

WithId sets the Id

func (*ReportingDescriptorReference) WithIndex

WithIndex sets the Index

func (*ReportingDescriptorReference) WithToolComponentReference

func (r *ReportingDescriptorReference) WithToolComponentReference(toolComponentRef *ToolComponentReference) *ReportingDescriptorReference

WithToolComponentReference sets the ToolComponentReference

type Result

type Result struct {
	PropertyBag
	Guid                *string                         `json:"guid,omitempty"`
	CorrelationGuid     *string                         `json:"correlationGuid,omitempty"`
	RuleID              *string                         `json:"ruleId,omitempty"`
	RuleIndex           *uint                           `json:"ruleIndex,omitempty"`
	Rule                *ReportingDescriptorReference   `json:"rule,omitempty"`
	Taxa                []*ReportingDescriptorReference `json:"taxa,omitempty"`
	Kind                *string                         `json:"kind,omitempty"`
	Level               *string                         `json:"level,omitempty"`
	Message             Message                         `json:"message"`
	Locations           []*Location                     `json:"locations,omitempty"`
	AnalysisTarget      *ArtifactLocation               `json:"analysisTarget,omitempty"`
	WebRequest          *WebRequest                     `json:"webRequest,omitempty"`
	WebResponse         *WebResponse                    `json:"webResponse,omitempty"`
	Fingerprints        map[string]interface{}          `json:"fingerprints,omitempty"`
	PartialFingerprints map[string]interface{}          `json:"partialFingerprints,omitempty"`
	CodeFlows           []*CodeFlow                     `json:"codeFlows,omitempty"`
	Graphs              []*Graph                        `json:"graphs,omitempty"`
	GraphTraversals     []*GraphTraversal               `json:"graphTraversals,omitempty"`
	Stacks              []*Stack                        `json:"stacks,omitempty"`
	RelatedLocations    []*Location                     `json:"relatedLocations,omitempty"`
	Suppressions        []*Suppression                  `json:"suppressions,omitempty"`
	BaselineState       *string                         `json:"baselineState,omitempty"`
	Rank                *float32                        `json:"rank,omitempty"`
	Attachments         []*Attachment                   `json:"attachments,omitempty"`
	WorkItemUris        []string                        `json:"workItemUris,omitempty"` // can be null
	HostedViewerUri     *string                         `json:"hostedViewerUri,omitempty"`
	Provenance          *ResultProvenance               `json:"provenance,omitempty"`
	Fixes               []*Fix                          `json:"fixes,omitempty"`
	OccurrenceCount     *uint                           `json:"occurrenceCount,omitempty"`
}

Result represents the results block in the sarif report

func NewRuleResult added in v2.0.1

func NewRuleResult(ruleID string) *Result

NewRuleResult ...

func (*Result) AddAttachment added in v2.0.1

func (result *Result) AddAttachment(attachments *Attachment)

AddAttachment ...

func (*Result) AddCodeFlow added in v2.0.1

func (result *Result) AddCodeFlow(codeFlow *CodeFlow)

AddCodeFlow ...

func (*Result) AddFix added in v2.0.1

func (result *Result) AddFix(fix *Fix)

AddFix ...

func (*Result) AddGraph added in v2.0.1

func (result *Result) AddGraph(graph *Graph)

AddGraph ...

func (*Result) AddGraphTraversal added in v2.0.1

func (result *Result) AddGraphTraversal(graphTraversal *GraphTraversal)

AddGraphTraversal ...

func (*Result) AddLocation added in v2.0.1

func (result *Result) AddLocation(location *Location)

AddLocation ...

func (*Result) AddRelatedLocation added in v2.0.1

func (result *Result) AddRelatedLocation(location *Location) *Result

AddRelatedLocation ...

func (*Result) AddStack added in v2.0.1

func (result *Result) AddStack(stack *Stack)

AddStack ...

func (*Result) AddSuppression added in v2.0.1

func (result *Result) AddSuppression(suppression *Suppression)

AddSuppression ...

func (*Result) AddTaxa added in v2.0.1

func (result *Result) AddTaxa(taxa *ReportingDescriptorReference)

AddTaxa ...

func (*Result) AddWorkItemUri added in v2.0.1

func (result *Result) AddWorkItemUri(workItemUri string)

AddWorkItemUri ...

func (*Result) SetFingerPrint added in v2.0.1

func (result *Result) SetFingerPrint(name string, value interface{})

SetFingerPrint ...

func (*Result) SetPartialFingerPrint added in v2.0.1

func (result *Result) SetPartialFingerPrint(name string, value interface{})

SetPartialFingerPrint ...

func (*Result) WithAnalysisTarget

func (result *Result) WithAnalysisTarget(target *ArtifactLocation) *Result

WithAnalysisTarget sets the AnalysisTarget

func (*Result) WithAttachments added in v2.0.1

func (result *Result) WithAttachments(attachments []*Attachment) *Result

WithAttachments sets the Attachments

func (*Result) WithBaselineState

func (result *Result) WithBaselineState(state string) *Result

WithBaselineState sets the BaselineState

func (*Result) WithCodeFlows added in v2.0.1

func (result *Result) WithCodeFlows(codeFlows []*CodeFlow) *Result

WithCodeFlows sets the CodeFlows

func (*Result) WithCorrelationGuid

func (result *Result) WithCorrelationGuid(correlationGuid string) *Result

WithCorrelationGuid sets the CorrelationGuid

func (*Result) WithFingerPrints

func (result *Result) WithFingerPrints(fingerPrints map[string]interface{}) *Result

WithFingerPrints sets the FingerPrints

func (*Result) WithFix

func (result *Result) WithFix(fixes []*Fix) *Result

WithFix sets the Fix

func (*Result) WithGraphTraversal added in v2.0.1

func (result *Result) WithGraphTraversal(graphTraversals []*GraphTraversal) *Result

WithGraphTraversal sets the GraphTraversal

func (*Result) WithGraphs added in v2.0.1

func (result *Result) WithGraphs(graphs []*Graph) *Result

WithGraphs sets the Graphs

func (*Result) WithGuid

func (result *Result) WithGuid(guid string) *Result

WithGuid sets the Guid

func (*Result) WithHostedViewerUri

func (result *Result) WithHostedViewerUri(hostedViewerUri string) *Result

WithHostedViewerUri sets the HostedViewerUri

func (*Result) WithKind

func (result *Result) WithKind(kind string) *Result

WithKind sets the Kind

func (*Result) WithLevel

func (result *Result) WithLevel(level string) *Result

WithLevel sets the Level

func (*Result) WithLocations added in v2.0.1

func (result *Result) WithLocations(locations []*Location) *Result

WithLocations sets the Locations

func (*Result) WithMessage

func (result *Result) WithMessage(message *Message) *Result

WithMessage sets the Message

func (*Result) WithOccurrenceCount

func (result *Result) WithOccurrenceCount(occurrenceCount int) *Result

WithOccurrenceCount sets the OccurrenceCount

func (*Result) WithPartialFingerPrints

func (result *Result) WithPartialFingerPrints(fingerPrints map[string]interface{}) *Result

WithPartialFingerPrints sets the PartialFingerPrints

func (*Result) WithRank

func (result *Result) WithRank(rank float32) *Result

WithRank sets the Rank

func (*Result) WithRelatedLocations added in v2.0.1

func (result *Result) WithRelatedLocations(locations []*Location) *Result

WithRelatedLocations sets the RelatedLocations

func (*Result) WithRule

func (result *Result) WithRule(rule *ReportingDescriptorReference) *Result

WithRule sets the Rule

func (*Result) WithRuleIndex

func (result *Result) WithRuleIndex(ruleIndex int) *Result

WithRuleIndex sets the RuleIndex

func (*Result) WithStack added in v2.0.1

func (result *Result) WithStack(stacks []*Stack) *Result

WithStack sets the Stack

func (*Result) WithSuppression

func (result *Result) WithSuppression(suppressions []*Suppression) *Result

WithSuppression sets the Suppression

func (*Result) WithTaxa

func (result *Result) WithTaxa(taxa []*ReportingDescriptorReference) *Result

WithTaxa sets the Taxa

func (*Result) WithWorkItemUris added in v2.0.1

func (result *Result) WithWorkItemUris(workItemUris []string) *Result

WithWorkItemUris sets the WorkItemUris

type ResultProvenance added in v2.0.1

type ResultProvenance struct {
	PropertyBag
	ConversionSources     []*PhysicalLocation `json:"conversionSources,omitempty"`
	FirstDetectionRunGUID *string             `json:"firstDetectionRunGuid,omitempty"`
	FirstDetectionTimeUTC *time.Time          `json:"firstDetectionTimeUtc,omitempty"`
	InvocationIndex       *int                `json:"invocationIndex,omitempty"`
	LastDetectionRunGUID  *string             `json:"lastDetectionRunGuid,omitempty"`
	LastDetectionTimeUTC  *time.Time          `json:"lastDetectionTimeUtc,omitempty"`
}

ResultProvenance ...

func NewResultProvenance added in v2.0.1

func NewResultProvenance() *ResultProvenance

NewResultProvenance creates a new ResultProvenance and returns a pointer to it

func (*ResultProvenance) AddConversionSource added in v2.0.1

func (resultProvenance *ResultProvenance) AddConversionSource(conversionSource *PhysicalLocation)

AddConversionSource ...

func (*ResultProvenance) WithConversionSources added in v2.0.1

func (resultProvenance *ResultProvenance) WithConversionSources(conversionSources []*PhysicalLocation) *ResultProvenance

WithConversionSources sets the ConversionSources

func (*ResultProvenance) WithFirstDetectionRunGUID added in v2.0.1

func (resultProvenance *ResultProvenance) WithFirstDetectionRunGUID(firstDetectionRunGUID string) *ResultProvenance

WithFirstDetectionRunGUID sets the FirstDetectionRunGUID

func (*ResultProvenance) WithFirstDetectionTimeUTC added in v2.0.1

func (resultProvenance *ResultProvenance) WithFirstDetectionTimeUTC(firstDetectionTimeUTC *time.Time) *ResultProvenance

WithFirstDetectionTimeUTC sets the FirstDetectionTimeUTC

func (*ResultProvenance) WithInvocationIndex added in v2.0.1

func (resultProvenance *ResultProvenance) WithInvocationIndex(invocationIndex int) *ResultProvenance

WithInvocationIndex sets the InvocationIndex

func (*ResultProvenance) WithLastDetectionRunGUID added in v2.0.1

func (resultProvenance *ResultProvenance) WithLastDetectionRunGUID(lastDetectionRunGUID string) *ResultProvenance

WithLastDetectionRunGUID sets the LastDetectionRunGUID

func (*ResultProvenance) WithLastDetectionTimeUTC added in v2.0.1

func (resultProvenance *ResultProvenance) WithLastDetectionTimeUTC(lastDetectionTimeUTC *time.Time) *ResultProvenance

WithLastDetectionTimeUTC sets the LastDetectionTimeUTC

type Run

type Run struct {
	Tool                           Tool                            `json:"tool"`
	Artifacts                      []*Artifact                     `json:"artifacts,omitempty"`
	Invocations                    []*Invocation                   `json:"invocations,omitempty"`
	LogicalLocations               []*LogicalLocation              `json:"logicalLocations,omitempty"`
	Results                        []*Result                       `json:"results"`
	Addresses                      []*Address                      `json:"addresses,omitempty"`
	AutomationDetails              *RunAutomationDetails           `json:"automationDetails,omitempty"`
	BaselineGUID                   *string                         `json:"baselineGuid,omitempty"`
	ColumnKind                     interface{}                     `json:"columnKind,omitempty"`
	Conversion                     *Conversion                     `json:"conversion,omitempty"`
	DefaultEncoding                *string                         `json:"defaultEncoding,omitempty"`
	DefaultSourceLanguage          *string                         `json:"defaultSourceLanguage,omitempty"`
	ExternalPropertyFileReferences *ExternalPropertyFileReferences `json:"externalPropertyFileReferences,omitempty"`
	Graphs                         []*Graph                        `json:"graphs,omitempty"`
	Language                       *string                         `json:"language,omitempty"`
	NewlineSequences               []string                        `json:"newlineSequences,omitempty"`
	OriginalUriBaseIDs             map[string]*ArtifactLocation    `json:"originalUriBaseIds,omitempty"`
	Policies                       []*ToolComponent                `json:"policies,omitempty"`
	RedactionTokens                []string                        `json:"redactionTokens,omitempty"`
	RunAggregates                  []*RunAutomationDetails         `json:"runAggregates,omitempty"`
	SpecialLocations               *SpecialLocations               `json:"specialLocations,omitempty"`
	Taxonomies                     []*ToolComponent                `json:"taxonomies,omitempty"`
	ThreadFlowLocations            []*ThreadFlowLocation           `json:"threadFlowLocations,omitempty"`
	Translations                   []*ToolComponent                `json:"translations,omitempty"`
	VersionControlProvenance       []*VersionControlDetails        `json:"versionControlProvenance,omitempty"`
	WebRequests                    []*WebRequest                   `json:"webRequests,omitempty"`
	WebResponses                   []*WebResponse                  `json:"webResponses,omitempty"`
	PropertyBag
}

Run type represents a run of a tool

func NewRun

func NewRun(tool Tool) *Run

NewRun creates a new Run and returns a pointer to it

func NewRunWithInformationURI added in v2.0.1

func NewRunWithInformationURI(toolName, informationURI string) *Run

NewRunWithInformationURI creates a new Run and returns a pointer to it

func (*Run) AddArtifact

func (run *Run) AddArtifact() *Artifact

AddArtifact adds an artifact to the run and returns a pointer to it

func (*Run) AddDistinctArtifact

func (run *Run) AddDistinctArtifact(uri string) *Artifact

AddDistinctArtifact will handle deduplication of simple artifact additions

func (*Run) AddGraph added in v2.0.1

func (run *Run) AddGraph(graph *Graph)

AddGraph ...

func (*Run) AddILogicalLocation added in v2.0.1

func (run *Run) AddILogicalLocation(logicalLocation *LogicalLocation)

AddILogicalLocation ...

func (*Run) AddInvocation

func (run *Run) AddInvocation(executionSuccessful bool) *Invocation

AddInvocation adds an invocation to the run and returns a pointer to it

func (*Run) AddInvocations added in v2.0.1

func (run *Run) AddInvocations(invocation *Invocation)

AddInvocations ...

func (*Run) AddPolicy added in v2.0.1

func (run *Run) AddPolicy(policy *ToolComponent)

AddPolicy ...

func (*Run) AddResult

func (run *Run) AddResult(result *Result)

AddResult ...

func (*Run) AddRule

func (run *Run) AddRule(ruleID string) *ReportingDescriptor

AddRule returns an existing ReportingDescriptor for the ruleID or creates a new ReportingDescriptor and returns a pointer to it

func (*Run) AddRunAggregate added in v2.0.1

func (run *Run) AddRunAggregate(runAggregate *RunAutomationDetails)

AddRunAggregate ...

func (*Run) AddTaxonomy added in v2.0.1

func (run *Run) AddTaxonomy(taxonomy *ToolComponent)

AddTaxonomy ...

func (*Run) AddThreadFlowLocation added in v2.0.1

func (run *Run) AddThreadFlowLocation(threadFlowLocation *ThreadFlowLocation)

AddThreadFlowLocation ...

func (*Run) AddTranslation added in v2.0.1

func (run *Run) AddTranslation(translation *ToolComponent)

AddTranslation ...

func (*Run) AddVersionControlProvenance added in v2.0.1

func (run *Run) AddVersionControlProvenance(vcProvenance *VersionControlDetails)

AddVersionControlProvenance ...

func (*Run) AddWebRequest added in v2.0.1

func (run *Run) AddWebRequest(webRequest *WebRequest)

AddWebRequest ...

func (*Run) AddWebResponse added in v2.0.1

func (run *Run) AddWebResponse(webResponse *WebResponse)

AddWebResponse ...

func (*Run) CreateResultForRule added in v2.0.1

func (run *Run) CreateResultForRule(ruleID string) *Result

CreateResultForRule returns an existing Result or creates a new one and returns a pointer to it

func (*Run) DedupeArtifacts

func (run *Run) DedupeArtifacts() error

DedupeArtifacts ...

func (*Run) GetResultByRuleId

func (run *Run) GetResultByRuleId(ruleId string) (*Result, error)

GetResultByRuleId finds the result for a ruleId and returns a pointer to it

func (*Run) GetRuleById

func (run *Run) GetRuleById(ruleId string) (*ReportingDescriptor, error)

GetRuleById finds a rule by a given rule ID and returns a pointer to it

func (*Run) WithAddresses added in v2.0.1

func (run *Run) WithAddresses(addresses []*Address) *Run

WithAddresses sets the Addresses

func (*Run) WithArtifacts added in v2.0.1

func (run *Run) WithArtifacts(artifacts []*Artifact) *Run

WithArtifacts sets the Artifacts

func (*Run) WithAutomationDetails added in v2.0.1

func (run *Run) WithAutomationDetails(automationDetails *RunAutomationDetails) *Run

WithAutomationDetails sets the AutomationDetails

func (*Run) WithBaselineGUID added in v2.0.1

func (run *Run) WithBaselineGUID(baselineGUID string) *Run

WithBaselineGUID sets the BaselineGUID

func (*Run) WithColumnKind added in v2.0.1

func (run *Run) WithColumnKind(columnKind interface{}) *Run

WithColumnKind sets the ColumnKind

func (*Run) WithConversion added in v2.0.1

func (run *Run) WithConversion(conversion *Conversion) *Run

WithConversion sets the Conversion

func (*Run) WithDefaultEncoding added in v2.0.1

func (run *Run) WithDefaultEncoding(defaultEncoding string) *Run

WithDefaultEncoding sets the DefaultEncoding

func (*Run) WithDefaultSourceLanguage added in v2.0.1

func (run *Run) WithDefaultSourceLanguage(defaultSourceLangauge string) *Run

WithDefaultSourceLanguage sets the DefaultSourceLanguage

func (*Run) WithExternalPropertyFileReferences added in v2.0.1

func (run *Run) WithExternalPropertyFileReferences(references *ExternalPropertyFileReferences) *Run

WithExternalPropertyFileReferences sets the ExternalPropertyFileReferences

func (*Run) WithGraphs added in v2.0.1

func (run *Run) WithGraphs(graphs []*Graph) *Run

WithGraphs sets the Graphs

func (*Run) WithInvocations added in v2.0.1

func (run *Run) WithInvocations(invocations []*Invocation) *Run

WithInvocations sets the Invocations

func (*Run) WithLanguage added in v2.0.1

func (run *Run) WithLanguage(language string) *Run

WithLanguage sets the Language

func (*Run) WithLogicalLocations added in v2.0.1

func (run *Run) WithLogicalLocations(locations []*LogicalLocation) *Run

WithLogicalLocations sets the LogicalLocations

func (*Run) WithNewlineSequences added in v2.0.1

func (run *Run) WithNewlineSequences(newLines []string) *Run

WithNewlineSequences sets the NewlineSequences

func (*Run) WithOriginalUriBaseIds added in v2.0.1

func (run *Run) WithOriginalUriBaseIds(originalUriBaseIDs map[string]*ArtifactLocation) *Run

WithOriginalUriBaseIds sets the OriginalUriBaseIds

func (*Run) WithPolicies added in v2.0.1

func (run *Run) WithPolicies(policies []*ToolComponent) *Run

WithPolicies sets the Policies

func (*Run) WithRedactionTokens added in v2.0.1

func (run *Run) WithRedactionTokens(redactedTokens []string) *Run

WithRedactionTokens sets the RedactionTokens

func (*Run) WithResults added in v2.0.1

func (run *Run) WithResults(results []*Result) *Run

WithResults sets the Results

func (*Run) WithRunAggregates added in v2.0.1

func (run *Run) WithRunAggregates(runAggregates []*RunAutomationDetails) *Run

WithRunAggregates sets the RunAggregates

func (*Run) WithSpecialLocations added in v2.0.1

func (run *Run) WithSpecialLocations(specialLocation *SpecialLocations) *Run

WithSpecialLocations sets the SpecialLocations

func (*Run) WithTaxonomies added in v2.0.1

func (run *Run) WithTaxonomies(taxonomies []*ToolComponent) *Run

WithTaxonomies sets the Taxonomies

func (*Run) WithThreadFlowLocations added in v2.0.1

func (run *Run) WithThreadFlowLocations(threadFlowLocations []*ThreadFlowLocation) *Run

WithThreadFlowLocations sets the ThreadFlowLocations

func (*Run) WithTranslations added in v2.0.1

func (run *Run) WithTranslations(translations []*ToolComponent) *Run

WithTranslations sets the Translations

func (*Run) WithVersionControlProvenances added in v2.0.1

func (run *Run) WithVersionControlProvenances(vcProvenance []*VersionControlDetails) *Run

WithVersionControlProvenances sets the VersionControlProvenances

func (*Run) WithWebRequests added in v2.0.1

func (run *Run) WithWebRequests(webRequests []*WebRequest) *Run

WithWebRequests sets the WebRequests

func (*Run) WithWebResponses added in v2.0.1

func (run *Run) WithWebResponses(webResponses []*WebResponse) *Run

WithWebResponses sets the WebResponses

type RunAutomationDetails added in v2.0.1

type RunAutomationDetails struct {
	CorrelationGUID *string  `json:"correlationGuid,omitempty"`
	Description     *Message `json:"description,omitempty"`
	GUID            *string  `json:"guid,omitempty"`
	ID              *string  `json:"id,omitempty"`
	PropertyBag
}

RunAutomationDetails ...

func NewRunAutomationDetails added in v2.0.1

func NewRunAutomationDetails() *RunAutomationDetails

NewRunAutomationDetails ...

func (*RunAutomationDetails) WithCorrelationGUID added in v2.0.1

func (runAutomationDetails *RunAutomationDetails) WithCorrelationGUID(correlationGUID string) *RunAutomationDetails

WithCorrelationGUID sets the CorrelationGUID

func (*RunAutomationDetails) WithDescription added in v2.0.1

func (runAutomationDetails *RunAutomationDetails) WithDescription(description *Message) *RunAutomationDetails

WithDescription sets the Message

func (*RunAutomationDetails) WithDescriptionMarkdown added in v2.0.1

func (runAutomationDetails *RunAutomationDetails) WithDescriptionMarkdown(markdown string) *RunAutomationDetails

WithDescriptionMarkdown sets the Message markdown

func (*RunAutomationDetails) WithDescriptionText added in v2.0.1

func (runAutomationDetails *RunAutomationDetails) WithDescriptionText(text string) *RunAutomationDetails

WithDescriptionText sets the Message text

func (*RunAutomationDetails) WithGUID added in v2.0.1

func (runAutomationDetails *RunAutomationDetails) WithGUID(guid string) *RunAutomationDetails

WithGUID sets the GUID

func (*RunAutomationDetails) WithID added in v2.0.1

func (runAutomationDetails *RunAutomationDetails) WithID(id string) *RunAutomationDetails

WithID sets the ID

type RunOption

type RunOption int

RunOption ...

const IncludeEmptyResults RunOption = iota

IncludeEmptyResults ...

type SpecialLocations added in v2.0.1

type SpecialLocations struct {
	DisplayBase *ArtifactLocation `json:"displayBase,omitempty"`
	PropertyBag
}

SpecialLocations ...

func NewSpecialLocations added in v2.0.1

func NewSpecialLocations() *SpecialLocations

NewSpecialLocations ...

func (*SpecialLocations) WithDisplayBase added in v2.0.1

func (specialLocations *SpecialLocations) WithDisplayBase(displayBase *ArtifactLocation) *SpecialLocations

WithDisplayBase sets the DisplayBase

type Stack added in v2.0.1

type Stack struct {
	Frames  []*StackFrame `json:"frames"`
	Message *Message      `json:"message,omitempty"`
	PropertyBag
}

Stack ...

func NewStack added in v2.0.1

func NewStack() *Stack

NewStack creates a new Stack and returns a pointer to it

func (*Stack) AddFrame added in v2.0.1

func (stack *Stack) AddFrame(frame *StackFrame)

AddFrame ...

func (*Stack) WithFrames added in v2.0.1

func (stack *Stack) WithFrames(frames []*StackFrame) *Stack

WithFrames sets the Frames

func (*Stack) WithMessage added in v2.0.1

func (stack *Stack) WithMessage(message *Message) *Stack

WithMessage sets the Message

func (*Stack) WithMessageMarkdown added in v2.0.1

func (stack *Stack) WithMessageMarkdown(markdown string) *Stack

WithMessageMarkdown sets the Message markdown

func (*Stack) WithTextMessage added in v2.0.1

func (stack *Stack) WithTextMessage(text string) *Stack

WithTextMessage sets the Message text

type StackFrame added in v2.0.1

type StackFrame struct {
	Location   *Location `json:"location,omitempty"`
	Module     *string   `json:"module,omitempty"`
	Parameters []string  `json:"parameters,omitempty"`
	ThreadID   *int      `json:"threadId,omitempty"`
	PropertyBag
}

StackFrame ...

func NewStackFrame added in v2.0.1

func NewStackFrame() *StackFrame

NewStackFrame creates a new StackFrame and returns a pointer to it

func (*StackFrame) AddParameter added in v2.0.1

func (stackFrame *StackFrame) AddParameter(parameter string)

AddParameter ...

func (*StackFrame) WithLocation added in v2.0.1

func (stackFrame *StackFrame) WithLocation(location *Location) *StackFrame

WithLocation sets the Location

func (*StackFrame) WithModule added in v2.0.1

func (stackFrame *StackFrame) WithModule(module string) *StackFrame

WithModule sets the Module

func (*StackFrame) WithParameters added in v2.0.1

func (stackFrame *StackFrame) WithParameters(parameters []string) *StackFrame

WithParameters sets the Parameters

func (*StackFrame) WithThreadID added in v2.0.1

func (stackFrame *StackFrame) WithThreadID(threadID int) *StackFrame

WithThreadID sets the ThreadID

type Suppression

type Suppression struct {
	Kind          string    `json:"kind"`
	Status        *string   `json:"status"`
	Location      *Location `json:"location"`
	Guid          *string   `json:"guid"`
	Justification *string   `json:"justification"`
	PropertyBag
}

Suppression ...

func NewSuppression

func NewSuppression(kind string) *Suppression

NewSuppression creates a new Suppression and returns a pointer to it

func (*Suppression) WithGuid

func (s *Suppression) WithGuid(guid string) *Suppression

WithGuid sets the Guid

func (*Suppression) WithJustifcation

func (s *Suppression) WithJustifcation(justification string) *Suppression

WithJustifcation sets the Justifcation

func (*Suppression) WithLocation

func (s *Suppression) WithLocation(location *Location) *Suppression

WithLocation sets the Location

func (*Suppression) WithStatus

func (s *Suppression) WithStatus(status string) *Suppression

WithStatus sets the Status

type ThreadFlow added in v2.0.1

type ThreadFlow struct {
	ID             *string                              `json:"id,omitempty"`
	ImmutableState map[string]*MultiformatMessageString `json:"immutableState,omitempty"`
	InitialState   map[string]*MultiformatMessageString `json:"initialState,omitempty"`
	Locations      []*ThreadFlowLocation                `json:"locations"`
	Message        *Message                             `json:"message,omitempty"`
	PropertyBag
}

ThreadFlow ...

func NewThreadFlow added in v2.0.1

func NewThreadFlow() *ThreadFlow

NewThreadFlow creates a new ThreadFlow and returns a pointer to it

func (*ThreadFlow) AddLocation added in v2.0.1

func (threadFlow *ThreadFlow) AddLocation(location *ThreadFlowLocation)

AddLocation ...

func (*ThreadFlow) WithID added in v2.0.1

func (threadFlow *ThreadFlow) WithID(id string) *ThreadFlow

WithID sets the ID

func (*ThreadFlow) WithImmutableState added in v2.0.1

func (threadFlow *ThreadFlow) WithImmutableState(immutableState map[string]*MultiformatMessageString) *ThreadFlow

WithImmutableState sets the ImmutableState

func (*ThreadFlow) WithInitialState added in v2.0.1

func (threadFlow *ThreadFlow) WithInitialState(initialState map[string]*MultiformatMessageString) *ThreadFlow

WithInitialState sets the InitialState

func (*ThreadFlow) WithLocations added in v2.0.1

func (threadFlow *ThreadFlow) WithLocations(locations []*ThreadFlowLocation) *ThreadFlow

WithLocations sets the Locations

func (*ThreadFlow) WithMessage added in v2.0.1

func (threadFlow *ThreadFlow) WithMessage(message *Message) *ThreadFlow

WithMessage sets the Message

func (*ThreadFlow) WithMessageMarkdown added in v2.0.1

func (threadFlow *ThreadFlow) WithMessageMarkdown(markdown string) *ThreadFlow

WithMessageMarkdown sets the Message markdown

func (*ThreadFlow) WithTextMessage added in v2.0.1

func (threadFlow *ThreadFlow) WithTextMessage(text string) *ThreadFlow

WithTextMessage sets the Message text

type ThreadFlowLocation added in v2.0.1

type ThreadFlowLocation struct {
	ExecutionOrder   *int                                 `json:"executionOrder,omitempty"`
	ExecutionTimeUTC *time.Time                           `json:"executionTimeUtc,omitempty"`
	Importance       interface{}                          `json:"importance,omitempty"`
	Index            *int                                 `json:"index,omitempty"`
	Kinds            []string                             `json:"kinds,omitempty"`
	Location         *Location                            `json:"location,omitempty"`
	Module           *string                              `json:"module,omitempty"`
	NestingLevel     *int                                 `json:"nestingLevel,omitempty"`
	Stack            *Stack                               `json:"stack,omitempty"`
	State            map[string]*MultiformatMessageString `json:"state,omitempty"`
	Taxa             []*ReportingDescriptorReference      `json:"taxa,omitempty"`
	WebRequest       *WebRequest                          `json:"webRequest,omitempty"`
	WebResponse      *WebResponse                         `json:"webResponse,omitempty"`
	PropertyBag
}

ThreadFlowLocation ...

func NewThreadFlowLocation added in v2.0.1

func NewThreadFlowLocation() *ThreadFlowLocation

NewThreadFlowLocation creates a new ThreadFlowLocation and returns a pointer to it

func (*ThreadFlowLocation) AddKind added in v2.0.1

func (threadFlowLocation *ThreadFlowLocation) AddKind(kind string)

AddKind ...

func (*ThreadFlowLocation) AddTaxa added in v2.0.1

func (threadFlowLocation *ThreadFlowLocation) AddTaxa(taxa *ReportingDescriptorReference)

AddTaxa ...

func (*ThreadFlowLocation) WithExecutionOrder added in v2.0.1

func (threadFlowLocation *ThreadFlowLocation) WithExecutionOrder(order int) *ThreadFlowLocation

WithExecutionOrder sets the ExecutionOrder

func (*ThreadFlowLocation) WithExecutionTimeUTC added in v2.0.1

func (threadFlowLocation *ThreadFlowLocation) WithExecutionTimeUTC(executionTimeUTC *time.Time) *ThreadFlowLocation

WithExecutionTimeUTC sets the ExecutionTimeUTC

func (*ThreadFlowLocation) WithImportance added in v2.0.1

func (threadFlowLocation *ThreadFlowLocation) WithImportance(importance interface{}) *ThreadFlowLocation

WithImportance sets the Importance

func (*ThreadFlowLocation) WithIndex added in v2.0.1

func (threadFlowLocation *ThreadFlowLocation) WithIndex(index int) *ThreadFlowLocation

WithIndex sets the Index

func (*ThreadFlowLocation) WithKinds added in v2.0.1

func (threadFlowLocation *ThreadFlowLocation) WithKinds(kinds []string) *ThreadFlowLocation

WithKinds sets the Kinds

func (*ThreadFlowLocation) WithLocation added in v2.0.1

func (threadFlowLocation *ThreadFlowLocation) WithLocation(location *Location) *ThreadFlowLocation

WithLocation sets the Location

func (*ThreadFlowLocation) WithModule added in v2.0.1

func (threadFlowLocation *ThreadFlowLocation) WithModule(module string) *ThreadFlowLocation

WithModule sets the Module

func (*ThreadFlowLocation) WithNestingLevel added in v2.0.1

func (threadFlowLocation *ThreadFlowLocation) WithNestingLevel(nestingLevel int) *ThreadFlowLocation

WithNestingLevel sets the NestingLevel

func (*ThreadFlowLocation) WithStack added in v2.0.1

func (threadFlowLocation *ThreadFlowLocation) WithStack(stack *Stack) *ThreadFlowLocation

WithStack sets the Stack

func (*ThreadFlowLocation) WithState added in v2.0.1

func (threadFlowLocation *ThreadFlowLocation) WithState(state map[string]*MultiformatMessageString) *ThreadFlowLocation

WithState sets the State

func (*ThreadFlowLocation) WithTaxa added in v2.0.1

func (threadFlowLocation *ThreadFlowLocation) WithTaxa(taxa []*ReportingDescriptorReference) *ThreadFlowLocation

WithTaxa sets the Taxa

func (*ThreadFlowLocation) WithWebRequest added in v2.0.1

func (threadFlowLocation *ThreadFlowLocation) WithWebRequest(webRequest *WebRequest) *ThreadFlowLocation

WithWebRequest sets the WebRequest

func (*ThreadFlowLocation) WithWebResponse added in v2.0.1

func (threadFlowLocation *ThreadFlowLocation) WithWebResponse(webResponse *WebResponse) *ThreadFlowLocation

WithWebResponse sets the WebResponse

type Tool

type Tool struct {
	Driver *ToolComponent `json:"driver"`
	PropertyBag
}

Tool ...

func NewSimpleTool added in v2.0.1

func NewSimpleTool(driverName string) *Tool

NewSimpleTool creates a new SimpleTool and returns a pointer to it

func NewTool added in v2.0.1

func NewTool(driver *ToolComponent) *Tool

NewTool creates a new Tool and returns a pointer to it

type ToolComponent

type ToolComponent struct {
	AssociatedComponent                         *ToolComponentReference              `json:"associatedComponent,omitempty"`
	Contents                                    []interface{}                        `json:"contents,omitempty"`
	DottedQuadFileVersion                       *string                              `json:"dottedQuadFileVersion,omitempty"`
	DownloadURI                                 *string                              `json:"downloadUri,omitempty"`
	FullDescription                             *MultiformatMessageString            `json:"fullDescription,omitempty"`
	FullName                                    *string                              `json:"fullName,omitempty"`
	GlobalMessageStrings                        map[string]*MultiformatMessageString `json:"globalMessageStrings,omitempty"`
	GUID                                        *string                              `json:"guid,omitempty"`
	InformationURI                              *string                              `json:"informationUri,omitempty"`
	IsComprehensive                             *bool                                `json:"isComprehensive,omitempty"`
	Language                                    *string                              `json:"language,omitempty"`
	LocalizedDataSemanticVersion                *string                              `json:"localizedDataSemanticVersion,omitempty"`
	Locations                                   []*ArtifactLocation                  `json:"locations,omitempty"`
	MinimumRequiredLocalizedDataSemanticVersion *string                              `json:"minimumRequiredLocalizedDataSemanticVersion,omitempty"`
	Name                                        string                               `json:"name"`
	Notifications                               []*ReportingDescriptor               `json:"notifications,omitempty"`
	Organization                                *string                              `json:"organization,omitempty"`
	Product                                     *string                              `json:"product,omitempty"`
	ProductSuite                                *string                              `json:"productSuite,omitempty"`
	ReleaseDateUtc                              *time.Time                           `json:"releaseDateUtc,omitempty"`
	Rules                                       []*ReportingDescriptor               `json:"rules"`
	SemanticVersion                             *string                              `json:"semanticVersion,omitempty"`
	ShortDescription                            *MultiformatMessageString            `json:"shortDescription,omitempty"`
	SupportedTaxonomies                         []*ToolComponentReference            `json:"supportedTaxonomies,omitempty"`
	Taxa                                        []*ReportingDescriptor               `json:"taxa,omitempty"`
	TranslationMetadata                         *TranslationMetadata                 `json:"translationMetadata,omitempty"` // The tool component version, in whatever format the component natively provides.
	Version                                     *string                              `json:"version,omitempty"`
	PropertyBag
}

ToolComponent ...

func NewDriver added in v2.0.1

func NewDriver(name string) *ToolComponent

NewDriver creates a new Driver and returns a pointer to it

func NewVersionedDriver added in v2.0.1

func NewVersionedDriver(name, version string) *ToolComponent

NewVersionedDriver creates a new VersionedDriver and returns a pointer to it

func (*ToolComponent) AddContent added in v2.0.14

func (driver *ToolComponent) AddContent(content interface{})

AddContent adds a single content object to the Contents slice

func (*ToolComponent) AddLocation added in v2.0.14

func (driver *ToolComponent) AddLocation(location *ArtifactLocation)

AddLocation ...

func (*ToolComponent) AddNotification added in v2.0.1

func (driver *ToolComponent) AddNotification(notification *ReportingDescriptor)

AddNotification ...

func (*ToolComponent) AddRule added in v2.0.1

func (driver *ToolComponent) AddRule(rule *ReportingDescriptor)

AddRule ...

func (*ToolComponent) AddSupportedTaxonomie added in v2.0.14

func (driver *ToolComponent) AddSupportedTaxonomie(taxonomy *ToolComponentReference)

AddSupportedTaxonomie ...

func (*ToolComponent) AddTaxa added in v2.0.1

func (driver *ToolComponent) AddTaxa(taxa *ReportingDescriptor)

AddTaxa adds a single Taxa to the Taxa slice

func (*ToolComponent) WithAssociatedComponent added in v2.0.14

func (driver *ToolComponent) WithAssociatedComponent(associatedComponent *ToolComponentReference) *ToolComponent

WithAssociatedComponent adds an associated component to the driver

func (*ToolComponent) WithContents added in v2.0.14

func (driver *ToolComponent) WithContents(contents []interface{}) *ToolComponent

WithContents sets the contents slice to the provided value

func (*ToolComponent) WithDottedQuadFileVersion added in v2.0.14

func (driver *ToolComponent) WithDottedQuadFileVersion(version string) *ToolComponent

WithDottedQuadFileVersion ...

func (*ToolComponent) WithDownloadURI added in v2.0.14

func (driver *ToolComponent) WithDownloadURI(downloadURI string) *ToolComponent

WithDownloadURI ...

func (*ToolComponent) WithFullDescription added in v2.0.14

func (driver *ToolComponent) WithFullDescription(description *MultiformatMessageString) *ToolComponent

WithFullDescription ...

func (*ToolComponent) WithFullName added in v2.0.14

func (driver *ToolComponent) WithFullName(fullName string) *ToolComponent

WithFullName ...

func (*ToolComponent) WithGUID added in v2.0.14

func (driver *ToolComponent) WithGUID(guid string) *ToolComponent

WithGUID ...

func (*ToolComponent) WithGlobalMessageStrings added in v2.0.14

func (driver *ToolComponent) WithGlobalMessageStrings(messageStrings map[string]*MultiformatMessageString) *ToolComponent

WithGlobalMessageStrings ...

func (*ToolComponent) WithInformationURI added in v2.0.1

func (driver *ToolComponent) WithInformationURI(informationURI string) *ToolComponent

WithInformationURI sets the InformationURI

func (*ToolComponent) WithIsComprehensive added in v2.0.14

func (driver *ToolComponent) WithIsComprehensive(isComprehensive bool) *ToolComponent

WithIsComprehensive ...

func (*ToolComponent) WithLanguage added in v2.0.14

func (driver *ToolComponent) WithLanguage(language string) *ToolComponent

WithLanguage ...

func (*ToolComponent) WithLocalizedDataSemanticVersion added in v2.0.14

func (driver *ToolComponent) WithLocalizedDataSemanticVersion(version string) *ToolComponent

WithLocalizedDataSemanticVersion ...

func (*ToolComponent) WithLocations added in v2.0.14

func (driver *ToolComponent) WithLocations(locations []*ArtifactLocation) *ToolComponent

WithLocations ...

func (*ToolComponent) WithMinimumRequiredLocalizedDataSemanticVersion added in v2.0.14

func (driver *ToolComponent) WithMinimumRequiredLocalizedDataSemanticVersion(version string) *ToolComponent

WithMinimumRequiredLocalizedDataSemanticVersion ...

func (*ToolComponent) WithNotifications added in v2.0.1

func (driver *ToolComponent) WithNotifications(notifications []*ReportingDescriptor) *ToolComponent

WithNotifications sets the Notifications

func (*ToolComponent) WithOrganization added in v2.0.14

func (driver *ToolComponent) WithOrganization(organization string) *ToolComponent

WithOrganization ...

func (*ToolComponent) WithProduct added in v2.0.14

func (driver *ToolComponent) WithProduct(product string) *ToolComponent

WithProduct ...

func (*ToolComponent) WithProductSuite added in v2.0.14

func (driver *ToolComponent) WithProductSuite(suite string) *ToolComponent

WithProductSuite ...

func (*ToolComponent) WithReleaseDateUTC added in v2.0.14

func (driver *ToolComponent) WithReleaseDateUTC(releaseDate *time.Time) *ToolComponent

WithReleaseDateUTC ...

func (*ToolComponent) WithRules added in v2.0.12

func (driver *ToolComponent) WithRules(rules []*ReportingDescriptor) *ToolComponent

WithRules sets the Rules

func (*ToolComponent) WithSemanticVersion added in v2.0.14

func (driver *ToolComponent) WithSemanticVersion(version string) *ToolComponent

WithSemanticVersion ...

func (*ToolComponent) WithShortDescription added in v2.0.14

func (driver *ToolComponent) WithShortDescription(description *MultiformatMessageString) *ToolComponent

WithShortDescription ...

func (*ToolComponent) WithSupportedTaxonomies added in v2.0.14

func (driver *ToolComponent) WithSupportedTaxonomies(taxonomies []*ToolComponentReference) *ToolComponent

WithSupportedTaxonomies ...

func (*ToolComponent) WithTaxa added in v2.0.1

func (driver *ToolComponent) WithTaxa(taxa []*ReportingDescriptor) *ToolComponent

WithTaxa sets the Taxa

func (*ToolComponent) WithTranslationMetadata added in v2.0.14

func (driver *ToolComponent) WithTranslationMetadata(metadata *TranslationMetadata) *ToolComponent

WithTranslationMetadata ...

func (*ToolComponent) WithVersion

func (driver *ToolComponent) WithVersion(version string) *ToolComponent

WithVersion specifies tool version, in whatever format it natively provides. Returns updated driver.

type ToolComponentReference

type ToolComponentReference struct {
	Name  *string `json:"name"`
	Index *uint   `json:"index"`
	Guid  *string `json:"guid"`
	PropertyBag
}

ToolComponentReference ...

func NewToolComponentReference

func NewToolComponentReference() *ToolComponentReference

NewToolComponentReference creates a new ToolComponentReference and returns a pointer to it

func (*ToolComponentReference) WithGuid

WithGuid sets the Guid

func (*ToolComponentReference) WithIndex

func (t *ToolComponentReference) WithIndex(index int) *ToolComponentReference

WithIndex sets the Index

func (*ToolComponentReference) WithName

WithName sets the Name

type TranslationMetadata added in v2.0.1

type TranslationMetadata struct {
	DownloadURI      *string                   `json:"downloadUri,omitempty"`
	FullDescription  *MultiformatMessageString `json:"fullDescription,omitempty"`
	FullName         *string                   `json:"fullName,omitempty"`
	InformationURI   *string                   `json:"informationUri,omitempty"`
	Name             *string                   `json:"name"`
	ShortDescription *MultiformatMessageString `json:"shortDescription,omitempty"`
	PropertyBag
}

TranslationMetadata ...

func NewTranslationMetadata added in v2.0.1

func NewTranslationMetadata() *TranslationMetadata

NewTranslationMetadata creates a new TranslationMetadata and returns a pointer to it

func (*TranslationMetadata) WithDownloadURI added in v2.0.1

func (translationMetadata *TranslationMetadata) WithDownloadURI(downloadURI string) *TranslationMetadata

WithDownloadURI sets the DownloadURI

func (*TranslationMetadata) WithFullDescription added in v2.0.1

func (translationMetadata *TranslationMetadata) WithFullDescription(message *MultiformatMessageString) *TranslationMetadata

WithFullDescription sets the FullDescription

func (*TranslationMetadata) WithFullDescriptionMarkdown added in v2.0.1

func (translationMetadata *TranslationMetadata) WithFullDescriptionMarkdown(markdown string) *TranslationMetadata

WithFullDescriptionMarkdown sets the FullDescriptionMarkdown

func (*TranslationMetadata) WithFullDescriptionText added in v2.0.1

func (translationMetadata *TranslationMetadata) WithFullDescriptionText(text string) *TranslationMetadata

WithFullDescriptionText sets the FullDescriptionText

func (*TranslationMetadata) WithFullName added in v2.0.1

func (translationMetadata *TranslationMetadata) WithFullName(fullname string) *TranslationMetadata

WithFullName sets the FullName

func (*TranslationMetadata) WithInformationURI added in v2.0.1

func (translationMetadata *TranslationMetadata) WithInformationURI(informationURI string) *TranslationMetadata

WithInformationURI sets the InformationURI

func (*TranslationMetadata) WithName added in v2.0.1

func (translationMetadata *TranslationMetadata) WithName(name string) *TranslationMetadata

WithName sets the Name

func (*TranslationMetadata) WithShortDescription added in v2.0.1

func (translationMetadata *TranslationMetadata) WithShortDescription(message *MultiformatMessageString) *TranslationMetadata

WithShortDescription sets the ShortDescription

func (*TranslationMetadata) WithShortDescriptionMarkdown added in v2.0.1

func (translationMetadata *TranslationMetadata) WithShortDescriptionMarkdown(markdown string) *TranslationMetadata

WithShortDescriptionMarkdown sets the ShortDescriptionMarkdown

func (*TranslationMetadata) WithShortShortDescriptionText added in v2.0.1

func (translationMetadata *TranslationMetadata) WithShortShortDescriptionText(text string) *TranslationMetadata

WithShortShortDescriptionText sets the ShortShortDescriptionText

type Version

type Version string

Version is the version of Sarif to use

const (
	Version210 Version = "2.1.0"
	// @Deprecated - use Version210 instead
	Version210RTM5 Version = "2.1.0-rtm.5"
)

Version210 represents Version210 of Sarif

type VersionControlDetails added in v2.0.1

type VersionControlDetails struct {
	AsOfTimeUTC   *time.Time        `json:"asOfTimeUtc,omitempty"`
	Branch        *string           `json:"branch,omitempty"`
	MappedTo      *ArtifactLocation `json:"mappedTo,omitempty"`
	RepositoryURI *string           `json:"repositoryUri"`
	RevisionID    *string           `json:"revisionId,omitempty"`
	RevisionTag   *string           `json:"revisionTag,omitempty"`
	PropertyBag
}

VersionControlDetails ...

func NewVersionControlDetails added in v2.0.1

func NewVersionControlDetails() *VersionControlDetails

NewVersionControlDetails creates a new VersionControlDetails and returns a pointer to it

func (*VersionControlDetails) WithAsOfTimeUTC added in v2.0.1

func (versionControlDetails *VersionControlDetails) WithAsOfTimeUTC(asOfTimeUTC *time.Time) *VersionControlDetails

WithAsOfTimeUTC sets the AsOfTimeUTC

func (*VersionControlDetails) WithBranch added in v2.0.1

func (versionControlDetails *VersionControlDetails) WithBranch(branch string) *VersionControlDetails

WithBranch sets the Branch

func (*VersionControlDetails) WithMappedTo added in v2.0.1

func (versionControlDetails *VersionControlDetails) WithMappedTo(mappedTo *ArtifactLocation) *VersionControlDetails

WithMappedTo sets the MappedTo

func (*VersionControlDetails) WithRepositoryURI added in v2.0.1

func (versionControlDetails *VersionControlDetails) WithRepositoryURI(repositoryURI string) *VersionControlDetails

WithRepositoryURI sets the RepositoryURI

func (*VersionControlDetails) WithRevisionID added in v2.0.1

func (versionControlDetails *VersionControlDetails) WithRevisionID(revisionID string) *VersionControlDetails

WithRevisionID sets the RevisionID

func (*VersionControlDetails) WithRevisionTag added in v2.0.1

func (versionControlDetails *VersionControlDetails) WithRevisionTag(revisionTag string) *VersionControlDetails

WithRevisionTag sets the RevisionTag

type WebRequest added in v2.0.1

type WebRequest struct {
	Body       *ArtifactContent  `json:"body,omitempty"`
	Headers    map[string]string `json:"headers,omitempty"`
	Index      *int              `json:"index,omitempty"`
	Method     *string           `json:"method,omitempty"`
	Parameters map[string]string `json:"parameters,omitempty"`
	Protocol   *string           `json:"protocol,omitempty"`
	Target     *string           `json:"target,omitempty"`
	Version    *string           `json:"version,omitempty"`
	PropertyBag
}

WebRequest ...

func NewWebRequest added in v2.0.1

func NewWebRequest() *WebRequest

NewWebRequest creates a new WebRequest and returns a pointer to it

func (*WebRequest) SetHeader added in v2.0.1

func (webRequest *WebRequest) SetHeader(name, value string)

SetHeader ...

func (*WebRequest) SetParameter added in v2.0.1

func (webRequest *WebRequest) SetParameter(name, value string)

SetParameter ...

func (*WebRequest) WithBody added in v2.0.1

func (webRequest *WebRequest) WithBody(body *ArtifactContent) *WebRequest

WithBody sets the Body

func (*WebRequest) WithHeaders added in v2.0.1

func (webRequest *WebRequest) WithHeaders(headers map[string]string) *WebRequest

WithHeaders sets the Headers

func (*WebRequest) WithIndex added in v2.0.1

func (webRequest *WebRequest) WithIndex(index int) *WebRequest

WithIndex sets the Index

func (*WebRequest) WithMethod added in v2.0.1

func (webRequest *WebRequest) WithMethod(method string) *WebRequest

WithMethod sets the Method

func (*WebRequest) WithParameters added in v2.0.1

func (webRequest *WebRequest) WithParameters(parameters map[string]string) *WebRequest

WithParameters sets the Parameters

func (*WebRequest) WithProtocol added in v2.0.1

func (webRequest *WebRequest) WithProtocol(protocol string) *WebRequest

WithProtocol sets the Protocol

func (*WebRequest) WithTarget added in v2.0.1

func (webRequest *WebRequest) WithTarget(target string) *WebRequest

WithTarget sets the Target

func (*WebRequest) WithVersion added in v2.0.1

func (webRequest *WebRequest) WithVersion(version string) *WebRequest

WithVersion sets the Version

type WebResponse added in v2.0.1

type WebResponse struct {
	Body               *ArtifactContent  `json:"body,omitempty"`
	Headers            map[string]string `json:"headers,omitempty"`
	Index              *int              `json:"index,omitempty"`
	NoResponseReceived *bool             `json:"noResponseReceived,omitempty"`
	Protocol           *string           `json:"protocol,omitempty"`
	ReasonPhrase       *string           `json:"reasonPhrase,omitempty"`
	StatusCode         *int              `json:"statusCode,omitempty"`
	Version            *string           `json:"version,omitempty"`
	PropertyBag
}

WebResponse ...

func NewWebResponse added in v2.0.1

func NewWebResponse() *WebResponse

NewWebResponse creates a new WebResponse and returns a pointer to it

func (*WebResponse) SetHeader added in v2.0.1

func (webResponse *WebResponse) SetHeader(name, value string)

SetHeader ...

func (*WebResponse) WithBody added in v2.0.1

func (webResponse *WebResponse) WithBody(body *ArtifactContent) *WebResponse

WithBody sets the Body

func (*WebResponse) WithHeaders added in v2.0.1

func (webResponse *WebResponse) WithHeaders(headers map[string]string) *WebResponse

WithHeaders sets the Headers

func (*WebResponse) WithIndex added in v2.0.1

func (webResponse *WebResponse) WithIndex(index int) *WebResponse

WithIndex sets the Index

func (*WebResponse) WithNoResponseReceived added in v2.0.1

func (webResponse *WebResponse) WithNoResponseReceived(noResponse bool) *WebResponse

WithNoResponseReceived sets the NoResponseReceived

func (*WebResponse) WithProtocol added in v2.0.1

func (webResponse *WebResponse) WithProtocol(protocol string) *WebResponse

WithProtocol sets the Protocol

func (*WebResponse) WithReasonPhrase added in v2.0.1

func (webResponse *WebResponse) WithReasonPhrase(reason string) *WebResponse

WithReasonPhrase sets the ReasonPhrase

func (*WebResponse) WithStatusCode added in v2.0.1

func (webResponse *WebResponse) WithStatusCode(statusCode int) *WebResponse

WithStatusCode sets the StatusCode

func (*WebResponse) WithVersion added in v2.0.1

func (webResponse *WebResponse) WithVersion(version string) *WebResponse

WithVersion sets the Version

Jump to

Keyboard shortcuts

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