storage

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2024 License: Apache-2.0, BSD-3-Clause, MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const RefreshPostponePeriod = 5 * time.Minute

Variables

This section is empty.

Functions

This section is empty.

Types

type CommonStorage

type CommonStorage struct {
	Key  string
	Data map[string]interface{}
}

type Policy

type Policy struct {
	MongoID             primitive.ObjectID `bson:"_id"`
	Filename            string
	Repository          string
	Name                string
	Group               string
	Version             string
	Rego                string
	Data                string
	DataConfig          string
	OutputSchema        string
	ExportConfig        string
	Locked              bool
	LastUpdate          time.Time
	NextDataRefreshTime time.Time
}

type PolicyAutoImport added in v1.2.0

type PolicyAutoImport struct {
	MongoID    primitive.ObjectID `bson:"_id"`
	PolicyURL  string
	Interval   time.Duration
	NextImport time.Time
}

type PolicySubscriber added in v1.2.0

type PolicySubscriber interface {
	PolicyDataChange(ctx context.Context, repo, group, name, version string) error
}

type Subscriber

type Subscriber struct {
	MongoID          primitive.ObjectID `bson:"_id"`
	Name             string
	WebhookURL       string
	PolicyRepository string
	PolicyName       string
	PolicyGroup      string
	PolicyVersion    string
	CreatedAt        time.Time
	UpdatedAt        time.Time
}

Directories

Path Synopsis
memoryfakes
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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