Documentation
¶
Index ¶
- func FunctionFor(funcName string, ruleset []zanzigo.InferredRule) (string, string, error)
- func RunMigrations(databaseURL string) error
- func SelectQueryFor(ruleset []zanzigo.InferredRule, brackets bool, placeholders ...string) (string, error)
- type PostgresOption
- type PostgresStorage
- func (s *PostgresStorage) Close() error
- func (s *PostgresStorage) CursorStart() zanzigo.Cursor
- func (s *PostgresStorage) List(ctx context.Context, t zanzigo.Tuple, p zanzigo.Pagination) ([]zanzigo.Tuple, zanzigo.Cursor, error)
- func (s *PostgresStorage) PrepareRuleset(object, relation string, ruleset []zanzigo.InferredRule) (zanzigo.Userdata, error)
- func (s *PostgresStorage) QueryChecks(ctx context.Context, crs []zanzigo.Check) ([]zanzigo.MarkedTuple, error)
- func (s *PostgresStorage) Read(ctx context.Context, t zanzigo.Tuple) (uuid.UUID, error)
- func (s *PostgresStorage) Write(ctx context.Context, t zanzigo.Tuple) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FunctionFor ¶
TODO: respect maxDepth!
func RunMigrations ¶
func SelectQueryFor ¶
Types ¶
type PostgresOption ¶
type PostgresOption interface {
// contains filtered or unexported methods
}
func UseFunctions ¶
func UseFunctions() PostgresOption
type PostgresStorage ¶
type PostgresStorage struct {
// contains filtered or unexported fields
}
func NewPostgresStorage ¶
func NewPostgresStorage(databaseURL string, options ...PostgresOption) (*PostgresStorage, error)
func (*PostgresStorage) Close ¶
func (s *PostgresStorage) Close() error
func (*PostgresStorage) CursorStart ¶
func (s *PostgresStorage) CursorStart() zanzigo.Cursor
func (*PostgresStorage) PrepareRuleset ¶
func (s *PostgresStorage) PrepareRuleset(object, relation string, ruleset []zanzigo.InferredRule) (zanzigo.Userdata, error)
func (*PostgresStorage) QueryChecks ¶
func (s *PostgresStorage) QueryChecks(ctx context.Context, crs []zanzigo.Check) ([]zanzigo.MarkedTuple, error)
Click to show internal directories.
Click to hide internal directories.