forked from tangled.org/core
this repo has no description
at master 1.4 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 26// BaseNotifier is a listener that does nothing 27type BaseNotifier struct{} 28 29var _ Notifier = &BaseNotifier{} 30 31func (m *BaseNotifier) NewRepo(ctx context.Context, repo *db.Repo) {} 32 33func (m *BaseNotifier) NewStar(ctx context.Context, star *db.Star) {} 34func (m *BaseNotifier) DeleteStar(ctx context.Context, star *db.Star) {} 35 36func (m *BaseNotifier) NewIssue(ctx context.Context, issue *db.Issue) {} 37 38func (m *BaseNotifier) NewFollow(ctx context.Context, follow *db.Follow) {} 39func (m *BaseNotifier) DeleteFollow(ctx context.Context, follow *db.Follow) {} 40 41func (m *BaseNotifier) NewPull(ctx context.Context, pull *db.Pull) {} 42func (m *BaseNotifier) NewPullComment(ctx context.Context, comment *db.PullComment) {} 43 44func (m *BaseNotifier) UpdateProfile(ctx context.Context, profile *db.Profile) {}