Documentation ¶
Index ¶
- func Close()
- func GetContinuationToken(apiUrl, storeId string) *string
- func GetObjectTypes() []string
- func GetRelations() []string
- func GetUserTypes() []string
- func MarkDeletion(tupleKey string)
- func MarkStale(tupleKey string)
- func SetupDb()
- func Transact(f func()) error
- func UpsertConnection(connection Connection)
- type Connection
- type Filter
- type LoadResult
- type PendingAction
- type SqlxRepository
- type Tuple
- type TuplePendingAction
- type TupleRepository
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetContinuationToken ¶
func GetObjectTypes ¶
func GetObjectTypes() []string
func GetRelations ¶
func GetRelations() []string
func GetUserTypes ¶
func GetUserTypes() []string
func MarkDeletion ¶
func MarkDeletion(tupleKey string)
func Transact ¶
func Transact(f func()) error
Transact keeps it simple and executes the passed function
func UpsertConnection ¶
func UpsertConnection(connection Connection)
Types ¶
type Connection ¶
type LoadResult ¶
type LoadResult struct { // the tuple content itself Res []TuplePendingAction // whatever was the filter user, it's returned Filter *Filter // contains filtered or unexported fields }
LoadResult represents the last page load
func Load ¶
func Load(offset int, filter *Filter) *LoadResult
func (*LoadResult) GetLowerBound ¶
func (l *LoadResult) GetLowerBound() int
func (*LoadResult) GetTotal ¶
func (l *LoadResult) GetTotal() int
func (*LoadResult) GetUpperBound ¶
func (l *LoadResult) GetUpperBound() int
type PendingAction ¶
type PendingAction struct {
Action string `db:"action"`
}
type SqlxRepository ¶
type SqlxRepository struct { TupleRepository // contains filtered or unexported fields }
func (*SqlxRepository) ApplyChange ¶
func (r *SqlxRepository) ApplyChange(change openfga.TupleChange)
func (*SqlxRepository) CountTuples ¶
func (r *SqlxRepository) CountTuples(filter *Filter) int
func (*SqlxRepository) GetMarkedForDeletion ¶
func (r *SqlxRepository) GetMarkedForDeletion() []Tuple
func (*SqlxRepository) Prune ¶
func (r *SqlxRepository) Prune() int
type TuplePendingAction ¶
type TuplePendingAction struct { *Tuple *PendingAction }
type TupleRepository ¶
type TupleRepository interface { CountTuples(filter *Filter) int GetMarkedForDeletion() []Tuple ApplyChange(change openfga.TupleChange) Prune() int }
var (
Repository TupleRepository
)
Click to show internal directories.
Click to hide internal directories.