brighthub

package module
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2019 License: MIT Imports: 9 Imported by: 0

README

brighthub

brightcove client

Documentation

Index

Constants

View Source
const (
	// ActionCreate :nodoc:
	ActionCreate Action = "CREATE"
	// ActionPublish :nodoc:
	ActionPublish Action = "PUBLISH"

	// AssetEntityType :nodoc:
	AssetEntityType EntityType = "ASSET"
	// DigitalMasterEntityType :nodoc:
	DigitalMasterEntityType EntityType = "DIGITAL_MASTER"
	// DynamicRenditionEntityType :nodoc:
	DynamicRenditionEntityType EntityType = "DYNAMIC_RENDITION"
	// TitleEntityType :nodoc:
	TitleEntityType EntityType = "TITLE"

	// StatusFailed :nodoc:
	StatusFailed Status = "FAILED"
	// StatusSuccess :nodoc:
	StatusSuccess Status = "SUCCESS"
)

Variables

View Source
var (
	// ErrUnauthorized :nodoc:
	ErrUnauthorized = errors.New("unauthorized")
	// ErrIllegalField :nodoc:
	ErrIllegalField = errors.New("spelling error or other use of non-existent field")
	// ErrMethodNotAllowed :nodoc:
	ErrMethodNotAllowed = errors.New("method not allowed")
	// ErrDuplicateReferenceID :nodoc:
	ErrDuplicateReferenceID = errors.New("duplicate reference id")
	// ErrTooManyRequest :nodoc:
	ErrTooManyRequest = errors.New("too many request")
	// ErrDynamicDeliveryNotAllowed :nodoc:
	ErrDynamicDeliveryNotAllowed = errors.New("this account is not enabled for Dynamic Delivery, but a Dynamic Delivery profile was specified")
	// ErrRateLimitExceeded :nodoc:
	ErrRateLimitExceeded = errors.New("dynamic ingest job not created. reduce the number of concurrent jobs for this account before trying again")
	// ErrInternalError :nodoc:
	ErrInternalError = errors.New("internal error, please try again later")
	// ErrBadRequest :nodoc:
	ErrBadRequest = errors.New("unable to parse request body")
	// ErrResourceNotFound :nodoc:
	ErrResourceNotFound = errors.New("the api could not find the resource you requested")
	// ErrNotAvailable :nodoc:
	ErrNotAvailable = errors.New("the resource you are requesting is temporarily unavailable")
	// ErrProfileError :nodoc:
	ErrProfileError = errors.New("profile rendition count exceeds configured rendition limit")
)

Functions

This section is empty.

Types

type Action

type Action string

Action :nodoc:

type Client

type Client interface {
	AddVideoToFolder(videoID, folderID string) error
	CreateVideo(req *CreateVideoRequest) (*CreateVideoResponse, error)
	GetIngestProfile(id string) (*IngestProfile, error)
	IngestVideo(videoID string, req *IngestVideoRequest) (*IngestVideoResponse, error)
	GetVideoMasterInfo(videoID string) (*VideoMasterInfo, error)
}

func New

func New(clientID, clientSecret, accountID string, httpClient *http.Client) (Client, error)

New :nodoc:

type CreateVideoRequest

type CreateVideoRequest struct {
	Name            string   `json:"name"`
	Description     string   `json:"description"`
	LongDescription string   `json:"long_description"`
	ReferenceID     string   `json:"reference_id,omitempty"`
	State           State    `json:"state"`
	Tags            []string `json:"tags,omitempty"`
}

CreateVideoRequest :nodoc:

type CreateVideoResponse

type CreateVideoResponse struct {
	ID        string `json:"id"`
	AccountID string `json:"account_id"`
}

CreateVideoResponse :nodoc:

type DynamicOrigin added in v1.1.0

type DynamicOrigin struct {
	Renditions []string `json:"renditions"`
}

DynamicOrigin :nodoc:

type EntityType

type EntityType string

EntityType :nodoc:

type IngestProfile added in v1.1.0

type IngestProfile struct {
	Name          string        `json:"name"`
	DisplayName   string        `json:"display_name"`
	Description   string        `json:"description"`
	DynamicOrigin DynamicOrigin `json:"dynamic_origin"`
}

IngestProfile :nodoc:

type IngestVideoMaster

type IngestVideoMaster struct {
	URL string `json:"url"`
}

IngestVideoMaster :nodoc:

type IngestVideoRequest

type IngestVideoRequest struct {
	Master        *IngestVideoMaster `json:"master"`
	Priority      Priority           `json:"priority"`
	CaptureImages bool               `json:"capture-images"`
	Callbacks     []string           `json:"callbacks,omitempty"`
	Profile       string             `json:"profile"`
}

IngestVideoRequest :nodoc:

type IngestVideoResponse

type IngestVideoResponse struct {
	ID string `json:"id"`
}

IngestVideoResponse :nodoc:

type Notification

type Notification struct {
	Entity             string     `json:"entity"`
	EntityType         EntityType `json:"entityType"`
	Version            string     `json:"version"`
	Action             Action     `json:"action"`
	JobID              string     `json:"jobId"`
	VideoID            string     `json:"videoId"`
	DynamicRenditionID string     `json:"dynamicRenditionId"`
	Language           string     `json:"language"`
	Variant            string     `json:"variant"`
	AccountID          string     `json:"accountId"`
	Status             Status     `json:"status"`
	ErrorMessage       string     `json:"errorMessage"`
}

Notification :nodoc:

type Priority

type Priority string

Priority ingest priority

const (
	// PriorityLow :nodoc:
	PriorityLow Priority = "low"
	// PriorityNormal :nodoc:
	PriorityNormal Priority = "normal"
)

type State

type State string

State :nodoc:

const (
	// StateActive :nodoc:
	StateActive State = "ACTIVE"
	// StateInactive :nodoc:
	StateInactive State = "INACTIVE"
)

type Status

type Status string

Status :nodoc:

type VideoMasterInfo added in v1.2.0

type VideoMasterInfo struct {
	EncodingRate int64  `json:"encoding_rate"`
	Height       int64  `json:"height"`
	Width        int64  `json:"width"`
	ID           string `json:"id"`
	Size         int64  `json:"size"`
	UpdatedAt    string `json:"updated_at"`
	CreatedAt    string `json:"created_at"`
	Duration     int64  `json:"duration"`
}

VideoMasterInfo :nodoc:

Directories

Path Synopsis
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.

Jump to

Keyboard shortcuts

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