sdk

package
v0.20.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2026 License: AGPL-3.0 Imports: 19 Imported by: 3

Documentation

Index

Constants

View Source
const (
	// ArtifactMediaTypePolicyBundle uploads a policy bundle as a tar or gzipped tar.
	ArtifactMediaTypePolicyBundle = artifact.MediaTypePolicyBundle
	// ArtifactMediaTypeJSON uploads any JSON value.
	ArtifactMediaTypeJSON = artifact.MediaTypeJSON
)

Variables

This section is empty.

Functions

func SeededUUID

func SeededUUID(seedMap map[string]string) (uuid.UUID, error)

SeededUUID generates a consistent UUID for the same seedMap. This is useful for generating consistent StreamIDs across executions.

Types

type AgentAuthConfig added in v0.15.0

type AgentAuthConfig struct {
	ClientID     string
	ClientSecret string
}

type ArtifactInfo

type ArtifactInfo = artifact.Info

ArtifactInfo describes a stored artifact. The API computes Digest from the content's canonical form.

type ArtifactStatusError

type ArtifactStatusError struct {
	StatusCode int
	Body       string
}

ArtifactStatusError is an unexpected HTTP status from an artifact route. A 404 or 405 on Upload means the API predates artifact storage.

func (*ArtifactStatusError) Error

func (e *ArtifactStatusError) Error() string

type Client

type Client struct {
	Evidence *evidenceClient

	RiskTemplate *riskTemplateClient

	SubjectTemplate *subjectTemplateClient

	Heartbeat *heartbeatClient

	Playback *playbackClient

	Artifact *artifactClient
	// contains filtered or unexported fields
}

func NewClient

func NewClient(client *http.Client, config *Config) *Client

func (*Client) NewRequest

func (c *Client) NewRequest(ctx context.Context, method string, path string, reader io.Reader) (*http.Response, error)

type Config

type Config struct {
	BaseURL string
	Logger  *zap.SugaredLogger

	AgentAuth *AgentAuthConfig
}

type PlaybackPolicyError added in v0.19.0

type PlaybackPolicyError struct {
	Errors []policyeval.EvalError
}

PlaybackPolicyError is returned when the API rejects the policy itself (422): it does not parse, compile or evaluate, times out, or contains no compliance_framework package.

func (*PlaybackPolicyError) Error added in v0.19.0

func (e *PlaybackPolicyError) Error() string

type PlaybackRequest added in v0.19.0

type PlaybackRequest = policyeval.EvaluateRequest

type PlaybackResponse added in v0.19.0

type PlaybackResponse = policyeval.EvaluateResponse

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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