activityevent

package
v0.20.0 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: MPL-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package activityevent package

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateActivityEventInput

type CreateActivityEventInput struct {
	NamespacePath *string
	Payload       interface{}
	Action        models.ActivityEventAction
	TargetType    models.ActivityEventTargetType
	TargetID      string
}

CreateActivityEventInput specifies the inputs for creating an activity event The method will assign the user or service account caller.

type GetActivityEventsInput

type GetActivityEventsInput struct {
	Sort              *db.ActivityEventSortableField
	PaginationOptions *pagination.Options
	UserID            *string
	ServiceAccountID  *string
	NamespacePath     *string
	TimeRangeStart    *time.Time
	TimeRangeEnd      *time.Time
	Actions           []models.ActivityEventAction
	TargetTypes       []models.ActivityEventTargetType
	IncludeNested     bool
}

GetActivityEventsInput is the input for querying a list of 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

type Service

type Service interface {
	GetActivityEvents(ctx context.Context, input *GetActivityEventsInput) (*db.ActivityEventsResult, error)
	CreateActivityEvent(ctx context.Context, input *CreateActivityEventInput) (*models.ActivityEvent, error)
}

Service implements all activity event related functionality

func NewService

func NewService(dbClient *db.Client, logger logger.Logger) Service

NewService creates an instance of Service

Jump to

Keyboard shortcuts

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