urbac/option.go
2024-10-31 17:56:26 +08:00

19 lines
288 B
Go

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
}
}