Documentation ¶
Index ¶
Constants ¶
View Source
const ( TypeConsole string = "console" TypeTelegram string = "telegram" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Attachment ¶
func ConvertAttachments ¶
func NewAttachment ¶
func NewAttachment(att *envelope.Attachment, data []byte) Attachment
func OnlyImages ¶
func OnlyImages(atts []Attachment) []Attachment
type CreateEndpointRequest ¶
type Endpoint ¶
type Endpoint struct { Name string Type string TextDisable bool AttachmentsDisable bool // contains filtered or unexported fields }
func NewEndpoint ¶
func (Endpoint) TextTemplate ¶
type EndpointService ¶
type EndpointService struct {
// contains filtered or unexported fields
}
func NewEndpointService ¶
func NewEndpointService(store Store) *EndpointService
func (*EndpointService) CreateEndpoint ¶
func (es *EndpointService) CreateEndpoint(req CreateEndpointRequest) error
func (*EndpointService) GetEndpoint ¶
func (es *EndpointService) GetEndpoint(name string) (Endpoint, error)
func (*EndpointService) ListEndpoint ¶
func (es *EndpointService) ListEndpoint() []Endpoint
type Sender ¶
type Sender interface { // Send text and attachments to endpoint. Text can be empty and atts can be length 0 but not both. Send(ctx context.Context, text string, atts []Attachment) error }
Click to show internal directories.
Click to hide internal directories.