Documentation ¶
Index ¶
- Constants
- Variables
- type CloneResult
- type Cloner
- type Conf
- type Store
- func (s *Store) Driver() string
- func (s *Store) GetCompilationUnits(_ context.Context, ids ...namer.ModuleID) (map[namer.ModuleID]*policy.CompilationUnit, error)
- func (s *Store) GetDependents(_ context.Context, ids ...namer.ModuleID) (map[namer.ModuleID][]namer.ModuleID, error)
- func (s *Store) ListPolicyIDs(ctx context.Context) ([]string, error)
- func (s *Store) ListSchemaIDs(ctx context.Context) ([]string, error)
- func (s *Store) LoadPolicy(ctx context.Context, file ...string) ([]*policy.Wrapper, error)
- func (s *Store) LoadSchema(ctx context.Context, url string) (io.ReadCloser, error)
- func (s *Store) Reload(ctx context.Context) error
- func (s *Store) RepoStats(ctx context.Context) storage.RepoStats
- func (s *Store) Subscribe(sub storage.Subscriber)
Constants ¶
View Source
const DriverName = "blob"
Variables ¶
View Source
var ErrPartialFailureToDownloadOnInit = errors.New("failed to download some files from the bucket")
View Source
var ErrUnsupportedBucketScheme = errors.New("currently only \"s3\" and \"gs\" bucket URL schemes are supported")
Functions ¶
This section is empty.
Types ¶
type CloneResult ¶
type CloneResult struct {
// contains filtered or unexported fields
}
type Cloner ¶
type Cloner struct {
// contains filtered or unexported fields
}
type Conf ¶
type Conf struct { // DownloadTimeout specifies the timeout for downloading from cloud storage. DownloadTimeout *time.Duration `yaml:"downloadTimeout,omitempty" conf:",example=30s"` // RequestTimeout specifies the timeout for an HTTP request. RequestTimeout *time.Duration `yaml:"requestTimeout,omitempty" conf:",example=10s"` // Bucket URL (Examples: s3://my-bucket?region=us-west-1 gs://my-bucket azblob://my-container). Bucket string `yaml:"bucket" conf:"required,example=\"s3://my-bucket-name?region=us-east-2\""` // Prefix specifies a subdirectory to download. Prefix string `yaml:"prefix,omitempty" conf:",example=policies"` // WorkDir is the local path to check out policies to. WorkDir string `yaml:"workDir" conf:",example=${HOME}/tmp/cerbos/work"` // UpdatePollInterval specifies the interval to poll the cloud storage. Set to 0 to disable. UpdatePollInterval time.Duration `yaml:"updatePollInterval" conf:",example=15s"` }
Conf is required (if driver is set to 'blob') configuration for cloud storage driver. +desc=This section is required only if storage.driver is blob.
func (*Conf) SetDefaults ¶
func (conf *Conf) SetDefaults()
type Store ¶
type Store struct { *storage.SubscriptionManager // contains filtered or unexported fields }
func (*Store) GetCompilationUnits ¶
func (*Store) GetDependents ¶
func (*Store) ListPolicyIDs ¶ added in v0.12.0
func (*Store) ListSchemaIDs ¶ added in v0.11.0
func (*Store) LoadPolicy ¶ added in v0.12.0
func (*Store) LoadSchema ¶ added in v0.11.0
func (*Store) Subscribe ¶
func (s *Store) Subscribe(sub storage.Subscriber)
Click to show internal directories.
Click to hide internal directories.