Documentation
¶
Index ¶
- func BatchInsertTaskCaches(db *gorm.DB, sessionID string, tasks []*dag.Task) error
- func CreateSession(db *gorm.DB, s *SessionModel) error
- func DeleteSession(db *gorm.DB, id string) error
- func DeleteTaskCache(db *gorm.DB, sessionID, taskID string) error
- func DeleteTaskCachesBySession(db *gorm.DB, sessionID string) error
- func NewDB(path string) (*gorm.DB, error)
- func NewDBInMemory() (*gorm.DB, error)
- func ReadRoadmap(path string) ([]*dag.Task, error)
- func UpdateSessionAccess(db *gorm.DB, id string, t time.Time) error
- func UpsertTaskCache(db *gorm.DB, sessionID string, task *dag.Task) error
- func WriteRoadmap(path string, tasks []*dag.Task) error
- type SessionModel
- type TaskCache
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BatchInsertTaskCaches ¶
func CreateSession ¶
func CreateSession(db *gorm.DB, s *SessionModel) error
func NewDBInMemory ¶
Types ¶
type SessionModel ¶
type SessionModel struct {
ID string `gorm:"primaryKey"`
Path string `gorm:"not null;uniqueIndex"`
Description string
State string `gorm:"default:Loaded"`
ChunksCount int `gorm:"default:0"`
LastAccess int64
CreatedAt int64
}
func GetSession ¶
func GetSession(db *gorm.DB, id string) (*SessionModel, error)
func ListSessions ¶
func ListSessions(db *gorm.DB) ([]SessionModel, error)
type TaskCache ¶
Click to show internal directories.
Click to hide internal directories.