cmd

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2025 License: AGPL-3.0 Imports: 33 Imported by: 0

Documentation

Index

Constants

View Source
const AgentPluginDir = ".compliance-framework/plugins"
View Source
const AgentPolicyDir = ".compliance-framework/policies"

Variables

This section is empty.

Functions

func AgentCmd

func AgentCmd() *cobra.Command

func DownloadPluginCmd

func DownloadPluginCmd() *cobra.Command

func DownloadPolicyCmd

func DownloadPolicyCmd() *cobra.Command

Types

type AgentRunner

type AgentRunner struct {
	// contains filtered or unexported fields
}

func NewAgentRunner added in v0.1.3

func NewAgentRunner() *AgentRunner

func (*AgentRunner) DownloadPlugins

func (ar *AgentRunner) DownloadPlugins(ctx context.Context) error

DownloadPlugins checks each item in the config and retrieves the source of the plugin building a set of unique sources. It then checks if the source is a path that exists on the filesystem, if it isn't, it will download the plugin to the filesystem.

We also update the map of plugin sources, this could be an identity map if it's a local file or maps from the URL to the local file if we downloaded a remote file.

We return any errors that occurred during the download process. TODO: What is the right error handling here?

func (*AgentRunner) DownloadPolicies

func (ar *AgentRunner) DownloadPolicies(ctx context.Context) error

func (*AgentRunner) Run

func (ar *AgentRunner) Run(ctx context.Context) error

func (*AgentRunner) SendHeartbeat added in v0.1.3

func (ar *AgentRunner) SendHeartbeat(ctx context.Context, staticAgentUUID uuid.UUID) error

func (*AgentRunner) UpdateConfig added in v0.1.3

func (ar *AgentRunner) UpdateConfig(config *agentConfig)

type DownloadRunner

type DownloadRunner struct {
	// contains filtered or unexported fields
}

func (*DownloadRunner) Run

func (d *DownloadRunner) Run(cmd *cobra.Command, args []string) error

type PolicyDownloadRunner

type PolicyDownloadRunner struct {
	// contains filtered or unexported fields
}

func (*PolicyDownloadRunner) Run

func (d *PolicyDownloadRunner) Run(cmd *cobra.Command, args []string) error

Jump to

Keyboard shortcuts

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