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:
parent
9255013d6f
commit
9f9ce34add
18
src/internal/m365/collection/groups/handler.go
Normal file
18
src/internal/m365/collection/groups/handler.go
Normal 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)
|
||||
}
|
||||
1
src/pkg/services/m365/api/channels.go
Normal file
1
src/pkg/services/m365/api/channels.go
Normal file
@ -0,0 +1 @@
|
||||
package api
|
||||
39
src/pkg/services/m365/api/channels_pager.go
Normal file
39
src/pkg/services/m365/api/channels_pager.go
Normal 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
|
||||
// }
|
||||
Loading…
x
Reference in New Issue
Block a user