Documentation
¶
Overview ¶
Package evenotification contains the business logic for dealing with EVE Online notifications.
It provides a service for rendering notifications titles and bodies.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EVENotificationService ¶ added in v0.63.0
type EVENotificationService struct {
// contains filtered or unexported fields
}
EVENotificationService is a service for rendering notifications.
func New ¶
func New(eus EVEUniverse) *EVENotificationService
func (*EVENotificationService) EntityIDs ¶ added in v0.63.0
func (s *EVENotificationService) EntityIDs(nt app.EveNotificationType, text optional.Optional[string]) (set.Set[int64], error)
EntityIDs returns the Entity IDs used in a goesi. This is useful to resolve Entity IDs in bulk for all notifications, before rendering them one by one. Returns an empty set when notification does not use Entity IDs. Returns app.ErrNotFound for unsupported notification types.
func (*EVENotificationService) RenderESI ¶ added in v0.63.0
func (s *EVENotificationService) RenderESI(ctx context.Context, nt app.EveNotificationType, text optional.Optional[string], timestamp time.Time) (title string, body string, err error)
RenderESI renders title and body for all supported notification types and returns them. Returns app.ErrNotFound for unsupported notification types.
type EVEUniverse ¶ added in v0.63.0
type EVEUniverse interface {
GetOrCreateEntityESI(ctx context.Context, id int64) (*app.EveEntity, error)
GetOrCreateLocationESI(ctx context.Context, id int64) (*app.EveLocation, error)
GetOrCreateMoonESI(ctx context.Context, id int64) (*app.EveMoon, error)
GetOrCreatePlanetESI(ctx context.Context, id int64) (*app.EvePlanet, error)
GetOrCreateSolarSystemESI(ctx context.Context, id int64) (*app.EveSolarSystem, error)
GetOrCreateTypeESI(ctx context.Context, id int64) (*app.EveType, error)
ToEntities(ctx context.Context, ids set.Set[int64]) (map[int64]*app.EveEntity, error)
}
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
Package notification2 defines types for parsing data of Eve notification types.
|
Package notification2 defines types for parsing data of Eve notification types. |