Help us shape the future of Go! Take the 2026 Go Developer Survey

policies

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Policies within the StackGuardian platform serve as a set of rules or guardrails, enforceable on workflows or cloud infrastructure. These policies facilitate a self-service model with granular control.

For more details, visit our [Documentation](https://docs.stackguardian.io/docs/develop/policies/policy_types/).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func NewClient

func NewClient(opts ...option.RequestOption) *Client

func (*Client) CreatePolicy

Create a new Policy inside an Organization.

To create a new Insight Filter Policy, please have a look at [this discussion](https://github.com/StackGuardian/feedback/discussions/147).

func (*Client) DeletePolicy

func (c *Client) DeletePolicy(
	ctx context.Context,
	org string,
	policy string,
	opts ...option.RequestOption,
) error

Permanently removes an existing policy from the Organization.

func (*Client) ListAllPolicies

func (c *Client) ListAllPolicies(
	ctx context.Context,
	org string,
	request *sgsdkgo.ListAllPoliciesRequest,
	opts ...option.RequestOption,
) error

List all the policies inside an Organization. Supports Pagination and Filtering using query parameters.

func (*Client) ReadPolicy

func (c *Client) ReadPolicy(
	ctx context.Context,
	org string,
	policy string,
	opts ...option.RequestOption,
) (*sgsdkgo.PolicyGetResponse, error)

Read an existing policy's details.

func (*Client) UpdatePolicy

func (c *Client) UpdatePolicy(
	ctx context.Context,
	org string,
	policy string,
	request *sgsdkgo.PatchedPolymorphicPolicy,
	opts ...option.RequestOption,
) (*sgsdkgo.PolicyCreateUpdateResponse, error)

Update an existing policy's details.

Jump to

Keyboard shortcuts

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