Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DataLoader ¶
type DataLoader interface { Init(conf interface{}) error LoadIntoStore(tap.AuthRegisterBackend) error Flush(tap.AuthRegisterBackend) error }
DataLoader is an interface that defines how data is loaded from a source into a AuthRegisterBackend interface store
func CreateDataLoader ¶
func CreateDataLoader(config configuration.Configuration, ProfileFilename string) (DataLoader, error)
type DumbLoader ¶
type DumbLoader struct{}
DumbLoader does nothing, use for those cases where cache not needed so it's the same data store so call Flush and LoadIntoStore doesnt make sense
func (DumbLoader) Flush ¶
func (DumbLoader) Flush(tap.AuthRegisterBackend) error
func (DumbLoader) Init ¶
func (DumbLoader) Init(conf interface{}) error
func (DumbLoader) LoadIntoStore ¶
func (DumbLoader) LoadIntoStore(tap.AuthRegisterBackend) error
type FileLoader ¶
type FileLoader struct {
// contains filtered or unexported fields
}
FileLoader implements DataLoader and will load TAP Profiles from a file
func (*FileLoader) Flush ¶
func (f *FileLoader) Flush(store tap.AuthRegisterBackend) error
func (*FileLoader) Init ¶
func (f *FileLoader) Init(conf interface{}) error
Init initialises the file loader
func (*FileLoader) LoadIntoStore ¶
func (f *FileLoader) LoadIntoStore(store tap.AuthRegisterBackend) error
LoadIntoStore will load, unmarshal and copy profiles into a an AuthRegisterBackend
type MongoLoader ¶
type MongoLoader struct { SkipFlush bool // contains filtered or unexported fields }
MongoLoader implements DataLoader and will load TAP Profiles from a file
func (*MongoLoader) Flush ¶
func (m *MongoLoader) Flush(store tap.AuthRegisterBackend) error
Flush creates a backup of the current loaded config
func (*MongoLoader) Init ¶
func (m *MongoLoader) Init(conf interface{}) error
Init initialises the mongo loader
func (*MongoLoader) LoadIntoStore ¶
func (m *MongoLoader) LoadIntoStore(store tap.AuthRegisterBackend) error
LoadIntoStore will load, unmarshal and copy profiles into a an AuthRegisterBackend
type MongoLoaderConf ¶
type MongoLoaderConf struct {
ClientOpts *persistent.ClientOpts
}
MongoLoaderConf is the configuration struct for a MongoLoader