activityevent

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2024 License: MPL-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package activityevent provides functionality for the activity events which are used to track changes to Phobos resources.

Index

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

type MockService struct {
	mock.Mock
}

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

type SubscribeToActivityEventsInput struct {
	OrganizationID *string
	ProjectID      *string
}

SubscribeToActivityEventsInput represents the input for subscribing to activity events.

Jump to

Keyboard shortcuts

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