activity

package
v1.1.4 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2026 License: MIT Imports: 6 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewActivityService

func NewActivityService(repo repository.Repository) *activityServiceImpl

Types

type ActivityResponse

type ActivityResponse struct {
	ID   uint
	Type model.ActivityType
	Time time.Time

	RoomCreated          *RoomCreatedDetail
	PaymentCreated       *PaymentCreatedDetail
	PaymentAmountChanged *PaymentChangedDetail
	PaymentPaidChanged   *PaymentChangedDetail
	RollCallCreated      *RollCallCreatedDetail
	QuestionCreated      *QuestionCreatedDetail
}

type ActivityService

type ActivityService interface {
	GetActivities(
		ctx context.Context,
		campID uint,
		userID string,
	) ([]ActivityResponse, error)
	RecordRoomCreated(
		ctx context.Context,
		repo repository.Repository,
		room model.Room,
	) error
	RecordPaymentCreated(
		ctx context.Context,
		repo repository.Repository,
		payment model.Payment,
	) error
	RecordPaymentAmountChanged(
		ctx context.Context,
		repo repository.Repository,
		payment model.Payment,
	) error
	RecordPaymentPaidChanged(
		ctx context.Context,
		repo repository.Repository,
		payment model.Payment,
	) error
	RecordRollCallCreated(
		ctx context.Context,
		repo repository.Repository,
		rollCall model.RollCall,
	) error
	RecordQuestionCreated(
		ctx context.Context,
		repo repository.Repository,
		questionGroup model.QuestionGroup,
	) error
}

type PaymentChangedDetail

type PaymentChangedDetail struct {
	Amount int
}

type PaymentCreatedDetail

type PaymentCreatedDetail struct {
	Amount int
}

type QuestionCreatedDetail

type QuestionCreatedDetail struct {
	QuestionGroupID uint
	Name            string
	Due             time.Time
	NeedsResponse   bool
}

type RollCallCreatedDetail

type RollCallCreatedDetail struct {
	RollCallID uint
	Name       string
	IsSubject  bool
	Answered   bool
}

type RoomCreatedDetail

type RoomCreatedDetail struct{}

Directories

Path Synopsis
Package mockactivity is a generated GoMock package.
Package mockactivity is a generated GoMock package.

Jump to

Keyboard shortcuts

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