File: artifact_content.go

package info (click to toggle)
golang-github-owenrumney-go-sarif 2.3.3-2
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 712 kB
  • sloc: makefile: 13
file content (32 lines) | stat: -rw-r--r-- 841 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
package sarif

// ArtifactContent ...
type ArtifactContent struct { // https://docs.oasis-open.org/sarif/sarif/v2.1.0/csprd01/sarif-v2.1.0-csprd01.html#_Toc10540860
	PropertyBag
	Text     *string                   `json:"text,omitempty"`
	Binary   *string                   `json:"binary,omitempty"`
	Rendered *MultiformatMessageString `json:"rendered,omitempty"`
}

// NewArtifactContent ...
func NewArtifactContent() *ArtifactContent {
	return &ArtifactContent{}
}

// WithText ...
func (a *ArtifactContent) WithText(text string) *ArtifactContent {
	a.Text = &text
	return a
}

// WithBinary ...
func (a *ArtifactContent) WithBinary(binary string) *ArtifactContent {
	a.Binary = &binary
	return a
}

// WithRendered ...
func (a *ArtifactContent) WithRendered(mms *MultiformatMessageString) *ArtifactContent {
	a.Rendered = mms
	return a
}