waitlivemsg

package
v1.2.4 Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2017 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Message

type Message struct {
	// contains filtered or unexported fields
}

Message to print

func EmptyLine

func EmptyLine() *Message

EmptyLine creates a Message with an empty line it has the side-effect of using no symbols as prefixes

func NewMessage

func NewMessage(text string) *Message

NewMessage creates a Message with a given text

func (*Message) End

func (m *Message) End()

End of live message

func (*Message) GetText

func (m *Message) GetText() string

GetText of the message

func (*Message) PlayText

func (m *Message) PlayText(text string)

PlayText as a live message

func (*Message) StopText

func (m *Message) StopText(text string)

StopText of the live messages

type WaitLiveMsg

type WaitLiveMsg struct {
	// contains filtered or unexported fields
}

WaitLiveMsg is used for "waiting" live message

func New

func New(ws *uilive.Writer) *WaitLiveMsg

New creates a WaitLiveMsg

func (*WaitLiveMsg) AddMessage

func (w *WaitLiveMsg) AddMessage(msg *Message)

AddMessage to display

func (*WaitLiveMsg) Duration

func (w *WaitLiveMsg) Duration() time.Duration

Duration in seconds

func (*WaitLiveMsg) GetMessages added in v1.2.4

func (w *WaitLiveMsg) GetMessages() []*Message

GetMessages displayed

func (*WaitLiveMsg) RemoveMessage

func (w *WaitLiveMsg) RemoveMessage(msg *Message)

RemoveMessage from the messages slice

func (*WaitLiveMsg) ResetDuration

func (w *WaitLiveMsg) ResetDuration()

ResetDuration to restart counter

func (*WaitLiveMsg) ResetMessages

func (w *WaitLiveMsg) ResetMessages()

ResetMessages to display

func (*WaitLiveMsg) SetMessage

func (w *WaitLiveMsg) SetMessage(msg *Message)

SetMessage to display

func (*WaitLiveMsg) SetMessages

func (w *WaitLiveMsg) SetMessages(msgs []*Message)

SetMessages to display

func (*WaitLiveMsg) SetStream

func (w *WaitLiveMsg) SetStream(ws *uilive.Writer)

SetStream to output to

func (*WaitLiveMsg) Stop

func (w *WaitLiveMsg) Stop()

Stop the waiting message

func (*WaitLiveMsg) Wait

func (w *WaitLiveMsg) Wait()

Wait starts the waiting message

Jump to

Keyboard shortcuts

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