entities

package
v0.0.0-...-2a3f13b Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2019 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StdInFileDescriptor           = 0
	StdOutFileDescriptor          = 1
	StdErrFileDescriptor          = 2
	Merge                TaskType = "MERGE"
	Split                TaskType = "SPLIT"
)

Variables

This section is empty.

Functions

func FromJson

func FromJson(json string, value interface{}) error

func FromXml

func FromXml(xml string, value interface{}) error

func Initialize

func Initialize()

func ToJson

func ToJson(value interface{}) (string, error)

func ToXml

func ToXml(value interface{}) (string, error)

Types

type Media

type Media struct {
	FileHash string
	Path     *url.URL
}

func (Media) GetSubstitutedPath

func (m Media) GetSubstitutedPath(basePath string) string

func (Media) Priority

func (m Media) Priority() int

func (Media) RelativePath

func (m Media) RelativePath() string

func (*Media) UnmarshalJSON

func (m *Media) UnmarshalJSON(j []byte) error

type SliceAddedEvent

type SliceAddedEvent struct {
	JobID   string `json:"job_id"`
	SliceNr int
	Args    []string `xml:"Args>Arg,omitempty"`
	// contains filtered or unexported fields
}

func DeserializeSliceAddedEvent

func DeserializeSliceAddedEvent(d *amqp.Delivery) (*SliceAddedEvent, error)

type SliceCompletedEvent

type SliceCompletedEvent struct {
	JobID      string `json:"job_id"`
	FileHash   string `xml:",omitempty"`
	SliceNr    int
	StdStreams []StdStream `xml:"StdStreams>L,omitempty"`
}

type StdStream

type StdStream struct {
	FD   int    `xml:"fd,attr"`
	Line string `xml:",innerxml"`
}

type TaskAddedEvent

type TaskAddedEvent struct {
	JobID     string `json:"job_id"`
	Media     Media
	SliceSize int      `json:"slice_size"`
	Type      TaskType `json:"type"`
	// contains filtered or unexported fields
}

func DeserializeTaskAddedEvent

func DeserializeTaskAddedEvent(d *amqp.Delivery) (*TaskAddedEvent, error)

type TaskCancelledEvent

type TaskCancelledEvent struct {
	JobID string `json:"job_id"`
	// contains filtered or unexported fields
}

func DeserializeTaskCancelledEvent

func DeserializeTaskCancelledEvent(d *amqp.Delivery) (*TaskCancelledEvent, error)

type TaskCompletedEvent

type TaskCompletedEvent struct {
	JobID  string   `json:"job_id"`
	Amount int      `json:"amount"`
	Type   TaskType `json:"type"`
}

type TaskType

type TaskType string

Jump to

Keyboard shortcuts

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