Documentation ¶
Overview ¶
Package entity is handles concurrent message objects
Package entity handles concurrent object Entity
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewService ¶
func NewService( repository Repository, client client.Client, config core.Config, key core.KeyService, policy core.PolicyService, jwtService jwt.Service, ) core.EntityService
NewService creates a new entity service
Types ¶
type Handler ¶
type Handler interface { Get(c echo.Context) error GetSelf(c echo.Context) error List(c echo.Context) error }
Handler is the interface for handling HTTP requests
func NewHandler ¶
func NewHandler(service core.EntityService) Handler
NewHandler creates a new handler
type Repository ¶
type Repository interface { Get(ctx context.Context, key string) (core.Entity, error) GetByAlias(ctx context.Context, alias string) (core.Entity, error) SetAlias(ctx context.Context, id, alias string) error GetMeta(ctx context.Context, key string) (core.EntityMeta, error) Upsert(ctx context.Context, entity core.Entity) (core.Entity, error) UpsertWithMeta(ctx context.Context, entity core.Entity, meta core.EntityMeta) (core.Entity, core.EntityMeta, error) UpdateScore(ctx context.Context, id string, score int) error UpdateTag(ctx context.Context, id, tag string) error SetTombstone(ctx context.Context, id, document, signature string) error GetList(ctx context.Context) ([]core.Entity, error) Delete(ctx context.Context, key string) error DeleteMeta(ctx context.Context, ccid string) error Count(ctx context.Context) (int64, error) }
Repository is the interface for host repository
func NewRepository ¶
func NewRepository(db *gorm.DB, mc *memcache.Client, schema core.SchemaService) Repository
NewRepository creates a new host repository
Click to show internal directories.
Click to hide internal directories.