Documentation ¶
Index ¶
- func AdminFromContext(ctx context.Context) (admin *adminv1.Admin, found bool)
- func Collection(ctx context.Context, elem any, ...) (err error)
- func CollectionFor(t reflect.Type) string
- func ContextWithAdmin(parent context.Context, admin *adminv1.Admin) context.Context
- func ContextWithConnection(parent context.Context, conn IConnection) context.Context
- func ContextWithObserver(parent context.Context, observer IObserver[Topic]) context.Context
- func ContextWithStorage(parent context.Context, storage IFileStorage) context.Context
- func Create(ctx context.Context, val any) ([]string, error)
- func Delete(ctx context.Context, item any) error
- func DevelopmentContext(parent context.Context) context.Context
- func IsDevelopmentContext(ctx context.Context) bool
- func List(ctx context.Context, bindVars map[string]interface{}, out any) (int64, error)
- func ListKeys(ctx context.Context, keys []string, out any) error
- func NewConnection(conf DatabaseConfig) *connection
- func NewFilesystemStorage(basePath string, maxMemory int) *filesystemStorage
- func NewGraph() *graph
- func Read(ctx context.Context, key string, out any) error
- func Relations(ctx context.Context, id string, bindVars map[string]interface{}, ...) (int, error)
- func Replace(ctx context.Context, key string, item any) error
- func Update(ctx context.Context, key string, item any) error
- type ApplicationConfig
- type DatabaseConfig
- type Direction
- type Event
- type IConnection
- type IFileStorage
- type IObserver
- type Observer
- type Pagination
- type Processor
- type SourceID
- type Topic
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AdminFromContext ¶ added in v0.0.11
AdminFromContext ...
func Collection ¶ added in v0.0.19
func ContextWithAdmin ¶ added in v0.0.11
ContextWithAdmin ...
func ContextWithConnection ¶ added in v0.0.11
func ContextWithConnection(parent context.Context, conn IConnection) context.Context
ContextWithConnection ...
func ContextWithObserver ¶ added in v0.0.11
ContextWithObserver ...
func ContextWithStorage ¶ added in v0.0.11
func ContextWithStorage(parent context.Context, storage IFileStorage) context.Context
func DevelopmentContext ¶ added in v0.0.12
func IsDevelopmentContext ¶ added in v0.0.12
func NewFilesystemStorage ¶ added in v0.0.6
NewFilesystemStorage ...
func Relations ¶ added in v0.0.11
func Relations(ctx context.Context, id string, bindVars map[string]interface{}, direction Direction, out any) (int, error)
Relations ...
Types ¶
type ApplicationConfig ¶ added in v0.0.9
type ApplicationConfig struct { // Name ... Name string `json:"name"` // Domain ... Domain string `json:"domain"` // Logo ... Logo string `json:"logo"` }
ApplicationConfig ...
type DatabaseConfig ¶
type DatabaseConfig struct { // DBName ... DBName string // UserName ... UserName string // Password ... Password string }
DatabaseConfig ...
type Event ¶
type Event[T comparable] struct { // Topic ... Topic T // Payload ... Payload protoreflect.ProtoMessage // Timestamp ... Timestamp time.Time }
Event ...
type IConnection ¶
type IConnection interface { // GetDatabase ... GetDatabase(ctx context.Context) (driver.Database, error) // GetCollection ... GetCollection(ctx context.Context, elem reflect.Type) (driver.Collection, error) }
IConnection ...
func ConnectionFromContext ¶ added in v0.0.11
func ConnectionFromContext(ctx context.Context) (conn IConnection, found bool)
ConnectionFromContext ...
type IFileStorage ¶ added in v0.0.6
type IFileStorage interface { // StoreFile ... StoreFile(name string, file []byte) (err error) // StoreByHash ... StoreByHash(file []byte) (hash string, err error) // ReadFile ... ReadFile(name string) (fileContent []byte, errr error) // MaxMemory ... MaxMemory() int }
IFileStorage ...
func StorageFromContext ¶ added in v0.0.11
func StorageFromContext(ctx context.Context) (storage IFileStorage, found bool)
type IObserver ¶
type IObserver[T comparable] interface { // Subscribe ... Subscribe(t T, p Processor[T]) SourceID // Unsubscribe ... Unsubscribe(s SourceID) // Emit ... Emit(e *Event[T]) error }
IObserver ...
type Observer ¶
type Observer[T comparable] struct { // contains filtered or unexported fields }
Observer ...
type Pagination ¶ added in v0.0.22
Source Files ¶
Click to show internal directories.
Click to hide internal directories.