Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrCacheMiss = errors.New("cache miss") ErrNotFound = errors.New("not found") ErrExpired = errors.New("expired") ErrInternal = errors.New("internal error") )
Errors
View Source
var ( ErrNotImplemented = errors.New("not implemented") ErrNotSupported = errors.New("not supported") )
Errors
Functions ¶
func SearchLDAP ¶ added in v0.1.0
func SearchLDAP(cn *ldap.Conn, basedn string, filter string, attributes ...string) (*ldap.SearchResult, error)
SearchLDAP wraps constructing and running a boilerplate ldap search
Types ¶
type Cache ¶
type Cache interface { Put(key string, value interface{}) error PutUntil(time time.Time, key string, value interface{}) error Get(key string) (interface{}, error) Delete(key string) error Keys() ([]string, error) }
Cache describes very simple TTL cache interface.
func NewBoltDBCache ¶
NewBoltDBCache implementes Cache with a BoltDB back-end;
func NewLDAPCache ¶ added in v0.1.0
func NewLDAPCache(config *LDAPConfig, class string, recordFn func(string, string) (interface{}, func(*ldap.Conn) error)) Cache
NewLDAPCache returns a cache suitable for interacting with LDAP
func NewMemoryCache ¶
func NewMemoryCache() Cache
NewMemoryCache implementes Cache with an in-memory store
Click to show internal directories.
Click to hide internal directories.