types

package
v0.0.0-...-4cfa141 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2018 License: Apache-2.0 Imports: 0 Imported by: 8

Documentation

Index

Constants

View Source
const (
	JobCreated     = JobStatus("created")
	JobDownloading = JobStatus("downloading")
	JobProcessing  = JobStatus("processing")
	JobUploading   = JobStatus("uploading")
	JobFinished    = JobStatus("finished")
	JobError       = JobStatus("error")
)

These constants are used on the status field of Job type

Variables

This section is empty.

Functions

This section is empty.

Types

type Category

type Category int

Category represents the category of a media file

const (
	// IMAGE represents a image job
	IMAGE Category = iota
	// VIDEO represents a video job
	VIDEO
)

type Job

type Job struct {
	ID               string    `json:"id"`
	Source           string    `json:"source"`
	Destination      string    `json:"destination"`
	Media            MediaType `json:"mediaType"`
	Status           JobStatus `json:"status"`
	Details          string    `json:"details"`
	LocalSource      string    `json:"-"`
	LocalDestination string    `json:"-"`
}

Job is the set of parameters of a given job

type JobInput

type JobInput struct {
	Source      string   `json:"source"`
	Destination string   `json:"destination"`
	Cate        Category `json:"cate"`
}

JobInput stores the information passed from the user when creating a job.

type JobStatus

type JobStatus string

JobStatus represents the status of a job

type MediaType

type MediaType struct {
	Cate      Category `json:"cate"`
	Name      string   `json:"name"`
	Container string   `json:"container"`
}

MediaType defines the type of output file

type ServerConfig

type ServerConfig struct {
	ServerName string `required:"true"`

	System SystemConfig `required:"true"`

	Yolo YoloConfig `required:"true"`
}

ServerConfig contains the system and yolo configuration

type SystemConfig

type SystemConfig struct {
	SwapDir   string `required:"true"`
	Logfile   string `required:"false"`
	Port      string `required:"true"`
	DBDriver  string `required:"true"`
	MongoHost string `required:"false"`
	NGpu      int    `required:"true"`
	Workers   int    `required:"true"`
}

SystemConfig contains the system configuration

type YoloConfig

type YoloConfig struct {
	DataCfg    string  `required:"true"`
	CfgFile    string  `required:"true"`
	WeightFile string  `required:"true"`
	Thresh     float64 `required:"true"`
	HierThresh float64 `required:"true"`
}

YoloConfig contains the yolo configuration

Jump to

Keyboard shortcuts

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