urbac/option.go

19 lines
288 B
Go
Raw Permalink Normal View History

2024-10-31 17:56:26 +08:00
package urbac
import (
"github.com/loveuer/urbac/cache"
"github.com/loveuer/urbac/store"
)
func WithPersistentStore(store store.Store) Option {
return func(u *Urbac) {
u.store = store
}
}
func WithCache(cache cache.Cache) Option {
return func(u *Urbac) {
u.cache = cache
}
}