whatsapp-multi-devicewhatsapp-apiwhatsapprestgolanggorest-apigolang-whatsapp-apigolang-whatsappbotwhatsapp-web-multi-devicewhatsapp-api-go
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
1.2 KiB
38 lines
1.2 KiB
package group
|
|
|
|
import (
|
|
"context"
|
|
"go.mau.fi/whatsmeow"
|
|
)
|
|
|
|
type IGroupService interface {
|
|
JoinGroupWithLink(ctx context.Context, request JoinGroupWithLinkRequest) (groupID string, err error)
|
|
LeaveGroup(ctx context.Context, request LeaveGroupRequest) (err error)
|
|
CreateGroup(ctx context.Context, request CreateGroupRequest) (groupID string, err error)
|
|
ManageParticipant(ctx context.Context, request ParticipantRequest) (result []ParticipantStatus, err error)
|
|
}
|
|
|
|
type JoinGroupWithLinkRequest struct {
|
|
Link string `json:"link" form:"link"`
|
|
}
|
|
|
|
type LeaveGroupRequest struct {
|
|
GroupID string `json:"group_id" form:"group_id"`
|
|
}
|
|
|
|
type CreateGroupRequest struct {
|
|
Title string `json:"title" form:"title"`
|
|
Participants []string `json:"participants" form:"participants"`
|
|
}
|
|
|
|
type ParticipantRequest struct {
|
|
GroupID string `json:"group_id" form:"group_id"`
|
|
Participants []string `json:"participants" form:"participants"`
|
|
Action whatsmeow.ParticipantChange `json:"action" form:"action"`
|
|
}
|
|
|
|
type ParticipantStatus struct {
|
|
Participant string `json:"participant"`
|
|
Status string `json:"status"`
|
|
Message string `json:"message"`
|
|
}
|