store

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func UniqueIndex

func UniqueIndex(v ...string) string

Types

type Logger

type Logger struct {
	// contains filtered or unexported fields
}
var Log *Logger

func NewLogger

func NewLogger(path string) (*Logger, error)

func (*Logger) Fatal

func (l *Logger) Fatal(key string, v ...interface{})

func (*Logger) Info

func (l *Logger) Info(key string, v ...interface{})

func (*Logger) Panic

func (l *Logger) Panic(key string, v ...interface{})

type Store

type Store struct {
	*gorm.DB
}

TODO 将 Store 拆分为RPC服务, 解决 cgo 编译不便的问题

func NewStore

func NewStore(filename string) (*Store, error)

func (*Store) All

func (s *Store) All() []models.Task

func (*Store) CountUnload

func (s *Store) CountUnload() (count int64)

func (*Store) GetUnFinished

func (s *Store) GetUnFinished() (tasks []models.Task, err error)

func (*Store) Loaded2Unload

func (s *Store) Loaded2Unload() error

func (*Store) Read

func (s *Store) Read() (task models.Task, err error)

func (*Store) SetLineFinished

func (s *Store) SetLineFinished(taskID int, title, content, remark, failedReason string) error

func (*Store) Write

func (s *Store) Write(task *models.Task) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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