db

package
v0.0.0-...-d0fd547 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2017 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FinishStats

func FinishStats(taskId string, resolution string, bitrate string) error

func FinishStatsWithError

func FinishStatsWithError(taskId string, error string) error

func GetInstance

func GetInstance() (*mgo.Session, *mgo.Database)

func NewTaskStats

func NewTaskStats(taskId string, url string, hash string) error

func UpdateStatus

func UpdateStatus(taskId string, status string) error

Types

type Stats

type Stats struct {
	TaskId     string    `bson:"taskId" json:"taskId"`
	Url        string    `bson:"url" json:"url"`
	Hash       string    `bson:"hash" json:"hash"`
	Finished   bool      `bson:"finished" json:"finished"`
	Status     string    `bson:"status,omitempty" json:"status,omitempty"`
	Success    bool      `bson:"success" json:"success"`
	Resolution string    `bson:"resolution,omitempty" json:"resolution,omitempty"`
	Bitrate    string    `bson:"bitrate,omitempty" json:"bitrate,omitempty"`
	Error      string    `bson:"error,omitempty" json:"error,omitempty"`
	Created    time.Time `bson:"created" json:"created"`
}

func GetAllStats

func GetAllStats() (stats []*Stats)

Jump to

Keyboard shortcuts

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