Documentation
¶
Index ¶
- Variables
- func ValidateEndpointAuthentication(auth *datastore.EndpointAuthentication) (*datastore.EndpointAuthentication, error)
- type ConfigService
- func (c *ConfigService) CreateConfiguration(ctx context.Context, newConfig *models.Configuration) (*datastore.Configuration, error)
- func (c *ConfigService) LoadConfiguration(ctx context.Context) (*datastore.Configuration, error)
- func (c *ConfigService) UpdateConfiguration(ctx context.Context, config *models.Configuration) (*datastore.Configuration, error)
- type DeviceService
- type EndpointService
- func (a *EndpointService) CountProjectEndpoints(ctx context.Context, projectID string) (int64, error)
- func (a *EndpointService) CreateEndpoint(ctx context.Context, e models.Endpoint, projectID string) (*datastore.Endpoint, error)
- func (a *EndpointService) DeleteEndpoint(ctx context.Context, e *datastore.Endpoint) error
- func (a *EndpointService) ExpireSecret(ctx context.Context, s *models.ExpireSecret, endpoint *datastore.Endpoint) (*datastore.Endpoint, error)
- func (a *EndpointService) LoadEndpointsPaged(ctx context.Context, uid string, q string, pageable datastore.Pageable) ([]datastore.Endpoint, datastore.PaginationData, error)
- func (s *EndpointService) ToggleEndpointStatus(ctx context.Context, groupId string, endpointId string) (*datastore.Endpoint, error)
- func (a *EndpointService) UpdateEndpoint(ctx context.Context, e models.UpdateEndpoint, endpoint *datastore.Endpoint) (*datastore.Endpoint, error)
- type EventService
- func (e *EventService) BatchReplayEvents(ctx context.Context, filter *datastore.Filter) (int, int, error)
- func (e *EventService) BatchRetryEventDelivery(ctx context.Context, filter *datastore.Filter) (int, int, error)
- func (e *EventService) CountAffectedEventDeliveries(ctx context.Context, filter *datastore.Filter) (int64, error)
- func (e *EventService) CountAffectedEvents(ctx context.Context, filter *datastore.Filter) (int64, error)
- func (e *EventService) CreateEvent(ctx context.Context, newMessage *models.Event, g *datastore.Project) (*datastore.Event, error)
- func (e *EventService) CreateFanoutEvent(ctx context.Context, newMessage *models.FanoutEvent, g *datastore.Project) (*datastore.Event, error)
- func (e *EventService) FindEndpoints(ctx context.Context, newMessage *models.Event) ([]datastore.Endpoint, error)
- func (e *EventService) ForceResendEventDeliveries(ctx context.Context, ids []string, g *datastore.Project) (int, int, error)
- func (e *EventService) GetEvent(ctx context.Context, id string) (*datastore.Event, error)
- func (e *EventService) GetEventDeliveriesPaged(ctx context.Context, filter *datastore.Filter) ([]datastore.EventDelivery, datastore.PaginationData, error)
- func (e *EventService) GetEventDelivery(ctx context.Context, id string) (*datastore.EventDelivery, error)
- func (e *EventService) GetEventsPaged(ctx context.Context, filter *datastore.Filter) ([]datastore.Event, datastore.PaginationData, error)
- func (e *EventService) ReplayEvent(ctx context.Context, event *datastore.Event, g *datastore.Project) error
- func (e *EventService) ResendEventDelivery(ctx context.Context, eventDelivery *datastore.EventDelivery, ...) error
- func (e *EventService) RetryEventDelivery(ctx context.Context, eventDelivery *datastore.EventDelivery, ...) error
- func (e *EventService) Search(ctx context.Context, filter *datastore.Filter) ([]datastore.Event, datastore.PaginationData, error)
- type OrganisationInviteService
- func (ois *OrganisationInviteService) CancelOrganisationMemberInvite(ctx context.Context, inviteID string) (*datastore.OrganisationInvite, error)
- func (ois *OrganisationInviteService) CreateOrganisationMemberInvite(ctx context.Context, newIV *models.OrganisationInvite, ...) (*datastore.OrganisationInvite, error)
- func (ois *OrganisationInviteService) FindUserByInviteToken(ctx context.Context, token string) (*datastore.User, *datastore.OrganisationInvite, error)
- func (ois *OrganisationInviteService) LoadOrganisationInvitesPaged(ctx context.Context, org *datastore.Organisation, ...) ([]datastore.OrganisationInvite, datastore.PaginationData, error)
- func (ois *OrganisationInviteService) ProcessOrganisationMemberInvite(ctx context.Context, token string, accepted bool, newUser *models.User) error
- func (ois *OrganisationInviteService) ResendOrganisationMemberInvite(ctx context.Context, inviteID string, org *datastore.Organisation, ...) (*datastore.OrganisationInvite, error)
- type OrganisationMemberService
- func (om *OrganisationMemberService) CreateOrganisationMember(ctx context.Context, org *datastore.Organisation, user *datastore.User, ...) (*datastore.OrganisationMember, error)
- func (om *OrganisationMemberService) DeleteOrganisationMember(ctx context.Context, memberID string, org *datastore.Organisation) error
- func (om *OrganisationMemberService) FindOrganisationMemberByID(ctx context.Context, org *datastore.Organisation, id string) (*datastore.OrganisationMember, error)
- func (om *OrganisationMemberService) LoadOrganisationMembersPaged(ctx context.Context, org *datastore.Organisation, pageable datastore.Pageable) ([]*datastore.OrganisationMember, datastore.PaginationData, error)
- func (om *OrganisationMemberService) UpdateOrganisationMember(ctx context.Context, organisationMember *datastore.OrganisationMember, ...) (*datastore.OrganisationMember, error)
- type OrganisationService
- func (os *OrganisationService) CreateOrganisation(ctx context.Context, newOrg *models.Organisation, user *datastore.User) (*datastore.Organisation, error)
- func (os *OrganisationService) DeleteOrganisation(ctx context.Context, id string) error
- func (os *OrganisationService) FindOrganisationByID(ctx context.Context, id string) (*datastore.Organisation, error)
- func (os *OrganisationService) LoadOrganisationsPaged(ctx context.Context, pageable datastore.Pageable) ([]datastore.Organisation, datastore.PaginationData, error)
- func (os *OrganisationService) LoadUserOrganisationsPaged(ctx context.Context, user *datastore.User, pageable datastore.Pageable) ([]datastore.Organisation, datastore.PaginationData, error)
- func (os *OrganisationService) UpdateOrganisation(ctx context.Context, org *datastore.Organisation, update *models.Organisation) (*datastore.Organisation, error)
- type PortalLinkService
- func (p *PortalLinkService) CreateEndpoint(ctx context.Context, project *datastore.Project, data models.Endpoint, ...) (*datastore.Endpoint, error)
- func (p *PortalLinkService) CreatePortalLink(ctx context.Context, portal *models.PortalLink, project *datastore.Project) (*datastore.PortalLink, error)
- func (p *PortalLinkService) FindPortalLinkByID(ctx context.Context, project *datastore.Project, uid string) (*datastore.PortalLink, error)
- func (p *PortalLinkService) GetPortalLinkEndpoints(ctx context.Context, portal *datastore.PortalLink) ([]datastore.Endpoint, error)
- func (p *PortalLinkService) LoadPortalLinksPaged(ctx context.Context, project *datastore.Project, f *datastore.FilterBy, ...) ([]datastore.PortalLink, datastore.PaginationData, error)
- func (p *PortalLinkService) RevokePortalLink(ctx context.Context, project *datastore.Project, ...) error
- func (p *PortalLinkService) UpdatePortalLink(ctx context.Context, project *datastore.Project, update *models.PortalLink, ...) (*datastore.PortalLink, error)
- type ProjectService
- func (ps *ProjectService) CreateProject(ctx context.Context, newProject *models.Project, org *datastore.Organisation, ...) (*datastore.Project, *models.APIKeyResponse, error)
- func (ps *ProjectService) DeleteProject(ctx context.Context, id string) error
- func (ps *ProjectService) FillProjectStatistics(ctx context.Context, projects []*datastore.Project) error
- func (ps *ProjectService) GetProjects(ctx context.Context, filter *datastore.ProjectFilter) ([]*datastore.Project, error)
- func (ps *ProjectService) UpdateProject(ctx context.Context, project *datastore.Project, update *models.UpdateProject) (*datastore.Project, error)
- type SecurityService
- func (ss *SecurityService) CreateAPIKey(ctx context.Context, member *datastore.OrganisationMember, ...) (*datastore.APIKey, string, error)
- func (ss *SecurityService) CreateEndpointAPIKey(ctx context.Context, d *models.CreateEndpointApiKey) (*datastore.APIKey, string, error)
- func (ss *SecurityService) CreatePersonalAPIKey(ctx context.Context, user *datastore.User, newApiKey *models.PersonalAPIKey) (*datastore.APIKey, string, error)
- func (ss *SecurityService) GetAPIKeyByID(ctx context.Context, uid string) (*datastore.APIKey, error)
- func (ss *SecurityService) GetAPIKeys(ctx context.Context, f *datastore.ApiKeyFilter, pageable *datastore.Pageable) ([]datastore.APIKey, datastore.PaginationData, error)
- func (ss *SecurityService) RevokeAPIKey(ctx context.Context, uid string) error
- func (ss *SecurityService) RevokePersonalAPIKey(ctx context.Context, uid string, user *datastore.User) error
- func (ss *SecurityService) UpdateAPIKey(ctx context.Context, uid string, role *auth.Role) (*datastore.APIKey, error)
- type SourceService
- func (s *SourceService) CreateSource(ctx context.Context, newSource *models.Source, g *datastore.Project) (*datastore.Source, error)
- func (s *SourceService) DeleteSource(ctx context.Context, g *datastore.Project, source *datastore.Source) error
- func (s *SourceService) FindSourceByID(ctx context.Context, g *datastore.Project, id string) (*datastore.Source, error)
- func (s *SourceService) FindSourceByMaskID(ctx context.Context, maskID string) (*datastore.Source, error)
- func (s *SourceService) LoadSourcesPaged(ctx context.Context, g *datastore.Project, filter *datastore.SourceFilter, ...) ([]datastore.Source, datastore.PaginationData, error)
- func (s *SourceService) UpdateSource(ctx context.Context, g *datastore.Project, sourceUpdate *models.UpdateSource, ...) (*datastore.Source, error)
- type SubcriptionService
- func (s *SubcriptionService) CreateSubscription(ctx context.Context, project *datastore.Project, ...) (*datastore.Subscription, error)
- func (s *SubcriptionService) DeleteSubscription(ctx context.Context, groupId string, subscription *datastore.Subscription) error
- func (s *SubcriptionService) FindSubscriptionByID(ctx context.Context, project *datastore.Project, subscriptionId string, ...) (*datastore.Subscription, error)
- func (s *SubcriptionService) LoadSubscriptionsPaged(ctx context.Context, filter *datastore.FilterBy, pageable datastore.Pageable) ([]datastore.Subscription, datastore.PaginationData, error)
- func (s *SubcriptionService) TestSubscriptionFilter(ctx context.Context, testRequest map[string]interface{}, ...) (bool, error)
- func (s *SubcriptionService) UpdateSubscription(ctx context.Context, projectId string, subscriptionId string, ...) (*datastore.Subscription, error)
- type UserService
- func (u *UserService) GeneratePasswordResetToken(ctx context.Context, baseURL string, data *models.ForgotPassword) error
- func (u *UserService) LoginUser(ctx context.Context, data *models.LoginUser) (*datastore.User, *jwt.Token, error)
- func (u *UserService) LogoutUser(token string) error
- func (u *UserService) RefreshToken(ctx context.Context, data *models.Token) (*jwt.Token, error)
- func (u *UserService) RegisterUser(ctx context.Context, baseURL string, data *models.RegisterUser) (*datastore.User, *jwt.Token, error)
- func (u *UserService) ResendEmailVerificationToken(ctx context.Context, baseURL string, user *datastore.User) error
- func (u *UserService) ResetPassword(ctx context.Context, token string, data *models.ResetPassword) (*datastore.User, error)
- func (u *UserService) UpdatePassword(ctx context.Context, data *models.UpdatePassword, user *datastore.User) (*datastore.User, error)
- func (u *UserService) UpdateUser(ctx context.Context, data *models.UpdateUser, user *datastore.User) (*datastore.User, error)
- func (u *UserService) VerifyEmail(ctx context.Context, token string) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidEventDeliveryStatus = errors.New("only successful events can be force resent") ErrNoValidEndpointFound = errors.New("no valid endpoint found") ErrNoValidOwnerIDEndpointFound = errors.New("owner ID has no configured endpoints") ErrInvalidEndpointID = errors.New("please provide an endpoint ID") )
View Source
var ( ErrSubscriptionNotFound = errors.New("subscription not found") ErrUpateSubscriptionError = errors.New("failed to update subscription") ErrCreateSubscriptionError = errors.New("failed to create subscription") ErrDeletedSubscriptionError = errors.New("failed to delete subscription") ErrValidateSubscriptionError = errors.New("failed to validate subscription") ErrInvalidSubscriptionFilterFormat = errors.New("invalid subscription filter format") ErrValidateSubscriptionFilterError = errors.New("failed to validate subscription filter") ErrCannotFetchSubcriptionsError = errors.New("an error occurred while fetching subscriptions") )
View Source
var ErrInvalidEndpoints = errors.New("endpoints cannot be empty")
Functions ¶
func ValidateEndpointAuthentication ¶ added in v0.8.0
func ValidateEndpointAuthentication(auth *datastore.EndpointAuthentication) (*datastore.EndpointAuthentication, error)
Types ¶
type ConfigService ¶ added in v0.6.0
type ConfigService struct {
// contains filtered or unexported fields
}
func NewConfigService ¶ added in v0.6.0
func NewConfigService(configRepo datastore.ConfigurationRepository) *ConfigService
func (*ConfigService) CreateConfiguration ¶ added in v0.6.0
func (c *ConfigService) CreateConfiguration(ctx context.Context, newConfig *models.Configuration) (*datastore.Configuration, error)
func (*ConfigService) LoadConfiguration ¶ added in v0.6.0
func (c *ConfigService) LoadConfiguration(ctx context.Context) (*datastore.Configuration, error)
func (*ConfigService) UpdateConfiguration ¶ added in v0.6.0
func (c *ConfigService) UpdateConfiguration(ctx context.Context, config *models.Configuration) (*datastore.Configuration, error)
type DeviceService ¶ added in v0.7.0
type DeviceService struct {
// contains filtered or unexported fields
}
func NewDeviceService ¶ added in v0.7.0
func NewDeviceService(deviceRepo datastore.DeviceRepository) *DeviceService
func (*DeviceService) LoadDevicesPaged ¶ added in v0.7.0
func (d *DeviceService) LoadDevicesPaged(ctx context.Context, g *datastore.Project, f *datastore.ApiKeyFilter, pageable datastore.Pageable) ([]datastore.Device, datastore.PaginationData, error)
type EndpointService ¶ added in v0.8.0
type EndpointService struct {
// contains filtered or unexported fields
}
func NewEndpointService ¶ added in v0.8.0
func NewEndpointService(endpointRepo datastore.EndpointRepository, eventRepo datastore.EventRepository, eventDeliveryRepo datastore.EventDeliveryRepository, cache cache.Cache, queue queue.Queuer) *EndpointService
func (*EndpointService) CountProjectEndpoints ¶ added in v0.8.0
func (*EndpointService) CreateEndpoint ¶ added in v0.8.0
func (*EndpointService) DeleteEndpoint ¶ added in v0.8.0
func (*EndpointService) ExpireSecret ¶ added in v0.8.0
func (a *EndpointService) ExpireSecret(ctx context.Context, s *models.ExpireSecret, endpoint *datastore.Endpoint) (*datastore.Endpoint, error)
func (*EndpointService) LoadEndpointsPaged ¶ added in v0.8.0
func (*EndpointService) ToggleEndpointStatus ¶ added in v0.8.0
func (*EndpointService) UpdateEndpoint ¶ added in v0.8.0
func (a *EndpointService) UpdateEndpoint(ctx context.Context, e models.UpdateEndpoint, endpoint *datastore.Endpoint) (*datastore.Endpoint, error)
type EventService ¶
type EventService struct {
// contains filtered or unexported fields
}
func NewEventService ¶
func NewEventService( endpointRepo datastore.EndpointRepository, eventRepo datastore.EventRepository, eventDeliveryRepo datastore.EventDeliveryRepository, queue queue.Queuer, cache cache.Cache, seacher searcher.Searcher, subRepo datastore.SubscriptionRepository, sourceRepo datastore.SourceRepository, deviceRepo datastore.DeviceRepository, ) *EventService
func (*EventService) BatchReplayEvents ¶ added in v0.8.0
func (*EventService) BatchRetryEventDelivery ¶
func (*EventService) CountAffectedEventDeliveries ¶
func (*EventService) CountAffectedEvents ¶ added in v0.8.0
func (*EventService) CreateEvent ¶ added in v0.8.0
func (*EventService) CreateFanoutEvent ¶ added in v0.8.0
func (e *EventService) CreateFanoutEvent(ctx context.Context, newMessage *models.FanoutEvent, g *datastore.Project) (*datastore.Event, error)
func (*EventService) FindEndpoints ¶ added in v0.8.0
func (*EventService) ForceResendEventDeliveries ¶
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) ReplayEvent ¶ added in v0.8.0
func (*EventService) ResendEventDelivery ¶
func (e *EventService) ResendEventDelivery(ctx context.Context, eventDelivery *datastore.EventDelivery, g *datastore.Project) error
func (*EventService) RetryEventDelivery ¶
func (e *EventService) RetryEventDelivery(ctx context.Context, eventDelivery *datastore.EventDelivery, g *datastore.Project) error
type OrganisationInviteService ¶ added in v0.6.0
type OrganisationInviteService struct {
// contains filtered or unexported fields
}
func NewOrganisationInviteService ¶ added in v0.6.0
func NewOrganisationInviteService(orgRepo datastore.OrganisationRepository, userRepo datastore.UserRepository, orgMemberRepo datastore.OrganisationMemberRepository, orgInviteRepo datastore.OrganisationInviteRepository, queue queue.Queuer) *OrganisationInviteService
func (*OrganisationInviteService) CancelOrganisationMemberInvite ¶ added in v0.6.0
func (ois *OrganisationInviteService) CancelOrganisationMemberInvite(ctx context.Context, inviteID string) (*datastore.OrganisationInvite, error)
func (*OrganisationInviteService) CreateOrganisationMemberInvite ¶ added in v0.6.0
func (ois *OrganisationInviteService) CreateOrganisationMemberInvite(ctx context.Context, newIV *models.OrganisationInvite, org *datastore.Organisation, user *datastore.User, baseURL string) (*datastore.OrganisationInvite, error)
func (*OrganisationInviteService) FindUserByInviteToken ¶ added in v0.6.0
func (ois *OrganisationInviteService) FindUserByInviteToken(ctx context.Context, token string) (*datastore.User, *datastore.OrganisationInvite, error)
func (*OrganisationInviteService) LoadOrganisationInvitesPaged ¶ added in v0.6.0
func (ois *OrganisationInviteService) LoadOrganisationInvitesPaged(ctx context.Context, org *datastore.Organisation, inviteStatus datastore.InviteStatus, pageable datastore.Pageable) ([]datastore.OrganisationInvite, datastore.PaginationData, error)
func (*OrganisationInviteService) ProcessOrganisationMemberInvite ¶ added in v0.6.0
func (*OrganisationInviteService) ResendOrganisationMemberInvite ¶ added in v0.6.0
func (ois *OrganisationInviteService) ResendOrganisationMemberInvite(ctx context.Context, inviteID string, org *datastore.Organisation, user *datastore.User, baseURL string) (*datastore.OrganisationInvite, error)
type OrganisationMemberService ¶ added in v0.6.0
type OrganisationMemberService struct {
// contains filtered or unexported fields
}
func NewOrganisationMemberService ¶ added in v0.6.0
func NewOrganisationMemberService(orgMemberRepo datastore.OrganisationMemberRepository) *OrganisationMemberService
func (*OrganisationMemberService) CreateOrganisationMember ¶ added in v0.6.0
func (om *OrganisationMemberService) CreateOrganisationMember(ctx context.Context, org *datastore.Organisation, user *datastore.User, role *auth.Role) (*datastore.OrganisationMember, error)
func (*OrganisationMemberService) DeleteOrganisationMember ¶ added in v0.6.0
func (om *OrganisationMemberService) DeleteOrganisationMember(ctx context.Context, memberID string, org *datastore.Organisation) error
func (*OrganisationMemberService) FindOrganisationMemberByID ¶ added in v0.6.0
func (om *OrganisationMemberService) FindOrganisationMemberByID(ctx context.Context, org *datastore.Organisation, id string) (*datastore.OrganisationMember, error)
func (*OrganisationMemberService) LoadOrganisationMembersPaged ¶ added in v0.6.0
func (om *OrganisationMemberService) LoadOrganisationMembersPaged(ctx context.Context, org *datastore.Organisation, pageable datastore.Pageable) ([]*datastore.OrganisationMember, datastore.PaginationData, error)
func (*OrganisationMemberService) UpdateOrganisationMember ¶ added in v0.6.0
func (om *OrganisationMemberService) UpdateOrganisationMember(ctx context.Context, organisationMember *datastore.OrganisationMember, role *auth.Role) (*datastore.OrganisationMember, error)
type OrganisationService ¶ added in v0.6.0
type OrganisationService struct {
// contains filtered or unexported fields
}
func NewOrganisationService ¶ added in v0.6.0
func NewOrganisationService(orgRepo datastore.OrganisationRepository, orgMemberRepo datastore.OrganisationMemberRepository) *OrganisationService
func (*OrganisationService) CreateOrganisation ¶ added in v0.6.0
func (os *OrganisationService) CreateOrganisation(ctx context.Context, newOrg *models.Organisation, user *datastore.User) (*datastore.Organisation, error)
func (*OrganisationService) DeleteOrganisation ¶ added in v0.6.0
func (os *OrganisationService) DeleteOrganisation(ctx context.Context, id string) error
func (*OrganisationService) FindOrganisationByID ¶ added in v0.6.0
func (os *OrganisationService) FindOrganisationByID(ctx context.Context, id string) (*datastore.Organisation, error)
func (*OrganisationService) LoadOrganisationsPaged ¶ added in v0.6.0
func (os *OrganisationService) LoadOrganisationsPaged(ctx context.Context, pageable datastore.Pageable) ([]datastore.Organisation, datastore.PaginationData, error)
func (*OrganisationService) LoadUserOrganisationsPaged ¶ added in v0.6.0
func (os *OrganisationService) LoadUserOrganisationsPaged(ctx context.Context, user *datastore.User, pageable datastore.Pageable) ([]datastore.Organisation, datastore.PaginationData, error)
func (*OrganisationService) UpdateOrganisation ¶ added in v0.6.0
func (os *OrganisationService) UpdateOrganisation(ctx context.Context, org *datastore.Organisation, update *models.Organisation) (*datastore.Organisation, error)
type PortalLinkService ¶ added in v0.8.0
type PortalLinkService struct {
// contains filtered or unexported fields
}
func NewPortalLinkService ¶ added in v0.8.0
func NewPortalLinkService(portalLinkRepo datastore.PortalLinkRepository, endpointService *EndpointService) *PortalLinkService
func (*PortalLinkService) CreateEndpoint ¶ added in v0.8.0
func (*PortalLinkService) CreatePortalLink ¶ added in v0.8.0
func (p *PortalLinkService) CreatePortalLink(ctx context.Context, portal *models.PortalLink, project *datastore.Project) (*datastore.PortalLink, error)
func (*PortalLinkService) FindPortalLinkByID ¶ added in v0.8.0
func (p *PortalLinkService) FindPortalLinkByID(ctx context.Context, project *datastore.Project, uid string) (*datastore.PortalLink, error)
func (*PortalLinkService) GetPortalLinkEndpoints ¶ added in v0.8.0
func (p *PortalLinkService) GetPortalLinkEndpoints(ctx context.Context, portal *datastore.PortalLink) ([]datastore.Endpoint, error)
func (*PortalLinkService) LoadPortalLinksPaged ¶ added in v0.8.0
func (p *PortalLinkService) LoadPortalLinksPaged(ctx context.Context, project *datastore.Project, f *datastore.FilterBy, pageable datastore.Pageable) ([]datastore.PortalLink, datastore.PaginationData, error)
func (*PortalLinkService) RevokePortalLink ¶ added in v0.8.0
func (p *PortalLinkService) RevokePortalLink(ctx context.Context, project *datastore.Project, portalLink *datastore.PortalLink) error
func (*PortalLinkService) UpdatePortalLink ¶ added in v0.8.0
func (p *PortalLinkService) UpdatePortalLink(ctx context.Context, project *datastore.Project, update *models.PortalLink, portalLink *datastore.PortalLink) (*datastore.PortalLink, error)
type ProjectService ¶ added in v0.8.0
type ProjectService struct {
// contains filtered or unexported fields
}
func NewProjectService ¶ added in v0.8.0
func NewProjectService(apiKeyRepo datastore.APIKeyRepository, projectRepo datastore.ProjectRepository, eventRepo datastore.EventRepository, eventDeliveryRepo datastore.EventDeliveryRepository, limiter limiter.RateLimiter, cache cache.Cache) *ProjectService
func (*ProjectService) CreateProject ¶ added in v0.8.0
func (ps *ProjectService) CreateProject(ctx context.Context, newProject *models.Project, org *datastore.Organisation, member *datastore.OrganisationMember) (*datastore.Project, *models.APIKeyResponse, error)
func (*ProjectService) DeleteProject ¶ added in v0.8.0
func (ps *ProjectService) DeleteProject(ctx context.Context, id string) error
func (*ProjectService) FillProjectStatistics ¶ added in v0.8.0
func (*ProjectService) GetProjects ¶ added in v0.8.0
func (ps *ProjectService) GetProjects(ctx context.Context, filter *datastore.ProjectFilter) ([]*datastore.Project, error)
func (*ProjectService) UpdateProject ¶ added in v0.8.0
func (ps *ProjectService) UpdateProject(ctx context.Context, project *datastore.Project, update *models.UpdateProject) (*datastore.Project, error)
type SecurityService ¶
type SecurityService struct {
// contains filtered or unexported fields
}
func NewSecurityService ¶
func NewSecurityService(projectRepo datastore.ProjectRepository, apiKeyRepo datastore.APIKeyRepository) *SecurityService
func (*SecurityService) CreateAPIKey ¶
func (*SecurityService) CreateEndpointAPIKey ¶ added in v0.8.0
func (ss *SecurityService) CreateEndpointAPIKey(ctx context.Context, d *models.CreateEndpointApiKey) (*datastore.APIKey, string, error)
func (*SecurityService) CreatePersonalAPIKey ¶ added in v0.7.0
func (*SecurityService) GetAPIKeyByID ¶
func (*SecurityService) GetAPIKeys ¶
func (ss *SecurityService) GetAPIKeys(ctx context.Context, f *datastore.ApiKeyFilter, pageable *datastore.Pageable) ([]datastore.APIKey, datastore.PaginationData, error)
func (*SecurityService) RevokeAPIKey ¶
func (ss *SecurityService) RevokeAPIKey(ctx context.Context, uid string) error
func (*SecurityService) RevokePersonalAPIKey ¶ added in v0.7.0
type SourceService ¶ added in v0.6.0
type SourceService struct {
// contains filtered or unexported fields
}
func NewSourceService ¶ added in v0.6.0
func NewSourceService(sourceRepo datastore.SourceRepository, cache cache.Cache) *SourceService
func (*SourceService) CreateSource ¶ added in v0.6.0
func (*SourceService) DeleteSource ¶ added in v0.6.0
func (*SourceService) FindSourceByID ¶ added in v0.6.0
func (*SourceService) FindSourceByMaskID ¶ added in v0.6.2
func (*SourceService) LoadSourcesPaged ¶ added in v0.6.0
func (s *SourceService) LoadSourcesPaged(ctx context.Context, g *datastore.Project, filter *datastore.SourceFilter, pageable datastore.Pageable) ([]datastore.Source, datastore.PaginationData, error)
func (*SourceService) UpdateSource ¶ added in v0.6.0
type SubcriptionService ¶ added in v0.6.0
type SubcriptionService struct {
// contains filtered or unexported fields
}
func NewSubscriptionService ¶ added in v0.6.0
func NewSubscriptionService(subRepo datastore.SubscriptionRepository, endpointRepo datastore.EndpointRepository, sourceRepo datastore.SourceRepository) *SubcriptionService
func (*SubcriptionService) CreateSubscription ¶ added in v0.6.0
func (s *SubcriptionService) CreateSubscription(ctx context.Context, project *datastore.Project, newSubscription *models.Subscription) (*datastore.Subscription, error)
func (*SubcriptionService) DeleteSubscription ¶ added in v0.6.0
func (s *SubcriptionService) DeleteSubscription(ctx context.Context, groupId string, subscription *datastore.Subscription) error
func (*SubcriptionService) FindSubscriptionByID ¶ added in v0.6.0
func (s *SubcriptionService) FindSubscriptionByID(ctx context.Context, project *datastore.Project, subscriptionId string, skipCache bool) (*datastore.Subscription, error)
func (*SubcriptionService) LoadSubscriptionsPaged ¶ added in v0.6.0
func (s *SubcriptionService) LoadSubscriptionsPaged(ctx context.Context, filter *datastore.FilterBy, pageable datastore.Pageable) ([]datastore.Subscription, datastore.PaginationData, error)
func (*SubcriptionService) TestSubscriptionFilter ¶ added in v0.8.0
func (*SubcriptionService) UpdateSubscription ¶ added in v0.6.0
func (s *SubcriptionService) UpdateSubscription(ctx context.Context, projectId string, subscriptionId string, update *models.UpdateSubscription) (*datastore.Subscription, error)
type UserService ¶ added in v0.6.0
type UserService struct {
// contains filtered or unexported fields
}
func NewUserService ¶ added in v0.6.0
func NewUserService(userRepo datastore.UserRepository, cache cache.Cache, queue queue.Queuer, configService *ConfigService, orgService *OrganisationService) *UserService
func (*UserService) GeneratePasswordResetToken ¶ added in v0.6.0
func (u *UserService) GeneratePasswordResetToken(ctx context.Context, baseURL string, data *models.ForgotPassword) error
func (*UserService) LogoutUser ¶ added in v0.6.0
func (u *UserService) LogoutUser(token string) error
func (*UserService) RefreshToken ¶ added in v0.6.0
func (*UserService) RegisterUser ¶ added in v0.6.5
func (*UserService) ResendEmailVerificationToken ¶ added in v0.8.0
func (*UserService) ResetPassword ¶ added in v0.6.0
func (u *UserService) ResetPassword(ctx context.Context, token string, data *models.ResetPassword) (*datastore.User, error)
func (*UserService) UpdatePassword ¶ added in v0.6.0
func (u *UserService) UpdatePassword(ctx context.Context, data *models.UpdatePassword, user *datastore.User) (*datastore.User, error)
func (*UserService) UpdateUser ¶ added in v0.6.0
func (u *UserService) UpdateUser(ctx context.Context, data *models.UpdateUser, user *datastore.User) (*datastore.User, error)
func (*UserService) VerifyEmail ¶ added in v0.8.0
func (u *UserService) VerifyEmail(ctx context.Context, token string) error
Source Files
¶
Click to show internal directories.
Click to hide internal directories.