yoake/internal/comm/model/interface.go

21 lines
436 B
Go
Raw Normal View History

2022-11-13 00:17:42 -06:00
package model
import (
"github.com/labstack/echo/v4"
)
type CommMethod interface {
SupportedMIME() []string
2022-11-19 11:04:03 -06:00
SendGenericMessage(message *GenericMessage) error
2022-11-13 00:17:42 -06:00
}
type CommMethodWithRoute interface {
RegisterRoute(g *echo.Group)
}
type Communicator interface {
GetMethod(method string) CommMethod
GetMethodsByMIME(mime string) []CommMethod
2022-11-19 11:04:03 -06:00
SendGenericMessage(preferredMethod string, message *GenericMessage, force bool) error
2022-11-13 00:17:42 -06:00
}