Documentation ¶
Index ¶
- func AssertContains(t *testing.T, contains string, msgAndArgs ...string)
- func AssertEqual(t *testing.T, a, b interface{})
- func AssertNil(t *testing.T, object interface{})
- func AssertNotNil(t *testing.T, object interface{})
- func Bool(a bool) *bool
- func BoolSlice(a []bool) []*bool
- func BoolSliceValue(a []*bool) []bool
- func BoolValue(a *bool) bool
- func Float32(a float32) *float32
- func Float32Slice(a []float32) []*float32
- func Float32Value(a *float32) float32
- func Float32ValueSlice(a []*float32) []float32
- func Float64(a float64) *float64
- func Float64Slice(a []float64) []*float64
- func Float64Value(a *float64) float64
- func Float64ValueSlice(a []*float64) []float64
- func InitLogMsg(fieldMap map[string]string)
- func Int(a int) *int
- func Int16(a int16) *int16
- func Int16Slice(a []int16) []*int16
- func Int16Value(a *int16) int16
- func Int16ValueSlice(a []*int16) []int16
- func Int32(a int32) *int32
- func Int32Slice(a []int32) []*int32
- func Int32Value(a *int32) int32
- func Int32ValueSlice(a []*int32) []int32
- func Int64(a int64) *int64
- func Int64Slice(a []int64) []*int64
- func Int64Value(a *int64) int64
- func Int64ValueSlice(a []*int64) []int64
- func Int8(a int8) *int8
- func Int8Slice(a []int8) []*int8
- func Int8Value(a *int8) int8
- func Int8ValueSlice(a []*int8) []int8
- func IntSlice(a []int) []*int
- func IntValue(a *int) int
- func IntValueSlice(a []*int) []int
- func PublishProgress(listener ProgressListener, event *ProgressEvent)
- func SetLogChannel(channel string)
- func String(a string) *string
- func StringSlice(a []string) []*string
- func StringSliceValue(a []*string) []string
- func StringValue(a *string) string
- func Uint(a uint) *uint
- func Uint16(a uint16) *uint16
- func Uint16Slice(a []uint16) []*uint16
- func Uint16Value(a *uint16) uint16
- func Uint16ValueSlice(a []*uint16) []uint16
- func Uint32(a uint32) *uint32
- func Uint32Slice(a []uint32) []*uint32
- func Uint32Value(a *uint32) uint32
- func Uint32ValueSlice(a []*uint32) []uint32
- func Uint64(a uint64) *uint64
- func Uint64Slice(a []uint64) []*uint64
- func Uint64Value(a *uint64) uint64
- func Uint64ValueSlice(a []*uint64) []uint64
- func Uint8(a uint8) *uint8
- func Uint8Slice(a []uint8) []*uint8
- func Uint8Value(a *uint8) uint8
- func Uint8ValueSlice(a []*uint8) []uint8
- func UintSlice(a []uint) []*uint
- func UintValue(a *uint) uint
- func UintValueSlice(a []*uint) []uint
- type Logger
- func (logger *Logger) CloseLogger()
- func (logger *Logger) GetFormatTemplate() string
- func (logger *Logger) GetIsopen() bool
- func (logger *Logger) GetLastLogMsg() string
- func (logger *Logger) OpenLogger()
- func (logger *Logger) PrintLog(fieldMap map[string]string, err error)
- func (logger *Logger) SetFormatTemplate(template string)
- func (logger *Logger) SetIsopen(isopen bool)
- func (logger *Logger) SetLastLogMsg(lastLogMsg string)
- type ProgressEvent
- type ProgressEventType
- type ProgressListener
- type ReaderTracker
- type UUID
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssertEqual ¶
func AssertNotNil ¶
func BoolSliceValue ¶
func Float32Slice ¶
func Float32Value ¶
func Float32ValueSlice ¶
func Float64Slice ¶
func Float64Value ¶
func Float64ValueSlice ¶
func InitLogMsg ¶
func Int16Slice ¶
func Int16Value ¶
func Int16ValueSlice ¶
func Int32Slice ¶
func Int32Value ¶
func Int32ValueSlice ¶
func Int64Slice ¶
func Int64Value ¶
func Int64ValueSlice ¶
func Int8ValueSlice ¶
func IntValueSlice ¶
func PublishProgress ¶
func PublishProgress(listener ProgressListener, event *ProgressEvent)
publishProgress
func SetLogChannel ¶
func SetLogChannel(channel string)
func StringSlice ¶
func StringSliceValue ¶
func StringValue ¶
func Uint16Slice ¶
func Uint16Value ¶
func Uint16ValueSlice ¶
func Uint32Slice ¶
func Uint32Value ¶
func Uint32ValueSlice ¶
func Uint64Slice ¶
func Uint64Value ¶
func Uint64ValueSlice ¶
func Uint8Slice ¶
func Uint8Value ¶
func Uint8ValueSlice ¶
func UintValueSlice ¶
Types ¶
type Logger ¶
func (*Logger) CloseLogger ¶
func (logger *Logger) CloseLogger()
func (*Logger) GetFormatTemplate ¶
func (*Logger) GetLastLogMsg ¶
func (*Logger) OpenLogger ¶
func (logger *Logger) OpenLogger()
func (*Logger) SetFormatTemplate ¶
func (*Logger) SetLastLogMsg ¶
type ProgressEvent ¶
type ProgressEvent struct { ConsumedBytes int64 TotalBytes int64 RwBytes int64 EventType ProgressEventType }
ProgressEvent defines progress event
func NewProgressEvent ¶
func NewProgressEvent(eventType ProgressEventType, consumed, total int64, rwBytes int64) *ProgressEvent
type ProgressEventType ¶
type ProgressEventType int
ProgressEventType defines transfer progress event type
const ( // TransferStartedEvent transfer started, set TotalBytes TransferStartedEvent ProgressEventType = 1 + iota // TransferDataEvent transfer data, set ConsumedBytes anmd TotalBytes TransferDataEvent // TransferCompletedEvent transfer completed TransferCompletedEvent // TransferFailedEvent transfer encounters an error TransferFailedEvent )
type ProgressListener ¶
type ProgressListener interface {
ProgressChanged(event *ProgressEvent)
}
ProgressListener listens progress change
func GetProgressListener ¶
func GetProgressListener(obj interface{}) ProgressListener
type ReaderTracker ¶
type ReaderTracker struct {
CompletedBytes int64
}
Source Files ¶
Click to show internal directories.
Click to hide internal directories.