services

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2022 License: MPL-2.0 Imports: 20 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppService

type AppService struct {
	// contains filtered or unexported fields
}

func NewAppService

func NewAppService(appRepo datastore.ApplicationRepository, eventRepo datastore.EventRepository, eventDeliveryRepo datastore.EventDeliveryRepository, eventQueue queue.Queuer) *AppService

func (*AppService) CreateApp

func (a *AppService) CreateApp(ctx context.Context, newApp *models.Application, appName string, g *datastore.Group) (*datastore.Application, error)

func (*AppService) CreateAppEndpoint

func (a *AppService) CreateAppEndpoint(ctx context.Context, e models.Endpoint, app *datastore.Application) (*datastore.Endpoint, error)

func (*AppService) DeleteAppEndpoint

func (a *AppService) DeleteAppEndpoint(ctx context.Context, e *datastore.Endpoint, app *datastore.Application) error

func (*AppService) DeleteApplication

func (a *AppService) DeleteApplication(ctx context.Context, app *datastore.Application) error

func (*AppService) LoadApplicationsPaged

func (a *AppService) LoadApplicationsPaged(ctx context.Context, uid string, q string, pageable datastore.Pageable) ([]datastore.Application, datastore.PaginationData, error)

func (*AppService) UpdateAppEndpoint

func (a *AppService) UpdateAppEndpoint(ctx context.Context, e models.Endpoint, endPointId string, app *datastore.Application) (*datastore.Endpoint, error)

func (*AppService) UpdateApplication

func (a *AppService) UpdateApplication(ctx context.Context, appUpdate *models.UpdateApplication, app *datastore.Application) error

type EventService

type EventService struct {
	// contains filtered or unexported fields
}

func NewEventService

func NewEventService(appRepo datastore.ApplicationRepository, eventRepo datastore.EventRepository, eventDeliveryRepo datastore.EventDeliveryRepository, eventQueue queue.Queuer) *EventService

func (*EventService) BatchRetryEventDelivery

func (e *EventService) BatchRetryEventDelivery(ctx context.Context, filter *datastore.Filter) (int, int, error)

func (*EventService) CountAffectedEventDeliveries

func (e *EventService) CountAffectedEventDeliveries(ctx context.Context, group *datastore.Group, appID string, eventID string, status []datastore.EventDeliveryStatus, searchParams datastore.SearchParams) (int64, error)

func (*EventService) CreateAppEvent

func (e *EventService) CreateAppEvent(ctx context.Context, newMessage *models.Event, g *datastore.Group) (*datastore.Event, error)

func (*EventService) ForceResendEventDeliveries

func (e *EventService) ForceResendEventDeliveries(ctx context.Context, ids []string, g *datastore.Group) (int, int, error)

func (*EventService) GetAppEvent

func (e *EventService) GetAppEvent(ctx context.Context, id string) (*datastore.Event, error)

func (*EventService) GetEventDeliveriesPaged

func (e *EventService) GetEventDeliveriesPaged(ctx context.Context, filter *datastore.Filter) ([]datastore.EventDelivery, datastore.PaginationData, error)

func (*EventService) GetEventDelivery

func (e *EventService) GetEventDelivery(ctx context.Context, id string) (*datastore.EventDelivery, error)

func (*EventService) GetEventsPaged

func (e *EventService) GetEventsPaged(ctx context.Context, filter *datastore.Filter) ([]datastore.Event, datastore.PaginationData, error)

func (*EventService) ResendEventDelivery

func (e *EventService) ResendEventDelivery(ctx context.Context, eventDelivery *datastore.EventDelivery, g *datastore.Group) error

func (*EventService) RetryEventDelivery

func (e *EventService) RetryEventDelivery(ctx context.Context, eventDelivery *datastore.EventDelivery, g *datastore.Group) error

type GroupService

type GroupService struct {
	// contains filtered or unexported fields
}

func (*GroupService) CreateGroup

func (gs *GroupService) CreateGroup(ctx context.Context, newGroup *models.Group) (*datastore.Group, error)

func (*GroupService) DeleteGroup

func (gs *GroupService) DeleteGroup(ctx context.Context, id string) error

func (*GroupService) FillGroupStatistics

func (gs *GroupService) FillGroupStatistics(ctx context.Context, g *datastore.Group) error

func (*GroupService) GetGroups

func (gs *GroupService) GetGroups(ctx context.Context, filter *datastore.GroupFilter) ([]*datastore.Group, error)

func (*GroupService) UpdateGroup

func (gs *GroupService) UpdateGroup(ctx context.Context, group *datastore.Group, update *models.Group) (*datastore.Group, error)

type SecurityService

type SecurityService struct {
	// contains filtered or unexported fields
}

func NewSecurityService

func NewSecurityService(groupRepo datastore.GroupRepository, apiKeyRepo datastore.APIKeyRepository) *SecurityService

func (*SecurityService) CreateAPIKey

func (ss *SecurityService) CreateAPIKey(ctx context.Context, newApiKey *models.APIKey) (*datastore.APIKey, string, error)

func (*SecurityService) CreateAppPortalAPIKey

func (ss *SecurityService) CreateAppPortalAPIKey(ctx context.Context, group *datastore.Group, app *datastore.Application, baseUrl *string) (*datastore.APIKey, string, error)

func (*SecurityService) GetAPIKeyByID

func (ss *SecurityService) GetAPIKeyByID(ctx context.Context, uid string) (*datastore.APIKey, error)

func (*SecurityService) GetAPIKeys

func (*SecurityService) RevokeAPIKey

func (ss *SecurityService) RevokeAPIKey(ctx context.Context, uid string) error

func (*SecurityService) UpdateAPIKey

func (ss *SecurityService) UpdateAPIKey(ctx context.Context, uid string, role *auth.Role) (*datastore.APIKey, error)

type ServiceError

type ServiceError struct {
	// contains filtered or unexported fields
}

func NewServiceError

func NewServiceError(errCode int, errMsg error) *ServiceError

func (*ServiceError) ErrCode

func (s *ServiceError) ErrCode() int

func (*ServiceError) Error

func (s *ServiceError) Error() string

Jump to

Keyboard shortcuts

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