Documentation
¶
Index ¶
- func NewConnector(core Core) data.Connector
- func NewEntityManager(core Core) data.ModifiableEntityManager
- func NewFieldOperator(core Core) data.ModifiableFieldOperator
- func NewNotificationConsumer(core Core) data.ModifiableNotificationConsumer
- func NewNotificationPublisher(core Core) data.ModifiableNotificationPublisher
- func NewSchemaManager(core Core) data.ModifiableSchemaManager
- func NewSnapshotManager(core Core) data.ModifiableSnapshotManager
- type Config
- type Connector
- type Core
- type EntityManager
- func (me *EntityManager) CreateEntity(ctx context.Context, entityType, parentId, name string) string
- func (me *EntityManager) DeleteEntity(ctx context.Context, entityId string)
- func (me *EntityManager) EntityExists(ctx context.Context, entityId string) bool
- func (me *EntityManager) FindEntities(ctx context.Context, entityType string) []string
- func (me *EntityManager) GetEntity(ctx context.Context, entityId string) data.Entity
- func (me *EntityManager) GetEntityTypes(ctx context.Context) []string
- func (me *EntityManager) SetFieldOperator(fo data.FieldOperator)
- func (me *EntityManager) SetSchemaManager(sm data.SchemaManager)
- type FieldOperator
- func (me *FieldOperator) Read(ctx context.Context, requests ...data.Request)
- func (me *FieldOperator) SetEntityManager(em data.EntityManager)
- func (me *FieldOperator) SetNotificationPublisher(np data.NotificationPublisher)
- func (me *FieldOperator) SetSchemaManager(sm data.SchemaManager)
- func (me *FieldOperator) Write(ctx context.Context, requests ...data.Request)
- type KeyGenerator
- type NotificationConsumer
- func (me *NotificationConsumer) Consumed() signalslots.Signal
- func (me *NotificationConsumer) Notify(ctx context.Context, config data.NotificationConfig, ...) data.NotificationToken
- func (me *NotificationConsumer) Unnotify(ctx context.Context, token string)
- func (me *NotificationConsumer) UnnotifyCallback(ctx context.Context, token string, cb data.NotificationCallback)
- type NotificationPublisher
- type SchemaManager
- func (me *SchemaManager) FieldExists(ctx context.Context, fieldName, entityType string) bool
- func (me *SchemaManager) GetEntitySchema(ctx context.Context, entityType string) data.EntitySchema
- func (me *SchemaManager) GetFieldSchema(ctx context.Context, fieldName, entityType string) data.FieldSchema
- func (me *SchemaManager) SetEntityManager(em data.EntityManager)
- func (me *SchemaManager) SetEntitySchema(ctx context.Context, schema data.EntitySchema)
- func (me *SchemaManager) SetFieldOperator(fo data.FieldOperator)
- func (me *SchemaManager) SetFieldSchema(ctx context.Context, entityType, fieldName string, schema data.FieldSchema)
- type SnapshotManager
- func (s *SnapshotManager) CreateSnapshot(ctx context.Context) data.Snapshot
- func (s *SnapshotManager) RestoreSnapshot(ctx context.Context, ss data.Snapshot)
- func (s *SnapshotManager) SetEntityManager(em data.EntityManager)
- func (s *SnapshotManager) SetFieldOperator(fo data.FieldOperator)
- func (s *SnapshotManager) SetSchemaManager(sm data.SchemaManager)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewConnector ¶
func NewEntityManager ¶
func NewEntityManager(core Core) data.ModifiableEntityManager
func NewFieldOperator ¶
func NewFieldOperator(core Core) data.ModifiableFieldOperator
func NewNotificationConsumer ¶
func NewNotificationConsumer(core Core) data.ModifiableNotificationConsumer
func NewNotificationPublisher ¶
func NewNotificationPublisher(core Core) data.ModifiableNotificationPublisher
func NewSchemaManager ¶
func NewSchemaManager(core Core) data.ModifiableSchemaManager
func NewSnapshotManager ¶
func NewSnapshotManager(core Core) data.ModifiableSnapshotManager
Types ¶
type Connector ¶
type Connector struct {
// contains filtered or unexported fields
}
func (*Connector) Connected ¶ added in v0.1.3
func (c *Connector) Connected() signalslots.Signal
func (*Connector) Disconnect ¶
func (*Connector) Disconnected ¶ added in v0.1.3
func (c *Connector) Disconnected() signalslots.Signal
type Core ¶
type Core interface { Connect(ctx context.Context) Disconnect(ctx context.Context) IsConnected(ctx context.Context) bool Publish(subject string, msg proto.Message) error Request(ctx context.Context, subject string, msg proto.Message) (*protobufs.ApiMessage, error) Subscribe(subject string, handler natsgo.MsgHandler) SetConfig(config Config) GetConfig() Config GetKeyGenerator() KeyGenerator QueueSubscribe(subject string, handler natsgo.MsgHandler) SetAuthProvider(data.AuthProvider) Connected() signalslots.Signal Disconnected() signalslots.Signal }
type EntityManager ¶
type EntityManager struct {
// contains filtered or unexported fields
}
func (*EntityManager) CreateEntity ¶
func (me *EntityManager) CreateEntity(ctx context.Context, entityType, parentId, name string) string
func (*EntityManager) DeleteEntity ¶
func (me *EntityManager) DeleteEntity(ctx context.Context, entityId string)
func (*EntityManager) EntityExists ¶ added in v0.1.5
func (me *EntityManager) EntityExists(ctx context.Context, entityId string) bool
func (*EntityManager) FindEntities ¶
func (me *EntityManager) FindEntities(ctx context.Context, entityType string) []string
func (*EntityManager) GetEntityTypes ¶
func (me *EntityManager) GetEntityTypes(ctx context.Context) []string
func (*EntityManager) SetFieldOperator ¶
func (me *EntityManager) SetFieldOperator(fo data.FieldOperator)
func (*EntityManager) SetSchemaManager ¶
func (me *EntityManager) SetSchemaManager(sm data.SchemaManager)
type FieldOperator ¶
type FieldOperator struct {
// contains filtered or unexported fields
}
func (*FieldOperator) Read ¶
func (me *FieldOperator) Read(ctx context.Context, requests ...data.Request)
func (*FieldOperator) SetEntityManager ¶
func (me *FieldOperator) SetEntityManager(em data.EntityManager)
func (*FieldOperator) SetNotificationPublisher ¶
func (me *FieldOperator) SetNotificationPublisher(np data.NotificationPublisher)
func (*FieldOperator) SetSchemaManager ¶
func (me *FieldOperator) SetSchemaManager(sm data.SchemaManager)
type KeyGenerator ¶
type KeyGenerator interface { GetReadSubject() string GetWriteSubject() string GetNotificationRegistrationSubject() string GetNotificationGroupSubject(serviceId string) string GetDistributedNotificationGroupSubject(serviceId string) string }
func NewKeyGenerator ¶
func NewKeyGenerator() KeyGenerator
type NotificationConsumer ¶
type NotificationConsumer struct {
// contains filtered or unexported fields
}
func (*NotificationConsumer) Consumed ¶ added in v0.1.3
func (me *NotificationConsumer) Consumed() signalslots.Signal
func (*NotificationConsumer) Notify ¶
func (me *NotificationConsumer) Notify(ctx context.Context, config data.NotificationConfig, cb data.NotificationCallback) data.NotificationToken
func (*NotificationConsumer) Unnotify ¶
func (me *NotificationConsumer) Unnotify(ctx context.Context, token string)
func (*NotificationConsumer) UnnotifyCallback ¶
func (me *NotificationConsumer) UnnotifyCallback(ctx context.Context, token string, cb data.NotificationCallback)
type NotificationPublisher ¶
type NotificationPublisher struct {
// contains filtered or unexported fields
}
func (*NotificationPublisher) PublishNotifications ¶
func (*NotificationPublisher) SetEntityManager ¶
func (p *NotificationPublisher) SetEntityManager(em data.EntityManager)
func (*NotificationPublisher) SetFieldOperator ¶
func (p *NotificationPublisher) SetFieldOperator(fo data.FieldOperator)
type SchemaManager ¶
type SchemaManager struct {
// contains filtered or unexported fields
}
func (*SchemaManager) FieldExists ¶
func (me *SchemaManager) FieldExists(ctx context.Context, fieldName, entityType string) bool
func (*SchemaManager) GetEntitySchema ¶
func (me *SchemaManager) GetEntitySchema(ctx context.Context, entityType string) data.EntitySchema
func (*SchemaManager) GetFieldSchema ¶
func (me *SchemaManager) GetFieldSchema(ctx context.Context, fieldName, entityType string) data.FieldSchema
func (*SchemaManager) SetEntityManager ¶
func (me *SchemaManager) SetEntityManager(em data.EntityManager)
func (*SchemaManager) SetEntitySchema ¶
func (me *SchemaManager) SetEntitySchema(ctx context.Context, schema data.EntitySchema)
func (*SchemaManager) SetFieldOperator ¶
func (me *SchemaManager) SetFieldOperator(fo data.FieldOperator)
func (*SchemaManager) SetFieldSchema ¶
func (me *SchemaManager) SetFieldSchema(ctx context.Context, entityType, fieldName string, schema data.FieldSchema)
type SnapshotManager ¶
type SnapshotManager struct {
// contains filtered or unexported fields
}
func (*SnapshotManager) CreateSnapshot ¶
func (s *SnapshotManager) CreateSnapshot(ctx context.Context) data.Snapshot
func (*SnapshotManager) RestoreSnapshot ¶
func (s *SnapshotManager) RestoreSnapshot(ctx context.Context, ss data.Snapshot)
func (*SnapshotManager) SetEntityManager ¶
func (s *SnapshotManager) SetEntityManager(em data.EntityManager)
func (*SnapshotManager) SetFieldOperator ¶
func (s *SnapshotManager) SetFieldOperator(fo data.FieldOperator)
func (*SnapshotManager) SetSchemaManager ¶
func (s *SnapshotManager) SetSchemaManager(sm data.SchemaManager)
Click to show internal directories.
Click to hide internal directories.