corso/src/pkg/services/m365/api/interfaces.go
Keepers 49bbdfc096
add getPostIDs in conversations pager (#4578)
adds the getPostIDs func to ensure conversations
complies with standard data paging patterns

---

#### Does this PR need a docs update or release note?

- [x]  No

#### Type of change

- [x] 🌻 Feature

#### Issue(s)

* #4536

#### Test Plan

- [x]  Unit test
- [x] 💚 E2E
2023-11-07 21:57:55 +00:00

32 lines
551 B
Go

package api
import (
"context"
"github.com/microsoft/kiota-abstractions-go/serialization"
"github.com/alcionai/corso/src/pkg/fault"
)
type GetAndSerializeItemer[INFO any] interface {
GetItemer[INFO]
Serializer
}
type GetItemer[INFO any] interface {
GetItem(
ctx context.Context,
user, itemID string,
immutableIDs bool,
errs *fault.Bus,
) (serialization.Parsable, *INFO, error)
}
type Serializer interface {
Serialize(
ctx context.Context,
item serialization.Parsable,
protectedResource, itemID string,
) ([]byte, error)
}