Documentation
¶
Index ¶
- Constants
- Variables
- type DataStore
- type PolicyStatus
- type ReadOnlyDataStore
- type StatusType
- type TestCountedDS
- func (tcds *TestCountedDS) Close() error
- func (tcds *TestCountedDS) Get(policy string) (PolicyStatus, error)
- func (tcds *TestCountedDS) GetCalls() int32
- func (tcds *TestCountedDS) GetReadOnly() ReadOnlyDataStore
- func (tcds *TestCountedDS) List() ([]string, error)
- func (tcds *TestCountedDS) Put(status PolicyStatus) error
- func (tcds *TestCountedDS) PutCalls() int32
- func (tcds *TestCountedDS) Remove(policy string) error
Constants ¶
View Source
const DefaultDataStorePath string = "/var/run/selinuxd.db"
Variables ¶
View Source
var ( ErrPolicyNotFound = errors.New("policy not found in datastore") ErrDataStoreNotInitialized = errors.New("datastore not initialized") )
Functions ¶
This section is empty.
Types ¶
type DataStore ¶
type DataStore interface { ReadOnlyDataStore Put(status PolicyStatus) error Remove(policy string) error GetReadOnly() ReadOnlyDataStore }
type PolicyStatus ¶
type PolicyStatus struct { Policy string `json:"-"` Status StatusType `json:"status"` Message string `json:"msg"` Checksum []byte `json:"-"` }
PolicyStatus defines the status of a specific policy in the datastore.
type ReadOnlyDataStore ¶
type StatusType ¶
type StatusType string
const ( InstalledStatus StatusType = "Installed" FailedStatus StatusType = "Failed" )
type TestCountedDS ¶
type TestCountedDS struct {
// contains filtered or unexported fields
}
TestCountedDS a wrapper over the bbolt datastore that contains counters which are meant to aid in testing
func NewTestCountedDS ¶
func NewTestCountedDS(path string) (*TestCountedDS, error)
func (*TestCountedDS) Close ¶
func (tcds *TestCountedDS) Close() error
func (*TestCountedDS) Get ¶
func (tcds *TestCountedDS) Get(policy string) (PolicyStatus, error)
func (*TestCountedDS) GetCalls ¶
func (tcds *TestCountedDS) GetCalls() int32
func (*TestCountedDS) GetReadOnly ¶
func (tcds *TestCountedDS) GetReadOnly() ReadOnlyDataStore
func (*TestCountedDS) List ¶
func (tcds *TestCountedDS) List() ([]string, error)
func (*TestCountedDS) Put ¶
func (tcds *TestCountedDS) Put(status PolicyStatus) error
func (*TestCountedDS) PutCalls ¶
func (tcds *TestCountedDS) PutCalls() int32
func (*TestCountedDS) Remove ¶
func (tcds *TestCountedDS) Remove(policy string) error
Click to show internal directories.
Click to hide internal directories.