Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewService ¶
func NewService( repo Repository, entity core.EntityService, policy core.PolicyService, ) core.SubscriptionService
NewRepository creates a new collection repository
Types ¶
type Handler ¶
type Handler interface { GetSubscription(c echo.Context) error GetOwnSubscriptions(c echo.Context) error }
Handler is the interface for handling HTTP requests
func NewHandler ¶
func NewHandler(service core.SubscriptionService) Handler
NewHandler creates a new handler
type Repository ¶
type Repository interface { CreateSubscription(ctx context.Context, subscription core.Subscription) (core.Subscription, error) UpdateSubscription(ctx context.Context, subscription core.Subscription) (core.Subscription, error) GetSubscription(ctx context.Context, id string) (core.Subscription, error) DeleteSubscription(ctx context.Context, id string) error GetSubscriptionsByAuthor(ctx context.Context, owner string) ([]core.Subscription, error) GetSubscriptionsByAuthorOwned(ctx context.Context, owner string) ([]core.Subscription, error) CreateItem(ctx context.Context, item core.SubscriptionItem) (core.SubscriptionItem, error) GetItem(ctx context.Context, id string, subscription string) (core.SubscriptionItem, error) DeleteItem(ctx context.Context, id string, subscription string) error }
Repository is the interface for collection repository
func NewRepository ¶
func NewRepository(db *gorm.DB, schema core.SchemaService) Repository
NewRepository creates a new collection repository
Click to show internal directories.
Click to hide internal directories.