Versions in this module Expand all Collapse all v0 v0.0.1 Jul 8, 2021 Changes in this version + var ErrInvalidRelationTupleString = fmt.Errorf("the RelationTuple string is malformed") + var ErrInvalidSubjectSetString = fmt.Errorf("the provided SubjectSet string is malformed") + type AccessWatcher struct + func NewAccessWatcher(opts ...AccessWatcherOption) (*AccessWatcher, error) + func (w *AccessWatcher) Close(ctx context.Context) error + func (w *AccessWatcher) Watch(req *watchpb.WatchRequest, server watchpb.WatchService_WatchServer) error + type AccessWatcherOption func(*AccessWatcher) + func WithChangelogDatastore(ds ChangelogDatastore) AccessWatcherOption + type ChangelogDatastore interface + GetRelationTupleChanges func(ctx context.Context, namespaces []string, timestamp time.Time) (ChangelogIterator, error) + type ChangelogEntry struct + Namespace string + Operation string + RelationTuple *InternalRelationTuple + Timestamp time.Time + type ChangelogIterator interface + Next func() bool + Value func() (*ChangelogEntry, error) + type InternalRelationTuple struct + Namespace string + Object string + Relation string + Subject Subject + func RelationTupleFromString(s string) (*InternalRelationTuple, error) + func (r *InternalRelationTuple) String() string + func (r *InternalRelationTuple) ToProto() *watchpb.RelationTuple + type Subject interface + Equals func(interface{}) bool + FromString func(string) (Subject, error) + String func() string + ToProto func() *watchpb.Subject + func SubjectFromString(s string) (Subject, error) + type SubjectID struct + ID string + func (s *SubjectID) Equals(v interface{}) bool + func (s *SubjectID) FromString(str string) (Subject, error) + func (s *SubjectID) String() string + func (s *SubjectID) ToProto() *watchpb.Subject + func (s SubjectID) MarshalJSON() ([]byte, error) + type SubjectSet struct + Namespace string + Object string + Relation string + func (s *SubjectSet) Equals(v interface{}) bool + func (s *SubjectSet) FromString(str string) (Subject, error) + func (s *SubjectSet) String() string + func (s *SubjectSet) ToProto() *watchpb.Subject + func (s SubjectSet) MarshalJSON() ([]byte, error)