profiles

package
v0.0.4-0...-df3dcca Latest Latest
Warning

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

Go to latest
Published: May 26, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Update

func Update(path string) error

Update regenerates an entry in the AppArmor cache on disk

Types

type Entry

type Entry struct {
	// Mod is the last time the profile was modified
	Mod time.Time
	// Path is the location where this profile is stored on disk
	Path string
}

Entry is an item in a ProfMap representing a profile

type ProfMap

type ProfMap map[string][]Entry

ProfMap relates multiple profiles of the same name to their different locations

func UpdateAll

func UpdateAll(dirs []string, cached ProfMap) (ProfMap, error)

UpdateAll calls UpdatePath for all profile directories that were configured

func (ProfMap) AddProfiles

func (m ProfMap) AddProfiles(dir string) error

AddProfiles finds all of the profiles in a current directory and one level deeper

func (ProfMap) UpdatePath

func (m ProfMap) UpdatePath(dir string, cache ProfMap) error

UpdatePath updates all of the profiles in a directory if their cache is older than the profile or doesn't exist

Jump to

Keyboard shortcuts

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