service

package
v0.7.2 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrUserNotFound = errors.New("user not found")

Functions

func NewNotificationService added in v0.6.2

func NewNotificationService(
	repo repository.Repository,
	traqService TraqService,
) *notificationServiceImpl

func NewSchedulerService added in v0.7.2

func NewSchedulerService(
	repo repository.Repository,
	traqService TraqService,
) *schedulerServiceImpl

NewSchedulerService はSchedulerServiceの新しいインスタンスを作成します

func NewTraqService

func NewTraqService(baseURL, accessToken string) *traqServiceImpl

Types

type NotificationService added in v0.6.2

type NotificationService interface {
	// 未回答だった場合oldAnswerはnil
	SendAnswerChangeMessage(
		ctx context.Context,
		editorUserID string,
		oldAnswer *model.Answer,
		newAnswer model.Answer,
	) error
}

type SchedulerService added in v0.7.2

type SchedulerService interface {
	// Start はスケジューラーを開始します
	Start(ctx context.Context)
}

SchedulerService はメッセージ送信スケジューリングを管理するサービスです

type TraqService

type TraqService interface {
	GetCanonicalUserName(ctx context.Context, userID string) (string, error)
	// PostDirectMessage は指定したユーザーにダイレクトメッセージを送信します。
	PostDirectMessage(ctx context.Context, userID string, content string) error
}

TraqService はtraQ APIとの連携を担当するサービスです。

Directories

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

Jump to

Keyboard shortcuts

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