Documentation ¶
Overview ¶
Package activityevent provides functionality for the activity events which are used to track changes to Phobos resources.
Index ¶
- type CreateActivityEventInput
- type GetActivityEventsInput
- type MockService
- func (_m *MockService) CreateActivityEvent(ctx context.Context, input *CreateActivityEventInput) (*models.ActivityEvent, error)
- func (_m *MockService) GetActivityEvents(ctx context.Context, input *GetActivityEventsInput) (*db.ActivityEventsResult, error)
- func (_m *MockService) SubscribeToActivityEvents(ctx context.Context, input *SubscribeToActivityEventsInput) (<-chan *models.ActivityEvent, error)
- type Service
- type SubscribeToActivityEventsInput
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateActivityEventInput ¶
type CreateActivityEventInput struct { Payload any OrganizationID *string ProjectID *string TargetID *string Action models.ActivityEventAction TargetType models.ActivityEventTargetType }
CreateActivityEventInput represents the input for creating an activity event.
type GetActivityEventsInput ¶
type GetActivityEventsInput struct { Sort *db.ActivityEventSortableField PaginationOptions *pagination.Options OrganizationID *string ProjectID *string UserID *string ServiceAccountID *string ReleaseTargetID *string TimeRangeStart *time.Time TimeRangeEnd *time.Time Actions []models.ActivityEventAction TargetTypes []models.ActivityEventTargetType }
GetActivityEventsInput represents the input for getting activity events.
type MockService ¶
MockService is an autogenerated mock type for the Service type
func NewMockService ¶
func NewMockService(t mockConstructorTestingTNewMockService) *MockService
NewMockService creates a new instance of MockService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func (*MockService) CreateActivityEvent ¶
func (_m *MockService) CreateActivityEvent(ctx context.Context, input *CreateActivityEventInput) (*models.ActivityEvent, error)
CreateActivityEvent provides a mock function with given fields: ctx, input
func (*MockService) GetActivityEvents ¶
func (_m *MockService) GetActivityEvents(ctx context.Context, input *GetActivityEventsInput) (*db.ActivityEventsResult, error)
GetActivityEvents provides a mock function with given fields: ctx, input
func (*MockService) SubscribeToActivityEvents ¶
func (_m *MockService) SubscribeToActivityEvents(ctx context.Context, input *SubscribeToActivityEventsInput) (<-chan *models.ActivityEvent, error)
SubscribeToActivityEvents provides a mock function with given fields: ctx, input
type Service ¶
type Service interface { GetActivityEvents(ctx context.Context, input *GetActivityEventsInput) (*db.ActivityEventsResult, error) CreateActivityEvent(ctx context.Context, input *CreateActivityEventInput) (*models.ActivityEvent, error) SubscribeToActivityEvents(ctx context.Context, input *SubscribeToActivityEventsInput) (<-chan *models.ActivityEvent, error) }
Service encapsulates the logic for interfacing with the activity event service.
func NewService ¶
func NewService( logger logger.Logger, dbClient *db.Client, eventManager *events.EventManager, ) Service
NewService creates a new activity event service.
type SubscribeToActivityEventsInput ¶
SubscribeToActivityEventsInput represents the input for subscribing to activity events.