Documentation ¶
Index ¶
- Constants
- type AutoProgress
- type Progress
- func (p *Progress) Active(percent int, message ...interface{})
- func (p *Progress) AutoProgress(stepValue int, duration time.Duration, maxValue int, message ...interface{})
- func (p *Progress) Done(status string, message ...interface{})
- func (p *Progress) Exception(percent int, message ...interface{})
- func (p *Progress) GetMessage() interface{}
- func (p *Progress) GetPercent() int
- func (p *Progress) GetStatus() string
- func (p *Progress) NewSubProgress(proportion int) *SubProgress
- func (p *Progress) ProgressChanged(subProgress *SubProgress)
- func (p *Progress) Send(percent int, status string, message interface{})
- func (p *Progress) SendMsg()
- func (p *Progress) Set(percent int, status string, message ...interface{})
- func (p *Progress) SetStatus(status string, message ...interface{})
- func (p *Progress) Step(stepValue int, message ...interface{})
- func (p *Progress) Success(message ...interface{})
- type ProgressDispatcher
- func (pd *ProgressDispatcher) Active(percent int, message ...interface{})
- func (pd *ProgressDispatcher) AutoProgress(stepValue int, duration time.Duration, maxValue int, message ...interface{})
- func (pd *ProgressDispatcher) Done(status string, message ...interface{})
- func (pd *ProgressDispatcher) Exception(percent int, message ...interface{})
- func (pd *ProgressDispatcher) GetMessage() interface{}
- func (pd *ProgressDispatcher) GetPercent() int
- func (pd *ProgressDispatcher) GetStatus() string
- func (pd *ProgressDispatcher) NewSubProgress(proportion int) *SubProgress
- func (pd *ProgressDispatcher) ProgressChanged(subProgress *SubProgress)
- func (pd *ProgressDispatcher) Set(percent int, status string, message ...interface{})
- func (pd *ProgressDispatcher) SetStatus(status string, message ...interface{})
- func (pd *ProgressDispatcher) Step(stepValue int, message ...interface{})
- func (pd *ProgressDispatcher) Success(message ...interface{})
- type ProgressGetter
- type ProgressHandler
- type ProgressSetter
- type ProgressSubscriber
- type ProgressSuperior
- type SubProgress
Constants ¶
View Source
const ( ProgressActive = "active" ProgressException = "exception" ProgressSuccess = "success" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AutoProgress ¶
type AutoProgress struct {
// contains filtered or unexported fields
}
Struct AutoProgress
func (*AutoProgress) Start ¶
func (ap *AutoProgress) Start()
func (*AutoProgress) Stop ¶
func (ap *AutoProgress) Stop()
type Progress ¶
type Progress struct { Code string Message interface{} Percent int Status string // contains filtered or unexported fields }
Core Struct : Progress
func NewProgress ¶
func NewProgress(handler ProgressHandler, code string) *Progress
func (*Progress) AutoProgress ¶
func (*Progress) GetMessage ¶
func (p *Progress) GetMessage() interface{}
func (*Progress) GetPercent ¶
func (*Progress) NewSubProgress ¶
func (p *Progress) NewSubProgress(proportion int) *SubProgress
func (*Progress) ProgressChanged ¶
func (p *Progress) ProgressChanged(subProgress *SubProgress)
nolint[:gocyclo,dupl]
type ProgressDispatcher ¶
type ProgressDispatcher struct { Code string Subscribers []ProgressSubscriber // contains filtered or unexported fields }
Progress Dispatcher
func NewProgressDispatcher ¶
func NewProgressDispatcher(code string, subscriber ...ProgressSubscriber) *ProgressDispatcher
export
func (*ProgressDispatcher) Active ¶
func (pd *ProgressDispatcher) Active(percent int, message ...interface{})
func (*ProgressDispatcher) AutoProgress ¶
func (pd *ProgressDispatcher) AutoProgress(stepValue int, duration time.Duration, maxValue int, message ...interface{})
func (*ProgressDispatcher) Done ¶
func (pd *ProgressDispatcher) Done(status string, message ...interface{})
func (*ProgressDispatcher) Exception ¶
func (pd *ProgressDispatcher) Exception(percent int, message ...interface{})
func (*ProgressDispatcher) GetMessage ¶
func (pd *ProgressDispatcher) GetMessage() interface{}
func (*ProgressDispatcher) GetPercent ¶
func (pd *ProgressDispatcher) GetPercent() int
func (*ProgressDispatcher) GetStatus ¶
func (pd *ProgressDispatcher) GetStatus() string
func (*ProgressDispatcher) NewSubProgress ¶
func (pd *ProgressDispatcher) NewSubProgress(proportion int) *SubProgress
func (*ProgressDispatcher) ProgressChanged ¶
func (pd *ProgressDispatcher) ProgressChanged(subProgress *SubProgress)
nolint[:gocyclo,dupl]
func (*ProgressDispatcher) Set ¶
func (pd *ProgressDispatcher) Set(percent int, status string, message ...interface{})
func (*ProgressDispatcher) SetStatus ¶
func (pd *ProgressDispatcher) SetStatus(status string, message ...interface{})
func (*ProgressDispatcher) Step ¶
func (pd *ProgressDispatcher) Step(stepValue int, message ...interface{})
func (*ProgressDispatcher) Success ¶
func (pd *ProgressDispatcher) Success(message ...interface{})
type ProgressGetter ¶
type ProgressHandler ¶
type ProgressHandler interface {
SendData(msg interface{}) error
}
type ProgressSetter ¶
type ProgressSetter interface { ProgressGetter Set(percent int, status string, message ...interface{}) // contains filtered or unexported methods }
type ProgressSubscriber ¶
type ProgressSuperior ¶
type ProgressSuperior interface {
ProgressChanged(subProgress *SubProgress)
}
type SubProgress ¶
type SubProgress struct { Proportion int Code string Message interface{} Percent int Status string Propagation bool // contains filtered or unexported fields }
func (*SubProgress) IsDone ¶
func (sp *SubProgress) IsDone() bool
func (*SubProgress) ProgressSet ¶
func (sp *SubProgress) ProgressSet(percent int, status string, message ...interface{})
Click to show internal directories.
Click to hide internal directories.