output

package
v0.0.0-...-bafbf86 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 7, 2022 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ParseModeMarkdown - simple ** __ etc. formatting
	ParseModeMarkdown = iota
	// ParseModeHTML - treat message as html (inc formatiing etc.)
	ParseModeHTML
)

Variables

This section is empty.

Functions

This section is empty.

Types

type IPresenter

type IPresenter interface {
	ShowMessage(data ShowMessageData) (int, error)
	ShowImage(data ShowImageData) (int, error)
	ShowGif(data ShowAnimationData) (int, error)
	ShowAudio(data ShowAudioData) (int, error)
}

IPresenter - prepares data to display it via View return: @sent_message_id, error

type IView

type IView interface {
	ShowMessage(msg ViewMessageData) (int, error)
	ShowImage(msg ViewImageData) (int, error)
	ShowAnimation(msg ViewAnimationData) (int, error)
	ShowAudio(msg ViewAudioData) (int, error)
}

IView - display smth return: @sent_message_id, error

type ShowAnimationData

type ShowAnimationData struct {
	AnimationID string
	Caption     string
	ShowMessageData
}

ShowAnimationData - feed presenter's ShowImage with this

type ShowAudioData

type ShowAudioData struct {
	AudioURL     string
	RawAudioData []byte
	Caption      string
	ShowMessageData
}

ShowAudioData - feed presenter's ShowAudio with this

type ShowImageData

type ShowImageData struct {
	ImageURL     string
	RawImageData []byte
	ShowMessageData
}

ShowImageData - feed presenter's ShowImage with this

type ShowMessageData

type ShowMessageData struct {
	ChatID       int64
	ReplyToMsgID int
	Text         string
	ParseMode    int
}

ShowMessageData - feed presenter's ShowMessage with this

type ViewAnimationData

type ViewAnimationData struct {
	AnimationID string
	Caption     string
	ViewMessageData
}

ViewAnimationData - shows image

type ViewAudioData

type ViewAudioData struct {
	AudioData []byte
	Caption   string
	ViewMessageData
}

ViewAudioData - uploads audio and shows it

type ViewImageData

type ViewImageData struct {
	ImageData []byte
	ViewMessageData
}

ViewImageData - shows image

type ViewMessageData

type ViewMessageData struct {
	ReplyToMsgID int
	ChatID       int64
	Text         string
	ParseMode    int
}

ViewMessageData - simple message data to be shown by IView

Directories

Path Synopsis
views

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL