opendam

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2020 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BlobFactory

func BlobFactory(storageURL string) (*blob.Bucket, error)

func DocStoreFactory

func DocStoreFactory(collectionURL string) (*docstore.Collection, error)

func Logger

func Logger() *logrus.Entry

Types

type Asset

type Asset struct {

	// The unique id of the asset
	AssetID string `json:"asset_id"`

	// The kind of media
	Kind string `json:"kind"`

	Version Version `json:"version"`

	File *File `json:"file,omitempty"`

	// additional assets/files associated with the asset
	Formats []Asset `json:"formats,omitempty"`

	// A list of metadata tags associated with the asset
	Tags []string `json:"tags,omitempty"`

	// Any user supplied metadata for the asset
	Metadata map[string]interface{} `json:"metadata,omitempty"`
}

Asset - An asset is a single managed digital asset

type Assets

type Assets struct {
	Assets []Asset `json:"assets"`
}

type Config

type Config struct {
	Machinery      *config.Config
	WorkingDir     string `envconfig:"WORKING_DIR" default:"/dir"`
	OpenDAMHost    string `envconfig:"OPENDAM_HOST"`
	BlobConnection string `envconfig:"BLOB_CONNECTION"`
}

func LoadConfig

func LoadConfig() (Config, error)

type File

type File struct {

	// the name of the file
	Name string `json:"name"`

	// A URL address to the file content
	Source string `json:"source"`

	// the http Content-Type used with the file
	ContentType string `json:"content_type"`

	// The size of the file in bytes
	Size float32 `json:"size"`

	// The width of the file
	Width float32 `json:"width,omitempty"`

	// The height of the file
	Height float32 `json:"height,omitempty"`

	// The duration of the file in seconds
	Duration float32 `json:"duration,omitempty"`
}

File - The file associated with an asset or format

type Job

type Job struct {

	// The unique id of the job
	JobID string `json:"job_id"`

	// The state of the job
	State string `json:"state"`

	// The asset that this job is processing work for
	AssetID string `json:"asset_id"`
}

Job - The state of a single job

type Version

type Version struct {

	// The version number
	Number int `json:"number"`

	// A point in time represented as milliseconds from the Epoch (UTC)
	Timestamp int64 `json:"timestamp"`

	JobID string `json:"job_id"`
}

Version - version data of an asset

Jump to

Keyboard shortcuts

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