Documentation ¶
Index ¶
- Constants
- type Handler
- type OPLSyntaxHandler
- type ReadHandler
- type Registry
- type RegistryDefault
- func (r *RegistryDefault) Config(ctx context.Context) *config.Config
- func (r *RegistryDefault) Contextualizer() ketoctx.Contextualizer
- func (r *RegistryDefault) DetermineNetwork(ctx context.Context) (*networkx.Network, error)
- func (r *RegistryDefault) ExpandEngine() *expand.Engine
- func (r *RegistryDefault) GetVersion(_ context.Context, _ *rts.GetVersionRequest) (*rts.GetVersionResponse, error)
- func (r *RegistryDefault) HealthHandler() *healthx.Handler
- func (r *RegistryDefault) HealthServer() *health.Server
- func (r *RegistryDefault) Init(ctx context.Context) (err error)
- func (r *RegistryDefault) InitWithoutNetworkID(ctx context.Context) error
- func (r *RegistryDefault) Logger() *logrusx.Logger
- func (r *RegistryDefault) Mapper() *relationtuple.Mapper
- func (r *RegistryDefault) MappingManager() relationtuple.MappingManager
- func (r *RegistryDefault) MetricsHandler() *prometheus.Handler
- func (r *RegistryDefault) MigrateDown(ctx context.Context) error
- func (r *RegistryDefault) MigrateUp(ctx context.Context) error
- func (r *RegistryDefault) MigrationBox(ctx context.Context) (*popx.MigrationBox, error)
- func (r *RegistryDefault) NetworkID(ctx context.Context) uuid.UUID
- func (r *RegistryDefault) OPLSyntaxRouter(ctx context.Context) http.Handler
- func (r *RegistryDefault) OplGRPCServer(ctx context.Context) *grpc.Server
- func (r *RegistryDefault) PermissionEngine() *check.Engine
- func (r *RegistryDefault) Persister() persistence.Persister
- func (r *RegistryDefault) PopConnection(ctx context.Context) (*pop.Connection, error)
- func (r *RegistryDefault) PopConnectionWithOpts(ctx context.Context, popOpts ...func(*pop.ConnectionDetails)) (*pop.Connection, error)
- func (r *RegistryDefault) PrometheusManager() *prometheus.MetricsManager
- func (r *RegistryDefault) ReadGRPCServer(ctx context.Context) *grpc.Server
- func (r *RegistryDefault) ReadOnlyMapper() *relationtuple.Mapper
- func (r *RegistryDefault) ReadRouter(ctx context.Context) http.Handler
- func (r *RegistryDefault) RelationTupleManager() relationtuple.Manager
- func (r *RegistryDefault) ServeAll(ctx context.Context) error
- func (r *RegistryDefault) ServeAllSQA(cmd *cobra.Command) error
- func (r *RegistryDefault) Tracer(ctx context.Context) *otelx.Tracer
- func (r *RegistryDefault) Traverser() relationtuple.Traverser
- func (r *RegistryDefault) WriteGRPCServer(ctx context.Context) *grpc.Server
- func (r *RegistryDefault) WriteRouter(ctx context.Context) http.Handler
- func (r *RegistryDefault) Writer() herodot.Writer
- type TestRegistryOption
- func WithConfig(key string, value any) TestRegistryOption
- func WithGRPCStreamInterceptors(i ...grpc.StreamServerInterceptor) TestRegistryOption
- func WithGRPCUnaryInterceptors(i ...grpc.UnaryServerInterceptor) TestRegistryOption
- func WithLogLevel(level string) TestRegistryOption
- func WithNamespaces(namespaces []*namespace.Namespace) TestRegistryOption
- func WithOPL(opl string) TestRegistryOption
- func WithSelfsignedTransportCredentials() TestRegistryOption
- func WithTracer(tracer trace.Tracer) TestRegistryOption
- type WriteHandler
Constants ¶
View Source
const ( LogrusHookContextKey contextKeys = "logrus hook" RegistryContextKey contextKeys = "registry" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OPLSyntaxHandler ¶
type OPLSyntaxHandler interface { RegisterSyntaxRoutes(r *x.OPLSyntaxRouter) RegisterSyntaxGRPC(s *grpc.Server) }
type ReadHandler ¶
type ReadHandler interface { RegisterReadRoutes(r *x.ReadRouter) RegisterReadGRPC(s *grpc.Server) }
type Registry ¶
type Registry interface { Init(context.Context) error config.Provider x.LoggerProvider x.WriterProvider relationtuple.ManagerProvider expand.EngineProvider check.EngineProvider persistence.Migrator persistence.Provider PopConnection(ctx context.Context) (*pop.Connection, error) PopConnectionWithOpts(ctx context.Context, f ...func(*pop.ConnectionDetails)) (*pop.Connection, error) HealthHandler() *healthx.Handler Tracer(ctx context.Context) *otelx.Tracer MetricsHandler() *prometheus.Handler PrometheusManager() *prometheus.MetricsManager ReadRouter(ctx context.Context) http.Handler WriteRouter(ctx context.Context) http.Handler ReadGRPCServer(ctx context.Context) *grpc.Server WriteGRPCServer(ctx context.Context) *grpc.Server OplGRPCServer(ctx context.Context) *grpc.Server ServeAll(ctx context.Context) error ServeAllSQA(cmd *cobra.Command) error }
type RegistryDefault ¶
type RegistryDefault struct {
// contains filtered or unexported fields
}
func NewCRDBTestRegistry ¶
func NewCRDBTestRegistry(t testing.TB) *RegistryDefault
func NewSqliteTestRegistry ¶
func NewSqliteTestRegistry(t testing.TB, debugOnDisk bool, opts ...TestRegistryOption) *RegistryDefault
func NewTestRegistry ¶
func NewTestRegistry(t testing.TB, dsn *dbx.DsnT, opts ...TestRegistryOption) *RegistryDefault
func (*RegistryDefault) Config ¶
func (r *RegistryDefault) Config(ctx context.Context) *config.Config
func (*RegistryDefault) Contextualizer ¶
func (r *RegistryDefault) Contextualizer() ketoctx.Contextualizer
func (*RegistryDefault) DetermineNetwork ¶
func (*RegistryDefault) ExpandEngine ¶
func (r *RegistryDefault) ExpandEngine() *expand.Engine
func (*RegistryDefault) GetVersion ¶
func (r *RegistryDefault) GetVersion(_ context.Context, _ *rts.GetVersionRequest) (*rts.GetVersionResponse, error)
func (*RegistryDefault) HealthHandler ¶
func (r *RegistryDefault) HealthHandler() *healthx.Handler
func (*RegistryDefault) HealthServer ¶
func (r *RegistryDefault) HealthServer() *health.Server
func (*RegistryDefault) InitWithoutNetworkID ¶
func (r *RegistryDefault) InitWithoutNetworkID(ctx context.Context) error
func (*RegistryDefault) Logger ¶
func (r *RegistryDefault) Logger() *logrusx.Logger
func (*RegistryDefault) Mapper ¶
func (r *RegistryDefault) Mapper() *relationtuple.Mapper
func (*RegistryDefault) MappingManager ¶
func (r *RegistryDefault) MappingManager() relationtuple.MappingManager
func (*RegistryDefault) MetricsHandler ¶
func (r *RegistryDefault) MetricsHandler() *prometheus.Handler
func (*RegistryDefault) MigrateDown ¶
func (r *RegistryDefault) MigrateDown(ctx context.Context) error
func (*RegistryDefault) MigrationBox ¶
func (r *RegistryDefault) MigrationBox(ctx context.Context) (*popx.MigrationBox, error)
func (*RegistryDefault) NetworkID ¶
func (r *RegistryDefault) NetworkID(ctx context.Context) uuid.UUID
func (*RegistryDefault) OPLSyntaxRouter ¶
func (r *RegistryDefault) OPLSyntaxRouter(ctx context.Context) http.Handler
func (*RegistryDefault) OplGRPCServer ¶
func (r *RegistryDefault) OplGRPCServer(ctx context.Context) *grpc.Server
func (*RegistryDefault) PermissionEngine ¶
func (r *RegistryDefault) PermissionEngine() *check.Engine
func (*RegistryDefault) Persister ¶
func (r *RegistryDefault) Persister() persistence.Persister
func (*RegistryDefault) PopConnection ¶
func (r *RegistryDefault) PopConnection(ctx context.Context) (*pop.Connection, error)
PopConnection returns the standard connection that is kept for the whole time.
func (*RegistryDefault) PopConnectionWithOpts ¶
func (r *RegistryDefault) PopConnectionWithOpts(ctx context.Context, popOpts ...func(*pop.ConnectionDetails)) (*pop.Connection, error)
func (*RegistryDefault) PrometheusManager ¶
func (r *RegistryDefault) PrometheusManager() *prometheus.MetricsManager
func (*RegistryDefault) ReadGRPCServer ¶
func (r *RegistryDefault) ReadGRPCServer(ctx context.Context) *grpc.Server
func (*RegistryDefault) ReadOnlyMapper ¶
func (r *RegistryDefault) ReadOnlyMapper() *relationtuple.Mapper
func (*RegistryDefault) ReadRouter ¶
func (r *RegistryDefault) ReadRouter(ctx context.Context) http.Handler
func (*RegistryDefault) RelationTupleManager ¶
func (r *RegistryDefault) RelationTupleManager() relationtuple.Manager
func (*RegistryDefault) ServeAllSQA ¶
func (r *RegistryDefault) ServeAllSQA(cmd *cobra.Command) error
func (*RegistryDefault) Tracer ¶
func (r *RegistryDefault) Tracer(ctx context.Context) *otelx.Tracer
func (*RegistryDefault) Traverser ¶
func (r *RegistryDefault) Traverser() relationtuple.Traverser
func (*RegistryDefault) WriteGRPCServer ¶
func (r *RegistryDefault) WriteGRPCServer(ctx context.Context) *grpc.Server
func (*RegistryDefault) WriteRouter ¶
func (r *RegistryDefault) WriteRouter(ctx context.Context) http.Handler
func (*RegistryDefault) Writer ¶
func (r *RegistryDefault) Writer() herodot.Writer
type TestRegistryOption ¶
type TestRegistryOption func(t testing.TB, r *RegistryDefault)
func WithConfig ¶
func WithConfig(key string, value any) TestRegistryOption
func WithGRPCStreamInterceptors ¶
func WithGRPCStreamInterceptors(i ...grpc.StreamServerInterceptor) TestRegistryOption
func WithGRPCUnaryInterceptors ¶
func WithGRPCUnaryInterceptors(i ...grpc.UnaryServerInterceptor) TestRegistryOption
func WithLogLevel ¶
func WithLogLevel(level string) TestRegistryOption
func WithNamespaces ¶
func WithNamespaces(namespaces []*namespace.Namespace) TestRegistryOption
func WithOPL ¶
func WithOPL(opl string) TestRegistryOption
func WithSelfsignedTransportCredentials ¶
func WithSelfsignedTransportCredentials() TestRegistryOption
func WithTracer ¶
func WithTracer(tracer trace.Tracer) TestRegistryOption
type WriteHandler ¶
type WriteHandler interface { RegisterWriteRoutes(r *x.WriteRouter) RegisterWriteGRPC(s *grpc.Server) }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.