forked from tangled.org/core
this repo has no description
at master 1.8 kB view raw
1package notify 2 3import ( 4 "context" 5 6 "tangled.sh/tangled.sh/core/appview/db" 7) 8 9type Notifier interface { 10 NewRepo(ctx context.Context, repo *db.Repo) 11 12 NewStar(ctx context.Context, star *db.Star) 13 DeleteStar(ctx context.Context, star *db.Star) 14 15 NewIssue(ctx context.Context, issue *db.Issue) 16 17 NewFollow(ctx context.Context, follow *db.Follow) 18 DeleteFollow(ctx context.Context, follow *db.Follow) 19 20 NewPull(ctx context.Context, pull *db.Pull) 21 NewPullComment(ctx context.Context, comment *db.PullComment) 22 23 UpdateProfile(ctx context.Context, profile *db.Profile) 24 25 NewString(ctx context.Context, s *db.String) 26 EditString(ctx context.Context, s *db.String) 27 DeleteString(ctx context.Context, did, rkey string) 28} 29 30// BaseNotifier is a listener that does nothing 31type BaseNotifier struct{} 32 33var _ Notifier = &BaseNotifier{} 34 35func (m *BaseNotifier) NewRepo(ctx context.Context, repo *db.Repo) {} 36 37func (m *BaseNotifier) NewStar(ctx context.Context, star *db.Star) {} 38func (m *BaseNotifier) DeleteStar(ctx context.Context, star *db.Star) {} 39 40func (m *BaseNotifier) NewIssue(ctx context.Context, issue *db.Issue) {} 41 42func (m *BaseNotifier) NewFollow(ctx context.Context, follow *db.Follow) {} 43func (m *BaseNotifier) DeleteFollow(ctx context.Context, follow *db.Follow) {} 44 45func (m *BaseNotifier) NewPull(ctx context.Context, pull *db.Pull) {} 46func (m *BaseNotifier) NewPullComment(ctx context.Context, comment *db.PullComment) {} 47 48func (m *BaseNotifier) UpdateProfile(ctx context.Context, profile *db.Profile) {} 49 50func (m *BaseNotifier) NewString(ctx context.Context, s *db.String) {} 51func (m *BaseNotifier) EditString(ctx context.Context, s *db.String) {} 52func (m *BaseNotifier) DeleteString(ctx context.Context, did, rkey string) {}