association

package
v1.6.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 16, 2024 License: MIT Imports: 20 Imported by: 2

Documentation

Overview

Package association is handles concurrent Association objects

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewService

func NewService(
	repo Repository,
	client client.Client,
	entity core.EntityService,
	domain core.DomainService,
	profile core.ProfileService,
	timeline core.TimelineService,
	subscription core.SubscriptionService,
	message core.MessageService,
	key core.KeyService,
	policy core.PolicyService,
	config core.Config,
) core.AssociationService

NewService creates a new association service

Types

type Handler

type Handler interface {
	Get(c echo.Context) error
	GetFiltered(c echo.Context) error
	GetCounts(c echo.Context) error
	GetOwnByTarget(c echo.Context) error
	GetAttached(c echo.Context) error
}

Handler is the interface for handling HTTP requests

func NewHandler

func NewHandler(service core.AssociationService) Handler

NewHandler creates a new handler

type Repository

type Repository interface {
	Create(ctx context.Context, association core.Association) (core.Association, error)
	Get(ctx context.Context, id string) (core.Association, error)
	GetOwn(ctx context.Context, author string) ([]core.Association, error)
	Delete(ctx context.Context, id string) error
	GetByTarget(ctx context.Context, targetID string) ([]core.Association, error)
	GetCountsBySchema(ctx context.Context, messageID string) (map[string]int64, error)
	GetBySchema(ctx context.Context, messageID string, schema string) ([]core.Association, error)
	GetCountsBySchemaAndVariant(ctx context.Context, messageID string, schema string) (map[string]int64, error)
	GetBySchemaAndVariant(ctx context.Context, messageID string, schema string, variant string) ([]core.Association, error)
	GetOwnByTarget(ctx context.Context, targetID, author string) ([]core.Association, error)
	Count(ctx context.Context) (int64, error)
	Clean(ctx context.Context, ccid string) error
}

Repository is the interface for association repository

func NewRepository

func NewRepository(db *gorm.DB, mc *memcache.Client, schema core.SchemaService) Repository

NewRepository creates a new association repository

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL