this repo has no description
1package notify
2
3import (
4 "context"
5
6 "github.com/bluesky-social/indigo/atproto/syntax"
7 "tangled.org/core/appview/models"
8)
9
10type Notifier interface {
11 NewRepo(ctx context.Context, repo *models.Repo)
12
13 NewStar(ctx context.Context, star *models.Star)
14 DeleteStar(ctx context.Context, star *models.Star)
15
16 NewComment(ctx context.Context, comment *models.Comment)
17 DeleteComment(ctx context.Context, comment *models.Comment)
18
19 NewIssue(ctx context.Context, issue *models.Issue, mentions []syntax.DID)
20 NewIssueState(ctx context.Context, actor syntax.DID, issue *models.Issue)
21 DeleteIssue(ctx context.Context, issue *models.Issue)
22
23 NewFollow(ctx context.Context, follow *models.Follow)
24 DeleteFollow(ctx context.Context, follow *models.Follow)
25
26 NewPull(ctx context.Context, pull *models.Pull)
27 NewPullState(ctx context.Context, actor syntax.DID, pull *models.Pull)
28
29 UpdateProfile(ctx context.Context, profile *models.Profile)
30
31 NewString(ctx context.Context, s *models.String)
32 EditString(ctx context.Context, s *models.String)
33 DeleteString(ctx context.Context, did, rkey string)
34}
35
36// BaseNotifier is a listener that does nothing
37type BaseNotifier struct{}
38
39var _ Notifier = &BaseNotifier{}
40
41func (m *BaseNotifier) NewRepo(ctx context.Context, repo *models.Repo) {}
42
43func (m *BaseNotifier) NewStar(ctx context.Context, star *models.Star) {}
44func (m *BaseNotifier) DeleteStar(ctx context.Context, star *models.Star) {}
45
46func (m *BaseNotifier) NewComment(ctx context.Context, comment *models.Comment) {}
47func (m *BaseNotifier) DeleteComment(ctx context.Context, comment *models.Comment) {}
48
49func (m *BaseNotifier) NewIssue(ctx context.Context, issue *models.Issue, mentions []syntax.DID) {}
50func (m *BaseNotifier) NewIssueState(ctx context.Context, actor syntax.DID, issue *models.Issue) {}
51func (m *BaseNotifier) DeleteIssue(ctx context.Context, issue *models.Issue) {}
52
53func (m *BaseNotifier) NewFollow(ctx context.Context, follow *models.Follow) {}
54func (m *BaseNotifier) DeleteFollow(ctx context.Context, follow *models.Follow) {}
55
56func (m *BaseNotifier) NewPull(ctx context.Context, pull *models.Pull) {}
57func (m *BaseNotifier) NewPullState(ctx context.Context, actor syntax.DID, pull *models.Pull) {}
58
59func (m *BaseNotifier) UpdateProfile(ctx context.Context, profile *models.Profile) {}
60
61func (m *BaseNotifier) NewString(ctx context.Context, s *models.String) {}
62func (m *BaseNotifier) EditString(ctx context.Context, s *models.String) {}
63func (m *BaseNotifier) DeleteString(ctx context.Context, did, rkey string) {}