MCPcopy Index your code
hub / github.com/Permify/permify / SchemaReader

Interface SchemaReader

internal/storage/storage.go:109–122  ·  view source on GitHub ↗

SchemaReader - Reads schema definitions from the storage.

Source from the content-addressed store, hash-verified

107
108// SchemaReader - Reads schema definitions from the storage.
109type SchemaReader interface {
110 // ReadSchema returns the schema definition for a specific tenant and version as a structured object.
111 ReadSchema(ctx context.Context, tenantID, version string) (schema *base.SchemaDefinition, err error)
112 // ReadSchemaString returns the schema definition for a specific tenant and version as a string.
113 ReadSchemaString(ctx context.Context, tenantID, version string) (definitions []string, err error)
114 // ReadEntityDefinition reads entity config from the storage.
115 ReadEntityDefinition(ctx context.Context, tenantID, entityName, version string) (definition *base.EntityDefinition, v string, err error)
116 // ReadRuleDefinition reads rule config from the storage.
117 ReadRuleDefinition(ctx context.Context, tenantID, ruleName, version string) (definition *base.RuleDefinition, v string, err error)
118 // HeadVersion reads the latest version of the schema from the storage.
119 HeadVersion(ctx context.Context, tenantID string) (version string, err error)
120 // ListSchemas lists all schemas from the storage
121 ListSchemas(ctx context.Context, tenantID string, pagination database.Pagination) (schemas []*base.SchemaList, ct database.EncodedContinuousToken, err error)
122}
123
124type NoopSchemaReader struct{}
125

Callers 46

ReadSchemaMethod · 0.65
visualizeFunction · 0.65
ReadSchemaMethod · 0.65
ReadSchemaMethod · 0.65
ReadSchemaMethod · 0.65
ReadSchemaStringMethod · 0.65
ReadSchemaStringMethod · 0.65
ReadSchemaStringMethod · 0.65

Implementers 7

NoopSchemaReaderinternal/storage/storage.go
SchemaReaderinternal/storage/proxies/cache/schema_
SchemaReaderinternal/storage/proxies/circuitbreake
SchemaReaderinternal/storage/proxies/singleflight/
SchemaReaderinternal/storage/postgres/schema_reade
SchemaReaderinternal/storage/memory/schema_reader.
mockSchemaReaderinternal/engines/lookup_test.go

Calls

no outgoing calls

Tested by

no test coverage detected