Documentation
¶
Index ¶
- type MySQL
- func (m *MySQL) Close(ctx context.Context) error
- func (m *MySQL) CreateStore(ctx context.Context, store *openfgapb.Store) (*openfgapb.Store, error)
- func (m *MySQL) DeleteStore(ctx context.Context, id string) error
- func (m *MySQL) FindLatestAuthorizationModelID(ctx context.Context, store string) (string, error)
- func (m *MySQL) GetStore(ctx context.Context, id string) (*openfgapb.Store, error)
- func (m *MySQL) IsReady(ctx context.Context) (bool, error)
- func (m *MySQL) ListObjectsByType(ctx context.Context, store string, objectType string) (storage.ObjectIterator, error)
- func (m *MySQL) ListStores(ctx context.Context, opts storage.PaginationOptions) ([]*openfgapb.Store, []byte, error)
- func (m *MySQL) MaxTuplesInWriteOperation() int
- func (m *MySQL) MaxTypesInTypeDefinition() int
- func (m *MySQL) Read(ctx context.Context, store string, tupleKey *openfgapb.TupleKey) (storage.TupleIterator, error)
- func (m *MySQL) ReadAssertions(ctx context.Context, store, modelID string) ([]*openfgapb.Assertion, error)
- func (m *MySQL) ReadAuthorizationModel(ctx context.Context, store string, modelID string) (*openfgapb.AuthorizationModel, error)
- func (m *MySQL) ReadAuthorizationModels(ctx context.Context, store string, opts storage.PaginationOptions) ([]*openfgapb.AuthorizationModel, []byte, error)
- func (m *MySQL) ReadByStore(ctx context.Context, store string, opts storage.PaginationOptions) ([]*openfgapb.Tuple, []byte, error)
- func (m *MySQL) ReadChanges(ctx context.Context, store, objectTypeFilter string, ...) ([]*openfgapb.TupleChange, []byte, error)
- func (m *MySQL) ReadPage(ctx context.Context, store string, tupleKey *openfgapb.TupleKey, ...) ([]*openfgapb.Tuple, []byte, error)
- func (m *MySQL) ReadStartingWithUser(ctx context.Context, store string, opts storage.ReadStartingWithUserFilter) (storage.TupleIterator, error)
- func (m *MySQL) ReadTypeDefinition(ctx context.Context, store, modelID, objectType string) (*openfgapb.TypeDefinition, error)
- func (m *MySQL) ReadUserTuple(ctx context.Context, store string, tupleKey *openfgapb.TupleKey) (*openfgapb.Tuple, error)
- func (m *MySQL) ReadUsersetTuples(ctx context.Context, store string, tupleKey *openfgapb.TupleKey) (storage.TupleIterator, error)
- func (m *MySQL) Write(ctx context.Context, store string, deletes storage.Deletes, ...) error
- func (m *MySQL) WriteAssertions(ctx context.Context, store, modelID string, assertions []*openfgapb.Assertion) error
- func (m *MySQL) WriteAuthorizationModel(ctx context.Context, store string, model *openfgapb.AuthorizationModel) error
- type MySQLOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MySQL ¶
type MySQL struct {
// contains filtered or unexported fields
}
func NewMySQLDatastore ¶
func NewMySQLDatastore(uri string, opts ...MySQLOption) (*MySQL, error)
func (*MySQL) CreateStore ¶
func (*MySQL) FindLatestAuthorizationModelID ¶
func (*MySQL) IsReady ¶
IsReady reports whether this MySQL datastore instance is ready to accept connections.
func (*MySQL) ListObjectsByType ¶
func (*MySQL) ListStores ¶
func (*MySQL) MaxTuplesInWriteOperation ¶
func (*MySQL) MaxTypesInTypeDefinition ¶
func (*MySQL) ReadAssertions ¶
func (*MySQL) ReadAuthorizationModel ¶
func (*MySQL) ReadAuthorizationModels ¶
func (m *MySQL) ReadAuthorizationModels(ctx context.Context, store string, opts storage.PaginationOptions) ([]*openfgapb.AuthorizationModel, []byte, error)
func (*MySQL) ReadByStore ¶
func (*MySQL) ReadChanges ¶
func (*MySQL) ReadStartingWithUser ¶
func (m *MySQL) ReadStartingWithUser(ctx context.Context, store string, opts storage.ReadStartingWithUserFilter) (storage.TupleIterator, error)
func (*MySQL) ReadTypeDefinition ¶
func (*MySQL) ReadUserTuple ¶
func (*MySQL) ReadUsersetTuples ¶
func (*MySQL) WriteAssertions ¶
func (*MySQL) WriteAuthorizationModel ¶
type MySQLOption ¶
type MySQLOption func(*MySQL)
func WithLogger ¶
func WithLogger(l logger.Logger) MySQLOption
func WithMaxTuplesInWrite ¶
func WithMaxTuplesInWrite(maxTuples int) MySQLOption
func WithMaxTypesInTypeDefinition ¶
func WithMaxTypesInTypeDefinition(maxTypes int) MySQLOption
func WithTracer ¶
func WithTracer(t trace.Tracer) MySQLOption
Click to show internal directories.
Click to hide internal directories.