storage

package
v0.0.0-...-bf0d46e Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2024 License: GPL-3.0 Imports: 5 Imported by: 2

Documentation

Index

Constants

View Source
const StatusAccept = "accept"
View Source
const StatusConfig = "config"
View Source
const StatusDone = "done"
View Source
const StatusFinish = "finish"
View Source
const StatusScan = "scan"

Variables

View Source
var EOF = errors.New("EOF")

Functions

This section is empty.

Types

type Destinationer

type Destinationer[E Entry] interface {
	Accept() error
	Receive([]E)
	Done()
	Finish()
	Close() error
	Summary() []string
	State() []string
}

type MapEntries

type MapEntries = []MapEntry

type MapEntry

type MapEntry = map[string]any

type MapOfStringsEntries

type MapOfStringsEntries = []MapOfStringsEntry

type MapOfStringsEntry

type MapOfStringsEntry = map[string]string

type PageState

type PageState struct {
	Page      int64
	PageSize  int64
	TotalPage int64
	Total     int64
	// contains filtered or unexported fields
}

PageState 分页状态

func NewPageState

func NewPageState() *PageState

func (*PageState) AddAmount

func (s *PageState) AddAmount(n int64)

func (*PageState) Amount

func (s *PageState) Amount() int64

func (*PageState) DurationStart

func (s *PageState) DurationStart()

func (*PageState) DurationStop

func (s *PageState) DurationStop()

func (*PageState) Overview

func (p *PageState) Overview() string

func (*PageState) SetAmount

func (s *PageState) SetAmount(n int64)

func (*PageState) Status

func (s *PageState) Status() string

func (*PageState) StatusAccept

func (s *PageState) StatusAccept()

func (*PageState) StatusConfig

func (s *PageState) StatusConfig()

func (*PageState) StatusCustomize

func (s *PageState) StatusCustomize(status string)

func (*PageState) StatusDone

func (s *PageState) StatusDone()

func (*PageState) StatusFinish

func (s *PageState) StatusFinish()

func (*PageState) StatusScan

func (s *PageState) StatusScan()

type ScoreMap

type ScoreMap = map[any]float64

type SliceEntries

type SliceEntries = []SliceEntry

type SliceEntry

type SliceEntry = []any

type SliceOfStringsEntries

type SliceOfStringsEntries = []SliceOfStringsEntry

type SliceOfStringsEntry

type SliceOfStringsEntry = []string

type Sourceor

type Sourceor[E Entry] interface {
	Scan() error
	ReceiveChan() <-chan []E
	Close() error
	Summary() []string
	State() []string
	Copy([]E) []E
}

type State

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

State 状态

func NewState

func NewState() *State

func (*State) AddAmount

func (s *State) AddAmount(n int64)

func (*State) Amount

func (s *State) Amount() int64

func (*State) DurationStart

func (s *State) DurationStart()

func (*State) DurationStop

func (s *State) DurationStop()

func (*State) Overview

func (s *State) Overview() string

func (*State) SetAmount

func (s *State) SetAmount(n int64)

func (*State) Status

func (s *State) Status() string

func (*State) StatusAccept

func (s *State) StatusAccept()

func (*State) StatusConfig

func (s *State) StatusConfig()

func (*State) StatusCustomize

func (s *State) StatusCustomize(status string)

func (*State) StatusDone

func (s *State) StatusDone()

func (*State) StatusFinish

func (s *State) StatusFinish()

func (*State) StatusScan

func (s *State) StatusScan()

type Stater

type Stater interface {
	GetStatus() string
	Overview() string
}

type Storage

type Storage struct {
}

func (*Storage) LogFatal

func (s *Storage) LogFatal(v ...any)

func (*Storage) LogFatalWithTitle

func (s *Storage) LogFatalWithTitle(v ...any)

func (*Storage) Title

func (s *Storage) Title() string

type TotalState

type TotalState struct {
	Total int64
	// contains filtered or unexported fields
}

TotalState 总数状态

func NewTotalState

func NewTotalState() *TotalState

func (*TotalState) AddAmount

func (s *TotalState) AddAmount(n int64)

func (*TotalState) Amount

func (s *TotalState) Amount() int64

func (*TotalState) DurationStart

func (s *TotalState) DurationStart()

func (*TotalState) DurationStop

func (s *TotalState) DurationStop()

func (*TotalState) Overview

func (t *TotalState) Overview() string

func (*TotalState) SetAmount

func (s *TotalState) SetAmount(n int64)

func (*TotalState) Status

func (s *TotalState) Status() string

func (*TotalState) StatusAccept

func (s *TotalState) StatusAccept()

func (*TotalState) StatusConfig

func (s *TotalState) StatusConfig()

func (*TotalState) StatusCustomize

func (s *TotalState) StatusCustomize(status string)

func (*TotalState) StatusDone

func (s *TotalState) StatusDone()

func (*TotalState) StatusFinish

func (s *TotalState) StatusFinish()

func (*TotalState) StatusScan

func (s *TotalState) StatusScan()

Directories

Path Synopsis
mock

Jump to

Keyboard shortcuts

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