add handlers for channels (#4050)

<!-- PR description-->

add Handlers interface for Channels. 

#### Does this PR need a docs update or release note?
- [ ]  No

#### Type of change

<!--- Please check the type of change your PR introduces: --->
- [ ] 🌻 Feature

#### Issue(s)

<!-- Can reference multiple issues. Use one of the following "magic words" - "closes, fixes" to auto-close the Github issue. -->
* #<issue>

#### Test Plan

<!-- How will this be tested prior to merging.-->
This commit is contained in:
neha_gupta 2023-08-22 22:03:59 +05:30 committed by GitHub
parent 9255013d6f
commit 9f9ce34add
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 58 additions and 0 deletions

View File

@ -0,0 +1,18 @@
package groups
import (
"context"
"github.com/microsoft/kiota-abstractions-go/serialization"
"github.com/microsoftgraph/msgraph-sdk-go/models"
"github.com/alcionai/corso/src/pkg/services/m365/api"
)
type BackupMessagesHandler interface {
GetMessageByID(ctx context.Context, teamID, channelID, itemID string) (models.ChatMessageable, error)
NewMessagePager(teamID, channelID string) api.MessageItemDeltaEnumerator
GetChannelByID(ctx context.Context, teamID, channelID string) (models.Channelable, error)
NewChannelPager(teamID, channelID string) api.ChannelItemDeltaEnumerator
GetReplyByID(ctx context.Context, teamID, channelID, messageID string) (serialization.Parsable, error)
}

View File

@ -0,0 +1 @@
package api

View File

@ -0,0 +1,39 @@
package api
import (
"context"
)
// ---------------------------------------------------------------------------
// item pager
// ---------------------------------------------------------------------------
type MessageItemDeltaEnumerator interface {
GetPage(context.Context) (DeltaPageLinker, error)
}
// TODO: implement
// var _ MessageItemDeltaEnumerator = &messagePageCtrl{}
// type messagePageCtrl struct {
// gs graph.Servicer
// builder *teams.ItemChannelsItemMessagesRequestBuilder
// options *teams.ItemChannelsItemMessagesRequestBuilderGetRequestConfiguration
// }
// ---------------------------------------------------------------------------
// channel pager
// ---------------------------------------------------------------------------
type ChannelItemDeltaEnumerator interface {
GetPage(context.Context) (DeltaPageLinker, error)
}
// TODO: implement
// var _ ChannelsItemDeltaEnumerator = &channelsPageCtrl{}
// type channelsPageCtrl struct {
// gs graph.Servicer
// builder *teams.ItemChannelsChannelItemRequestBuilder
// options *teams.ItemChannelsChannelItemRequestBuilderGetRequestConfiguration
// }