Documentation ¶
Index ¶
- Variables
- type App
- type ISAApp
- func (a *ISAApp) Delete(ctx context.Context, id dssmodels.ID, owner dssmodels.Owner, ...) (*ridmodels.IdentificationServiceArea, []*ridmodels.Subscription, error)
- func (a *ISAApp) Insert(ctx context.Context, isa *ridmodels.IdentificationServiceArea) (*ridmodels.IdentificationServiceArea, []*ridmodels.Subscription, error)
- type ISAAppInterface
- type SubscriptionApp
- type SubscriptionAppInterface
Constants ¶
This section is empty.
Variables ¶
var DefaultClock = clockwork.NewRealClock()
DefaultClock allows stubbing out the clock for a test clock.
Functions ¶
This section is empty.
Types ¶
type App ¶
type App struct { ISA ISAAppInterface Subscription SubscriptionAppInterface }
App contains all of the per-entity Applications.
func NewFromRepo ¶
NewFromRepo is a convenience function for creating an App with the given store.
type ISAApp ¶
type ISAApp struct { // TODO: don't fully embed the ISA repo once we reduce the complexity in the store. // Right now it's "coincidence" that the repo has the same signatures as the App interface // but we will want to simplify the repos and add the complexity here. repos.ISA // contains filtered or unexported fields }
ISAApp is the main implementation of the ISAApp logic.
func (*ISAApp) Delete ¶
func (a *ISAApp) Delete(ctx context.Context, id dssmodels.ID, owner dssmodels.Owner, version *dssmodels.Version) (*ridmodels.IdentificationServiceArea, []*ridmodels.Subscription, error)
Delete the given ISA
func (*ISAApp) Insert ¶
func (a *ISAApp) Insert(ctx context.Context, isa *ridmodels.IdentificationServiceArea) (*ridmodels.IdentificationServiceArea, []*ridmodels.Subscription, error)
Insert implments the ISAAppInterface Insert method
type ISAAppInterface ¶
type ISAAppInterface interface { Get(ctx context.Context, id dssmodels.ID) (*ridmodels.IdentificationServiceArea, error) // Delete deletes the IdentificationServiceArea identified by "id" and owned by "owner". // Returns the delete IdentificationServiceArea and all Subscriptions affected by the delete. Delete(ctx context.Context, id dssmodels.ID, owner dssmodels.Owner, version *dssmodels.Version) (*ridmodels.IdentificationServiceArea, []*ridmodels.Subscription, error) // Insert inserts or updates an ISA. Insert(ctx context.Context, isa *ridmodels.IdentificationServiceArea) (*ridmodels.IdentificationServiceArea, []*ridmodels.Subscription, error) // Update Update(ctx context.Context, isa *ridmodels.IdentificationServiceArea) (*ridmodels.IdentificationServiceArea, []*ridmodels.Subscription, error) // SearchSubscriptions returns all subscriptions ownded by "owner" in "cells". Search(ctx context.Context, cells s2.CellUnion, earliest *time.Time, latest *time.Time) ([]*ridmodels.IdentificationServiceArea, error) }
ISAAppInterface provides the interface to the application logic for ISA entities
type SubscriptionApp ¶
type SubscriptionApp struct { // TODO: don't fully embed the Sub repo once we reduce the complexity in the store. repos.Subscription // contains filtered or unexported fields }
SubscriptionApp is the main implementation of the SubscriptionApp logic.
func (*SubscriptionApp) Delete ¶
func (a *SubscriptionApp) Delete(ctx context.Context, id dssmodels.ID, owner dssmodels.Owner, version *dssmodels.Version) (*ridmodels.Subscription, error)
Delete deletes the Subscription identified by "id" and owned by "owner".
func (*SubscriptionApp) Insert ¶
func (a *SubscriptionApp) Insert(ctx context.Context, s *ridmodels.Subscription) (*ridmodels.Subscription, error)
Insert implements the SubscriptionAppInterface Insert method
type SubscriptionAppInterface ¶
type SubscriptionAppInterface interface { Get(ctx context.Context, id dssmodels.ID) (*ridmodels.Subscription, error) // Delete deletes the Subscription identified by "id" and owned by "owner". // Returns the delete Subscription and all IdentificationServiceAreas affected by the delete. Delete(ctx context.Context, id dssmodels.ID, owner dssmodels.Owner, version *dssmodels.Version) (*ridmodels.Subscription, error) // Insert inserts or updates an Subscription. Insert(ctx context.Context, s *ridmodels.Subscription) (*ridmodels.Subscription, error) // Update Update(ctx context.Context, s *ridmodels.Subscription) (*ridmodels.Subscription, error) // SearchIdentificationServiceAreas returns all IdentificationServiceAreas ownded by "owner" in "cells". SearchByOwner(ctx context.Context, cells s2.CellUnion, owner dssmodels.Owner) ([]*ridmodels.Subscription, error) }
SubscriptionAppInterface provides the interface to the application logic for Subscription entities