Documentation ¶
Index ¶
- Constants
- type Conf
- type Store
- func (s *Store) Close() error
- 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) GetFirstMatch(_ context.Context, candidates []namer.ModuleID) (*policy.CompilationUnit, error)
- func (s *Store) InspectPolicies(ctx context.Context, _ storage.ListPolicyIDsParams) (map[string]*responsev1.InspectPoliciesResponse_Result, error)
- func (s *Store) ListPolicyIDs(ctx context.Context, _ storage.ListPolicyIDsParams) ([]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
Constants ¶
View Source
const DriverName = "disk"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Conf ¶
type Conf struct { // Directory is the path on disk where policies are stored. Directory string `yaml:"directory" conf:"required,example=pkg/test/testdata/store"` // [DEPRECATED] ScratchDir is the directory to use for holding temporary data. ScratchDir string `yaml:"scratchDir" conf:",ignore"` // WatchForChanges enables watching the directory for changes. WatchForChanges bool `yaml:"watchForChanges" conf:"required,example=false"` }
Conf is required (if driver is set to 'disk') configuration for disk storage driver. +desc=This section is required only if storage.driver is disk.
type Store ¶
type Store struct { *storage.SubscriptionManager // contains filtered or unexported fields }
func NewFromIndexWithConf ¶ added in v0.11.0
func (*Store) GetCompilationUnits ¶
func (*Store) GetDependents ¶
func (*Store) GetFirstMatch ¶ added in v0.29.0
func (*Store) InspectPolicies ¶ added in v0.35.0
func (s *Store) InspectPolicies(ctx context.Context, _ storage.ListPolicyIDsParams) (map[string]*responsev1.InspectPoliciesResponse_Result, error)
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
Click to show internal directories.
Click to hide internal directories.