Documentation ¶
Index ¶
- Constants
- func FindCoverArtPath(playPath string) string
- func GenerateCoverArtImg(path string) string
- func GetLess(sender string) (output []string)
- func GetLessTable(sender string) string
- func GetMore(sender string) (output []string)
- func GetMoreTable(sender string) string
- func ResetMore(sender string)
- func SaveMoreRows(sender string, rows []string, table MessageTable) int
- func SendMore(sender, text string)
- type MessageTable
Constants ¶
const ( MaxMessageLengthWithImage = 131072 MaxMessageLengthWithoutImage = 5000 )
Default Message size limits for Murmur
Variables ¶
This section is empty.
Functions ¶
func FindCoverArtPath ¶
func GenerateCoverArtImg ¶
GenerateCoverArtImg creates a base64 encoded html <img> TODO: Find a way to get generated cover art to follow the larger limits (for messages that contain images)
for now, we make sure the image is less than maxSize to be well below the 5000 text limit the mumble server imposes by default for text messages (that contain no image)
TODO: Option to override limits for servers with modified settings
func GetLessTable ¶
func GetMoreTable ¶
func SaveMoreRows ¶
func SaveMoreRows(sender string, rows []string, table MessageTable) int
SaveMoreRows adds the first rows limited by config.MaxLines to the provided table and then saves the additional rows into the 'more' buffer
Types ¶
type MessageTable ¶
type MessageTable struct {
// contains filtered or unexported fields
}
func MakeTable ¶
func MakeTable(header string, columns ...string) MessageTable
MakeTable generates a html table with the first parameter as a header on top of the table and subsequent as column headers for the table
func (MessageTable) AddRow ¶
func (msgTbl MessageTable) AddRow(cells ...string)
AddRow adds cells to a MessageTable
func (MessageTable) String ¶
func (msgTbl MessageTable) String() string
String escapes the tbody and table elements of a MessageTable and then returns a string of the MessageTable