Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Adapter ¶
Adapter represents the abstract adapter interface for policy persistence. FileAdapter, DBAdapter inherits this interface.
type FileAdapter ¶
type FileAdapter struct {
// contains filtered or unexported fields
}
FileAdapter represents the file adapter for policy persistence, can load policy from file or save policy to file.
func NewFileAdapter ¶
func NewFileAdapter(filePath string) *FileAdapter
NewFileAdapter is the constructor for FileAdapter.
func (*FileAdapter) LoadPolicy ¶
func (a *FileAdapter) LoadPolicy(model model.Model)
LoadPolicy loads policy from file.
func (*FileAdapter) SavePolicy ¶
func (a *FileAdapter) SavePolicy(model model.Model)
SavePolicy saves policy to file.
Click to show internal directories.
Click to hide internal directories.