Skip to content

Commit

Permalink
feat: expose GetSourceID for sinks
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelEischer committed Sep 26, 2023
1 parent ebe2530 commit f937ead
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 16 deletions.
4 changes: 4 additions & 0 deletions internal/adapter/sink_adapter.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,3 +102,7 @@ func (a SinkAdapter) DeleteEvent(ctx context.Context, e models.Event) error {
func (a SinkAdapter) EventsInTimeframe(ctx context.Context, start time.Time, end time.Time) ([]models.Event, error) {
return a.client.EventsInTimeframe(ctx, start, end)
}

func (a SinkAdapter) GetSourceID() string {
return a.client.GetSourceID()
}
32 changes: 24 additions & 8 deletions internal/sync/mocks/Sink.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 10 additions & 8 deletions internal/sync/mocks/Source.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions internal/sync/synchronisation.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,5 @@ type Sink interface {
UpdateEvent(ctx context.Context, e models.Event) error
// DeleteEvent deletes the given Event in the external calendar
DeleteEvent(ctx context.Context, e models.Event) error
GetSourceID() string
}

0 comments on commit f937ead

Please sign in to comment.