edgedbutils

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EDGEDB_DSN = "" /* 142-byte string literal not displayed */
)

Variables

This section is empty.

Functions

func CloseClient

func CloseClient(client *edgedb.Client)

func DeleteAutomatedException added in v0.0.2

func DeleteAutomatedException(ctx context.Context, client *edgedb.Client, automatedExceptionName string) error

func DeleteKyvernoClusterPolicy

func DeleteKyvernoClusterPolicy(ctx context.Context, client *edgedb.Client, policyName string) error

func DeletePolicy

func DeletePolicy(ctx context.Context, client *edgedb.Client, policyName string) error

func DeletePolicyConfig

func DeletePolicyConfig(ctx context.Context, client *edgedb.Client, policyConfigName string) error

func DeletePolicyException

func DeletePolicyException(ctx context.Context, client *edgedb.Client, policyExceptionName string) error

func GetEDGEDBClient

func GetEDGEDBClient(ctx context.Context, opts edgedb.Options) *edgedb.Client

func SetupTypes

func SetupTypes(ctx context.Context, client *edgedb.Client) (edgedb.Optional, error)

Types

type Exception

type Exception struct {
	ID       edgedb.UUID `edgedb:"id"`
	Targets  []Target    `edgedb:"targets"`
	Policies []Policy    `edgedb:"policies"`
}

func InsertAutomatedException

func InsertAutomatedException(ctx context.Context, client *edgedb.Client, automatedException policyAPI.AutomatedException) (Exception, error)

func InsertPolicyException

func InsertPolicyException(ctx context.Context, client *edgedb.Client, policyException policyAPI.PolicyException) (Exception, error)

type KyvernoClusterPolicy

type KyvernoClusterPolicy struct {
	ID               edgedb.UUID `edgedb:"id"`
	Name             string      `edgedb:"name"`
	RuleNames        []string    `edgedb:"ruleNames"`
	TargetKinds      []string    `edgedb:"targetKinds"`
	GiantSwarmExempt bool        `edgedb:"gsExempt"`
}

func InsertKyvernoClusterPolicy

func InsertKyvernoClusterPolicy(ctx context.Context, client *edgedb.Client, name string, ruleNames []string, targetKinds []string, gsExempt bool) (KyvernoClusterPolicy, error)

type Policy

type Policy struct {
	ID                 edgedb.UUID        `edgedb:"id"`
	Name               string             `edgedb:"name"`
	DefaultPolicyState edgedb.OptionalStr `edgedb:"defaultPolicyState"`
}

func InsertPolicy

func InsertPolicy(ctx context.Context, client *edgedb.Client, policy policyAPI.Policy) (Policy, error)

func ListPoliciesNames

func ListPoliciesNames(ctx context.Context, client *edgedb.Client) ([]Policy, error)

type PolicyConfig

type PolicyConfig struct {
	ID          edgedb.UUID        `edgedb:"id"`
	Name        string             `edgedb:"name"`
	PolicyName  []Policy           `edgedb:"policyName"`
	PolicyState edgedb.OptionalStr `edgedb:"policyState"`
}

func InsertPolicyConfig

func InsertPolicyConfig(ctx context.Context, client *edgedb.Client, policyConfig policyAPI.PolicyConfig) (PolicyConfig, error)

type PolicyManifest

type PolicyManifest struct {
	ID                  edgedb.UUID        `edgedb:"id"`
	Mode                edgedb.OptionalStr `edgedb:"mode"`
	PolicyExceptions    []Exception        `edgedb:"policyExceptions"`
	AutomatedExceptions []Exception        `edgedb:"automatedExceptions"`
	Name                string             `edgedb:"name"`
}

type Target

type Target struct {
	ID         edgedb.UUID `edgedb:"id"`
	Names      []string    `edgedb:"names"`
	Namespaces []string    `edgedb:"namespaces"`
	Kind       string      `edgedb:"kind"`
}

Jump to

Keyboard shortcuts

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