Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LocalDataSource ¶
type LocalDataSource struct {
// contains filtered or unexported fields
}
LocalDataSource is an implementation of DataSource It sources additional data for the policy engine from the local filesystem
func DataSourceFromPath ¶
func DataSourceFromPath(path string) *LocalDataSource
DataSourceFromPath builds an instance of *LocalDataSource which reads the provided path and parses it as JSON on calls to Get
func (*LocalDataSource) Get ¶
func (d *LocalDataSource) Get(_ context.Context, seen source.Hash) (map[string]any, source.Hash, error)
Get fetches and parses the *LocalDataSource path as JSON and returns it modelled as a go map of string to any type If the mod time of the filepath has not changed based on the provided previously seen mod time then it returns authz.ErrNotModified
type LocalPolicySource ¶
type LocalPolicySource struct {
// contains filtered or unexported fields
}
LocalPolicySource is an implementation of PolicySource It sources policy definitions from the location filesystem
func PolicySourceFromPath ¶
func PolicySourceFromPath(path string) *LocalPolicySource
LocalPolicySourceFromPath builds an instance of *PolicySourceFromPath which reads the provided path and returns the located policy