shared

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2026 License: Apache-2.0 Imports: 4 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AssetOutputError added in v1.0.0

type AssetOutputError struct {
	// Machine-readable processing error code.
	Code string `json:"code" api:"required"`
	// Description of the processing failure.
	Message string `json:"message" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Code        respjson.Field
		Message     respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A customer-facing Asset output processing failure.

func (AssetOutputError) RawJSON added in v1.0.0

func (r AssetOutputError) RawJSON() string

Returns the unmodified JSON received from the API

func (*AssetOutputError) UnmarshalJSON added in v1.0.0

func (r *AssetOutputError) UnmarshalJSON(data []byte) error

type ChunkifyError

type ChunkifyError struct {
	// Additional error details or output
	Detail string `json:"detail" api:"required"`
	// Main error message
	Message string `json:"message" api:"required"`
	// Type of error
	//
	// Any of "setup", "ffmpeg", "source", "upload", "download", "ingest", "job",
	// "unexpected", "permission", "timeout", "cancelled".
	Type ChunkifyErrorType `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Detail      respjson.Field
		Message     respjson.Field
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (ChunkifyError) RawJSON

func (r ChunkifyError) RawJSON() string

Returns the unmodified JSON received from the API

func (*ChunkifyError) UnmarshalJSON

func (r *ChunkifyError) UnmarshalJSON(data []byte) error

type ChunkifyErrorType

type ChunkifyErrorType string

Type of error

const (
	ChunkifyErrorTypeSetup      ChunkifyErrorType = "setup"
	ChunkifyErrorTypeFfmpeg     ChunkifyErrorType = "ffmpeg"
	ChunkifyErrorTypeSource     ChunkifyErrorType = "source"
	ChunkifyErrorTypeUpload     ChunkifyErrorType = "upload"
	ChunkifyErrorTypeDownload   ChunkifyErrorType = "download"
	ChunkifyErrorTypeIngest     ChunkifyErrorType = "ingest"
	ChunkifyErrorTypeJob        ChunkifyErrorType = "job"
	ChunkifyErrorTypeUnexpected ChunkifyErrorType = "unexpected"
	ChunkifyErrorTypePermission ChunkifyErrorType = "permission"
	ChunkifyErrorTypeTimeout    ChunkifyErrorType = "timeout"
	ChunkifyErrorTypeCancelled  ChunkifyErrorType = "cancelled"
)

type CreatedVia added in v1.0.0

type CreatedVia string

CreatedVia specifies how the resource was created: api for API requests, dashboard for the Chunkify dashboard, mcp for MCP clients, and workflow for Workflow actions. Omitted when the creator is unknown.

const (
	CreatedViaAPI       CreatedVia = "api"
	CreatedViaDashboard CreatedVia = "dashboard"
	CreatedViaMcp       CreatedVia = "mcp"
	CreatedViaWorkflow  CreatedVia = "workflow"
)

type InstanceType added in v1.0.0

type InstanceType string
const (
	InstanceType4vCPU  InstanceType = "4vCPU"
	InstanceType8vCPU  InstanceType = "8vCPU"
	InstanceType16vCPU InstanceType = "16vCPU"
)

type Log added in v1.0.0

type Log struct {
	// Additional structured data attached to the log
	Attributes map[string]any `json:"attributes" api:"required"`
	// Log level
	//
	// Any of "info", "error", "debug".
	Level LogLevel `json:"level" api:"required"`
	// The log message content
	Msg string `json:"msg" api:"required"`
	// Name of the service that generated the log
	//
	// Any of "transcoder", "manager".
	Service LogService `json:"service" api:"required"`
	// Timestamp when the log was created
	Time time.Time `json:"time" api:"required" format:"date-time"`
	// Optional ID of the job this log is associated with
	JobID string `json:"job_id"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Attributes  respjson.Field
		Level       respjson.Field
		Msg         respjson.Field
		Service     respjson.Field
		Time        respjson.Field
		JobID       respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (Log) RawJSON added in v1.0.0

func (r Log) RawJSON() string

Returns the unmodified JSON received from the API

func (*Log) UnmarshalJSON added in v1.0.0

func (r *Log) UnmarshalJSON(data []byte) error

type LogLevel added in v1.0.0

type LogLevel string

Log level

const (
	LogLevelInfo  LogLevel = "info"
	LogLevelError LogLevel = "error"
	LogLevelDebug LogLevel = "debug"
)

type LogService added in v1.0.0

type LogService string

Name of the service that generated the log

const (
	LogServiceTranscoder LogService = "transcoder"
	LogServiceManager    LogService = "manager"
)

type TranscoderStatus added in v1.0.0

type TranscoderStatus struct {
	// Unique identifier of the transcoder
	ID string `json:"id" api:"required"`
	// Billable time in seconds
	BillableTime int64 `json:"billable_time" api:"required"`
	// End time of the current chunk in seconds
	ChunkEndTime float64 `json:"chunk_end_time" api:"required"`
	// Number of the chunk being processed
	ChunkNumber int64 `json:"chunk_number" api:"required"`
	// Start time of the current chunk in seconds
	ChunkStartTime float64 `json:"chunk_start_time" api:"required"`
	// CPU time used for transcoding in seconds
	CPUTime float64 `json:"cpu_time" api:"required"`
	// Timestamp when the status was created
	CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
	// Current frames per second being processed
	Fps float64 `json:"fps" api:"required"`
	// Current frame number being processed
	Frame int64 `json:"frame" api:"required"`
	// Unique identifier of the job
	JobID string `json:"job_id" api:"required"`
	// Current output time in seconds
	OutTime int64 `json:"out_time" api:"required"`
	// Progress percentage of the transcoding operation (0-100)
	Progress float64 `json:"progress" api:"required"`
	// Current processing speed multiplier
	Speed float64 `json:"speed" api:"required"`
	// Current status of the transcoder (starting, transcoding, finished, failed)
	//
	// Any of "starting", "pending", "transcoding", "completed", "failed", "cancelled".
	Status TranscoderStatusStatus `json:"status" api:"required"`
	// Unique identifier of the transcoder instance (generated by the transcoder)
	TranscoderInstanceID string `json:"transcoder_instance_id" api:"required"`
	// Timestamp when the status was last updated
	UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
	// Error message if the transcoding failed
	Error ChunkifyError `json:"error"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID                   respjson.Field
		BillableTime         respjson.Field
		ChunkEndTime         respjson.Field
		ChunkNumber          respjson.Field
		ChunkStartTime       respjson.Field
		CPUTime              respjson.Field
		CreatedAt            respjson.Field
		Fps                  respjson.Field
		Frame                respjson.Field
		JobID                respjson.Field
		OutTime              respjson.Field
		Progress             respjson.Field
		Speed                respjson.Field
		Status               respjson.Field
		TranscoderInstanceID respjson.Field
		UpdatedAt            respjson.Field
		Error                respjson.Field
		ExtraFields          map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TranscoderStatus) RawJSON added in v1.0.0

func (r TranscoderStatus) RawJSON() string

Returns the unmodified JSON received from the API

func (*TranscoderStatus) UnmarshalJSON added in v1.0.0

func (r *TranscoderStatus) UnmarshalJSON(data []byte) error

type TranscoderStatusStatus added in v1.0.0

type TranscoderStatusStatus string

Current status of the transcoder (starting, transcoding, finished, failed)

const (
	TranscoderStatusStatusStarting    TranscoderStatusStatus = "starting"
	TranscoderStatusStatusPending     TranscoderStatusStatus = "pending"
	TranscoderStatusStatusTranscoding TranscoderStatusStatus = "transcoding"
	TranscoderStatusStatusCompleted   TranscoderStatusStatus = "completed"
	TranscoderStatusStatusFailed      TranscoderStatusStatus = "failed"
	TranscoderStatusStatusCancelled   TranscoderStatusStatus = "cancelled"
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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