api

package
v1.5.3 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2021 License: MIT Imports: 29 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DEFAULT_PAGE_SIZE = 50
	MAX_PAGE_SIZE     = 1000

	SEARCH_IN_FILES         = 1
	SEARCH_IN_CONTENT_UNITS = 2
	SEARCH_IN_COLLECTIONS   = 3
)
View Source
const AUTHORS_SOURCES_SQL = `` /* 514-byte string literal not displayed */
View Source
const FILES_TREE_WITH_OPERATIONS = `` /* 751-byte string literal not displayed */
View Source
const FILE_ANCESTORS_SQL = `` /* 181-byte string literal not displayed */
View Source
const FILE_DESCENDANTS_SQL = `` /* 181-byte string literal not displayed */
View Source
const SOURCE_HIERARCHY_SQL = `` /* 1182-byte string literal not displayed */

args: 0,1,3,4 language 2 roots clause, "parent_id is NULL", "id = 8392", etc... 5 depth (int)

View Source
const SOURCE_PATH_SQL = `` /* 169-byte string literal not displayed */
View Source
const TAG_HIERARCHY_SQL = `` /* 684-byte string literal not displayed */

args: 0,2 language 1 roots clause, "parent_id is NULL", "id = 8392", etc... 3 depth (int)

View Source
const TAG_PATH_SQL = `` /* 163-byte string literal not displayed */
View Source
const UPCHAIN_OPERATION_SQL = `` /* 592-byte string literal not displayed */

Variables

View Source
var CDescribers = map[string]CollectionDescriber{}
View Source
var I18n map[string]map[string]string
View Source
var TAGS_WITH_CONST_NAMES = [...]string{"lfq8P1du", "iWPWpSNy"}

Functions

func AuthorsHandler

func AuthorsHandler(c *gin.Context)

func CaptureStartHandler

func CaptureStartHandler(c *gin.Context)

Start capture of AV file, i.e. morning lesson, tv program, etc...

func CaptureStopHandler

func CaptureStopHandler(c *gin.Context)

Stop capture of AV file, ending a matching capture_start event. This is the first time a physical file is created in the studio.

func CollectionActivateHandler

func CollectionActivateHandler(c *gin.Context)

Toggle the active flag of a single container

func CollectionContentUnitsHandler

func CollectionContentUnitsHandler(c *gin.Context)

func CollectionContentUnitsPositionHandler added in v1.5.1

func CollectionContentUnitsPositionHandler(c *gin.Context)

func CollectionHandler

func CollectionHandler(c *gin.Context)

func CollectionI18nHandler

func CollectionI18nHandler(c *gin.Context)

func CollectionsListHandler

func CollectionsListHandler(c *gin.Context)

func ContentUnitCollectionsHandler

func ContentUnitCollectionsHandler(c *gin.Context)

func ContentUnitDerivativesHandler

func ContentUnitDerivativesHandler(c *gin.Context)

func ContentUnitFilesHandler

func ContentUnitFilesHandler(c *gin.Context)

func ContentUnitHandler

func ContentUnitHandler(c *gin.Context)

func ContentUnitI18nHandler

func ContentUnitI18nHandler(c *gin.Context)

func ContentUnitMergeHandler added in v1.0.0

func ContentUnitMergeHandler(c *gin.Context)

func ContentUnitOriginsHandler

func ContentUnitOriginsHandler(c *gin.Context)

func ContentUnitPersonsHandler

func ContentUnitPersonsHandler(c *gin.Context)

func ContentUnitPublishersHandler added in v0.9.2

func ContentUnitPublishersHandler(c *gin.Context)

func ContentUnitSourcesHandler

func ContentUnitSourcesHandler(c *gin.Context)

func ContentUnitTagsHandler

func ContentUnitTagsHandler(c *gin.Context)

func ContentUnitsListHandler

func ContentUnitsListHandler(c *gin.Context)

func ConvertHandler

func ConvertHandler(c *gin.Context)

Files converted to low resolution web formats, language splitting, etc...

func CreateCollection

func CreateCollection(exec boil.Executor, contentType string, properties map[string]interface{}) (*models.Collection, error)

func CreateContentUnit

func CreateContentUnit(exec boil.Executor, contentType string, properties map[string]interface{}) (*models.ContentUnit, error)

func CreateFile

func CreateFile(exec boil.Executor, parent *models.File, f File, properties map[string]interface{}) (*models.File, error)

func CreateOperation

func CreateOperation(exec boil.Executor, name string, o Operation, properties map[string]interface{}) (*models.Operation, error)

func DeleteContentUnit added in v1.0.0

func DeleteContentUnit(exec boil.Executor, unit *models.ContentUnit) error

func DemuxHandler

func DemuxHandler(c *gin.Context)

Demux manifest file to original and low resolution proxy

func DescendantUnitsHandler added in v1.0.1

func DescendantUnitsHandler(c *gin.Context)

This endpoint is used in the trim admin workflow We need this for the "fix" / "update" content unit flow. When a trim from capture is made to fix some unit on capture files with multiple descendant units.

func DescribeCollection

func DescribeCollection(exec boil.Executor, c *models.Collection) error

func DescribeContentUnit

func DescribeContentUnit(exec boil.Executor, cu *models.ContentUnit, metadata CITMetadata) error

func FileHandler

func FileHandler(c *gin.Context)

func FileStoragesHandler

func FileStoragesHandler(c *gin.Context)

func FilesListHandler

func FilesListHandler(c *gin.Context)

func FilesWithOperationsTreeHandler

func FilesWithOperationsTreeHandler(c *gin.Context)

func FindAuthorBySourceID

func FindAuthorBySourceID(exec boil.Executor, id int64) (*models.Author, error)

func FindCollectionByCaptureID

func FindCollectionByCaptureID(exec boil.Executor, cid interface{}) (*models.Collection, error)

func FindCollectionByUID added in v1.4.1

func FindCollectionByUID(exec boil.Executor, uid string) (*models.Collection, error)

func FindFileAncestors

func FindFileAncestors(exec boil.Executor, id int64) ([]*models.File, error)

func FindFileBySHA1

func FindFileBySHA1(exec boil.Executor, sha1 string) (*models.File, []byte, error)

func FindFileDescendants added in v1.5.1

func FindFileDescendants(exec boil.Executor, id int64) ([]*models.File, error)

func FindOperationsByWorkflowID added in v1.5.1

func FindOperationsByWorkflowID(exec boil.Executor, workflowID interface{}, opType string) ([]*models.Operation, error)

func FindSourceByUID

func FindSourceByUID(exec boil.Executor, uid string) (*models.Source, error)

func FindSourcePath

func FindSourcePath(exec boil.Executor, id int64) ([]*models.Source, error)

func FindTagByUID

func FindTagByUID(exec boil.Executor, uid string) (*models.Tag, error)

func FindTagPath

func FindTagPath(exec boil.Executor, id int64) ([]*models.Tag, error)

func FindUpChainOperation

func FindUpChainOperation(exec boil.Executor, fileID int64, opType string) (*models.Operation, error)

func GetFreeUID

func GetFreeUID(exec boil.Executor, checker UIDChecker) (uid string, err error)

func GetI18ns

func GetI18ns(key string) (map[string]string, error)

func GetNextPositionInCollection

func GetNextPositionInCollection(exec boil.Executor, id int64) (position int, err error)

func HealthCheckHandler added in v1.0.3

func HealthCheckHandler(c *gin.Context)

func InsertHandler

func InsertHandler(c *gin.Context)

Insert new file to archive

func JoinHandler added in v1.3.5

func JoinHandler(c *gin.Context)

Join multiple files sequentially

func OperationFilesHandler

func OperationFilesHandler(c *gin.Context)

func OperationItemHandler

func OperationItemHandler(c *gin.Context)

func OperationsListHandler

func OperationsListHandler(c *gin.Context)

func PersonHandler

func PersonHandler(c *gin.Context)

func PersonI18nHandler

func PersonI18nHandler(c *gin.Context)

func PersonsListHandler

func PersonsListHandler(c *gin.Context)

func PingDB added in v1.2.3

func PingDB(ctx context.Context, db *sql.DB) error

func ProcessCITMetadata

func ProcessCITMetadata(exec boil.Executor, metadata CITMetadata, original, proxy *models.File) ([]events.Event, error)

func ProcessCITMetadataUpdate added in v1.0.1

func ProcessCITMetadataUpdate(exec boil.Executor, metadata CITMetadata, original, proxy *models.File) ([]events.Event, error)
send-fix

Sometimes, after a unit was created in a send operation, we need to fix it.

Either the metadata that was given is wrong or we might need a different trim. For such cases a new button in the trim admin "fix" is made.

The workflow simply shows the same CIT screen and unit selection. We should:

1. re-process the metadata in "update" mode 2. figure out files for removal 3. mark those as removed 4. update the unit's published status

func PublisherHandler added in v0.9.2

func PublisherHandler(c *gin.Context)

func PublisherI18nHandler added in v0.9.2

func PublisherI18nHandler(c *gin.Context)

func PublishersHandler

func PublishersHandler(c *gin.Context)

func SendHandler

func SendHandler(c *gin.Context)

Final files sent from studio

func SetupRoutes

func SetupRoutes(router *gin.Engine)

func SirtutimHandler

func SirtutimHandler(c *gin.Context)

Sirtutim archive file generated

func SourceHandler

func SourceHandler(c *gin.Context)

func SourceI18nHandler

func SourceI18nHandler(c *gin.Context)

func SourcesHandler

func SourcesHandler(c *gin.Context)

func SourcesHierarchyHandler

func SourcesHierarchyHandler(c *gin.Context)

func StoragesHandler

func StoragesHandler(c *gin.Context)

func T

func T(key, language string) (string, error)

func TagHandler

func TagHandler(c *gin.Context)

func TagI18nHandler

func TagI18nHandler(c *gin.Context)

func TagsHandler

func TagsHandler(c *gin.Context)

func TagsHierarchyHandler

func TagsHierarchyHandler(c *gin.Context)

func TranscodeHandler

func TranscodeHandler(c *gin.Context)

A file in archive has been transcoded

func TrimHandler

func TrimHandler(c *gin.Context)

Trim demuxed files at certain points

func UpdateCollectionProperties

func UpdateCollectionProperties(exec boil.Executor, collection *models.Collection, props map[string]interface{}) error

func UpdateContentUnitProperties

func UpdateContentUnitProperties(exec boil.Executor, unit *models.ContentUnit, props map[string]interface{}) error

func UpdateFile

func UpdateFile(exec boil.Executor, obj *models.File, parent *models.File, f File, properties map[string]interface{}) error

func UpdateFileProperties

func UpdateFileProperties(exec boil.Executor, file *models.File, props map[string]interface{}) error

func UploadHandler

func UploadHandler(c *gin.Context)

File uploaded to a public accessible URL

Types

type AVFile

type AVFile struct {
	File
	Duration  float64 `json:"duration"`
	VideoSize string  `json:"video_size"`
}

type Author

type Author struct {
	models.Author
	I18n    map[string]*models.AuthorI18n `json:"i18n"`
	Sources []*Source                     `json:"sources"`
}

type AuthorH

type AuthorH struct {
	Code     string      `json:"code"`
	Name     string      `json:"name"`
	FullName null.String `json:"full_name,omitempty"`
	Children []*SourceH  `json:"children,omitempty"`
}

type AuthorsResponse

type AuthorsResponse struct {
	ListResponse
	Authors []*Author `json:"data"`
}

type BlogPostDescriber added in v1.3.9

type BlogPostDescriber struct{}

func (BlogPostDescriber) DescribeContentUnit added in v1.3.9

func (d BlogPostDescriber) DescribeContentUnit(exec boil.Executor,
	cu *models.ContentUnit,
	metadata CITMetadata) ([]*models.ContentUnitI18n, error)

type CITMetadata

type CITMetadata struct {
	ContentType    string            `json:"content_type" binding:"required"`
	CaptureDate    Date              `json:"capture_date" binding:"required"`
	FinalName      string            `json:"final_name" binding:"required,max=255"`
	Language       string            `json:"language" binding:"required,min=2,max=3"`
	Lecturer       string            `json:"lecturer" binding:"required"`
	AutoName       string            `json:"auto_name"`
	ManualName     string            `json:"manual_name"`
	WeekDate       *Date             `json:"week_date"`
	Number         null.Int          `json:"number"`
	Part           null.Int          `json:"part"`
	Sources        []string          `json:"sources" binding:"omitempty,dive,len=8"`
	Tags           []string          `json:"tags" binding:"omitempty,dive,len=8"`
	ArtifactType   null.String       `json:"artifact_type"`
	HasTranslation bool              `json:"has_translation"`
	RequireTest    bool              `json:"require_test"`
	CollectionUID  null.String       `json:"collection_uid" binding:"omitempty,len=8"`
	Episode        null.String       `json:"episode"`
	PartType       null.Int          `json:"part_type"`
	Major          *CITMetadataMajor `json:"major" binding:"omitempty"`
	LabelID        null.Int          `json:"label_id"`
	FilmDate       *Date             `json:"film_date"`
	UnitToFixUID   null.String       `json:"fix_unit_uid" binding:"omitempty,len=8"`
}

type CITMetadataMajor

type CITMetadataMajor struct {
	Type string `json:"type" binding:"omitempty,eq=source|eq=tag"`
	Idx  int    `json:"idx" binding:"omitempty,gte=0"`
}

type CaptureStartRequest

type CaptureStartRequest struct {
	Operation
	FileName      string `json:"file_name" binding:"max=255"`
	CaptureSource string `json:"capture_source"`
	CollectionUID string `json:"collection_uid"`
}

type CaptureStopRequest

type CaptureStopRequest struct {
	Operation
	File
	CaptureSource string   `json:"capture_source"`
	CollectionUID string   `json:"collection_uid"`
	Part          string   `json:"part"`
	LabelID       null.Int `json:"label_id"`
}

type Collection

type Collection struct {
	models.Collection
	I18n map[string]*models.CollectionI18n `json:"i18n"`
}

type CollectionContentUnit

type CollectionContentUnit struct {
	Collection  *Collection  `json:"collection,omitempty"`
	ContentUnit *ContentUnit `json:"content_unit,omitempty"`
	Name        string       `json:"name"`
	Position    int          `json:"position"`
}

type CollectionDescriber

type CollectionDescriber interface {
	DescribeCollection(*models.Collection) ([]*models.CollectionI18n, error)
}

type CollectionNotFound

type CollectionNotFound struct {
	CaptureID interface{}
}

func (CollectionNotFound) Error

func (x CollectionNotFound) Error() string

type CollectionUIDChecker

type CollectionUIDChecker struct{}

func (*CollectionUIDChecker) Check

func (c *CollectionUIDChecker) Check(exec boil.Executor, uid string) (exists bool, err error)

type CollectionsResponse

type CollectionsResponse struct {
	ListResponse
	Collections []*Collection `json:"data"`
}

func NewCollectionsResponse

func NewCollectionsResponse() *CollectionsResponse

type ContentTypesFilter

type ContentTypesFilter struct {
	ContentTypes []string `json:"content_types" form:"content_type" binding:"omitempty"`
}

type ContentUnit

type ContentUnit struct {
	models.ContentUnit
	I18n map[string]*models.ContentUnitI18n `json:"i18n"`
}

type ContentUnitDerivation

type ContentUnitDerivation struct {
	Source  *ContentUnit `json:"source,omitempty"`
	Derived *ContentUnit `json:"derived,omitempty"`
	Name    string       `json:"name"`
}

type ContentUnitDescriber

type ContentUnitDescriber interface {
	DescribeContentUnit(boil.Executor, *models.ContentUnit, CITMetadata) ([]*models.ContentUnitI18n, error)
}

func GetCUDescriber

func GetCUDescriber(exec boil.Executor, cu *models.ContentUnit, metadata CITMetadata) (ContentUnitDescriber, error)

type ContentUnitPerson

type ContentUnitPerson struct {
	ContentUnit *ContentUnit `json:"content_unit,omitempty"`
	Person      *Person      `json:"person,omitempty"`
	RoleID      int64        `json:"role_id,omitempty"`
}

type ContentUnitUIDChecker

type ContentUnitUIDChecker struct{}

func (*ContentUnitUIDChecker) Check

func (c *ContentUnitUIDChecker) Check(exec boil.Executor, uid string) (exists bool, err error)

type ContentUnitsResponse

type ContentUnitsResponse struct {
	ListResponse
	ContentUnits []*ContentUnit `json:"data"`
}

func NewContentUnitsResponse

func NewContentUnitsResponse() *ContentUnitsResponse

type ConvertRequest

type ConvertRequest struct {
	Operation
	Sha1   string   `json:"sha1" binding:"required,len=40,hexadecimal"`
	Output []AVFile `json:"output"`
}

type CreateSourceRequest

type CreateSourceRequest struct {
	Source
	AuthorID null.Int64 `json:"author"`
}

type Date

type Date struct {
	time.Time
}

A time.Time like structure with date part only JSON marshalling

func (Date) MarshalJSON

func (d Date) MarshalJSON() ([]byte, error)

func (*Date) UnmarshalJSON

func (d *Date) UnmarshalJSON(b []byte) error

type DateRangeFilter

type DateRangeFilter struct {
	StartDate string `json:"start_date" form:"start_date" binding:"omitempty"`
	EndDate   string `json:"end_date" form:"end_date" binding:"omitempty"`
}

func (*DateRangeFilter) Range

func (drf *DateRangeFilter) Range() (time.Time, time.Time, error)

type DemuxRequest

type DemuxRequest struct {
	Operation
	Sha1          string  `json:"sha1" binding:"required,len=40,hexadecimal"`
	Original      AVFile  `json:"original"`
	Proxy         *AVFile `json:"proxy"`
	CaptureSource string  `json:"capture_source"`
}

type EventPartDescriber

type EventPartDescriber struct{}

func (EventPartDescriber) DescribeContentUnit

func (d EventPartDescriber) DescribeContentUnit(exec boil.Executor,
	cu *models.ContentUnit,
	metadata CITMetadata) ([]*models.ContentUnitI18n, error)

type File

type File struct {
	FileName  string     `json:"file_name" binding:"required,max=255"`
	Sha1      string     `json:"sha1" binding:"required,len=40,hexadecimal"`
	Size      int64      `json:"size" binding:"required"`
	CreatedAt *Timestamp `json:"created_at" binding:"required"`
	Type      string     `json:"type" binding:"max=16"`
	SubType   string     `json:"sub_type" binding:"max=16"`
	MimeType  string     `json:"mime_type" binding:"max=255"`
	Language  string     `json:"language" binding:"omitempty,min=2,max=3"`
}

type FileNotFound

type FileNotFound struct {
	Sha1 string
}

func (FileNotFound) Error

func (x FileNotFound) Error() string

type FileUIDChecker

type FileUIDChecker struct{}

func (*FileUIDChecker) Check

func (c *FileUIDChecker) Check(exec boil.Executor, uid string) (exists bool, err error)

type FilesResponse

type FilesResponse struct {
	ListResponse
	Files []*MFile `json:"data"`
}

func NewFilesResponse

func NewFilesResponse() *FilesResponse

type FixedKeyDescriber added in v0.9.7

type FixedKeyDescriber struct {
	Key string
}

func (FixedKeyDescriber) DescribeContentUnit added in v0.9.7

func (d FixedKeyDescriber) DescribeContentUnit(exec boil.Executor,
	cu *models.ContentUnit,
	metadata CITMetadata) ([]*models.ContentUnitI18n, error)

type GenericDescriber

type GenericDescriber struct{}

func (GenericDescriber) DescribeCollection

func (d GenericDescriber) DescribeCollection(c *models.Collection) ([]*models.CollectionI18n, error)

func (GenericDescriber) DescribeContentUnit

func (d GenericDescriber) DescribeContentUnit(exec boil.Executor,
	cu *models.ContentUnit,
	metadata CITMetadata) ([]*models.ContentUnitI18n, error)

type HierarchyRequest

type HierarchyRequest struct {
	Language string `json:"language" form:"language" binding:"omitempty,len=2"`
	RootUID  string `json:"root" form:"root" binding:"omitempty,len=8"`
	Depth    int    `json:"depth" form:"depth"`
}

type HttpError

type HttpError struct {
	Code int
	Err  error
	Type gin.ErrorType
}

func NewBadRequestError

func NewBadRequestError(err error) *HttpError

func NewForbiddenError added in v0.9.5

func NewForbiddenError() *HttpError

func NewHttpError

func NewHttpError(code int, err error, t gin.ErrorType) *HttpError

func NewInternalError

func NewInternalError(err error) *HttpError

func NewNotFoundError

func NewNotFoundError() *HttpError

func (HttpError) Abort

func (e HttpError) Abort(c *gin.Context)

func (HttpError) Error

func (e HttpError) Error() string

type IDsFilter

type IDsFilter struct {
	IDs []int64 `json:"ids" form:"id" binding:"omitempty"`
}

type InsertRequest

type InsertRequest struct {
	Operation
	AVFile
	InsertType     string       `json:"insert_type" binding:"required"`
	Mode           string       `json:"mode" binding:"required"`
	ContentUnitUID string       `json:"content_unit_uid" binding:"omitempty,len=8"`
	ParentSha1     string       `json:"parent_sha1" binding:"omitempty,len=40,hexadecimal"`
	OldSha1        string       `json:"old_sha1" binding:"omitempty,len=40,hexadecimal"`
	PublisherUID   string       `json:"publisher_uid" binding:"omitempty,len=8"`
	Metadata       *CITMetadata `json:"metadata" binding:"omitempty"`
}

type JoinRequest added in v1.3.5

type JoinRequest struct {
	Operation
	OriginalShas []string `json:"original_shas" binding:"required,dive,len=40,hexadecimal"`
	ProxyShas    []string `json:"proxy_shas" binding:"omitempty,dive,len=40,hexadecimal"`
	Original     AVFile   `json:"original"`
	Proxy        *AVFile  `json:"proxy"`
}

type LessonPartDescriber

type LessonPartDescriber struct{}

func (LessonPartDescriber) DescribeContentUnit

func (d LessonPartDescriber) DescribeContentUnit(exec boil.Executor,
	cu *models.ContentUnit,
	metadata CITMetadata) ([]*models.ContentUnitI18n, error)

type LettersNamer

type LettersNamer struct {
	PrefaceNamer
}

func (LettersNamer) GetName

func (n LettersNamer) GetName(author *models.Author, path []*models.Source) (map[string]string, error)

<author>. <leaf node in path - cleaned of (...) suffixes>

type ListRequest

type ListRequest struct {
	PageNumber int    `json:"page_no" form:"page_no" binding:"omitempty,min=1"`
	PageSize   int    `json:"page_size" form:"page_size" binding:"omitempty,min=1"`
	StartIndex int    `json:"start_index" form:"start_index" binding:"omitempty,min=1"`
	StopIndex  int    `json:"stop_index" form:"stop_index" binding:"omitempty,min=1"`
	OrderBy    string `json:"order_by" form:"order_by" binding:"omitempty"`
}

type ListResponse

type ListResponse struct {
	Total int64 `json:"total"`
}

type MFile

type MFile struct {
	models.File
	Sha1Str      string           `json:"sha1"`
	OperationIds types.Int64Array `json:"operations"`
}

Marshalable File

func FindFileTreeWithOperations

func FindFileTreeWithOperations(exec boil.Executor, fileID int64) ([]*MFile, error)

func NewMFile

func NewMFile(f *models.File) *MFile

type MaybeFile

type MaybeFile struct {
	FileName  string     `json:"file_name" binding:"omitempty,max=255"`
	Sha1      string     `json:"sha1" binding:"omitempty,len=40,hexadecimal"`
	Size      int64      `json:"size" binding:"omitempty"`
	CreatedAt *Timestamp `json:"created_at" binding:"omitempty"`
	Type      string     `json:"type" binding:"max=16"`
	SubType   string     `json:"sub_type" binding:"max=16"`
	MimeType  string     `json:"mime_type" binding:"max=255"`
	Language  string     `json:"language" binding:"omitempty,min=2,max=3"`
}

MaybeFile same as File but all fields are optional

func (MaybeFile) AsFile

func (mf MaybeFile) AsFile() File

type MissingI18n

type MissingI18n struct {
	Key      string
	Language string
}

func (MissingI18n) Error

func (e MissingI18n) Error() string

type OpHandlerFunc added in v1.3.8

type OpHandlerFunc func(boil.Executor, interface{}) (*models.Operation, []events.Event, error)

type OpResponseRenderFunc added in v1.3.8

type OpResponseRenderFunc func(*gin.Context, boil.Executor, interface{}, *models.Operation) error

type Operation

type Operation struct {
	Station    string `json:"station" binding:"required"`
	User       string `json:"user" binding:"required,email"`
	WorkflowID string `json:"workflow_id"`
}

type OperationTypesFilter

type OperationTypesFilter struct {
	OperationTypes []string `json:"operation_types" form:"operation_type" binding:"omitempty"`
}

type OperationUIDChecker

type OperationUIDChecker struct{}

func (*OperationUIDChecker) Check

func (c *OperationUIDChecker) Check(exec boil.Executor, uid string) (exists bool, err error)

type OperationsRequest

type OperationsRequest struct {
	ListRequest
	DateRangeFilter
	OperationTypesFilter
}

type OperationsResponse

type OperationsResponse struct {
	ListResponse
	Operations []*models.Operation `json:"data"`
}

func NewOperationsResponse

func NewOperationsResponse() *OperationsResponse

type PartialCollection

type PartialCollection struct {
	models.Collection
	Secure null.Int16 `json:"secure"`
}

type PartialContentUnit

type PartialContentUnit struct {
	models.ContentUnit
	Secure null.Int16 `json:"secure"`
}

type PartialFile

type PartialFile struct {
	models.File
	Type    null.String `json:"type,omitempty"`
	SubType null.String `json:"sub_type,omitempty"`
	Secure  null.Int16  `json:"secure"`
}

type PatternsFilter

type PatternsFilter struct {
	Patterns []string `json:"patterns" form:"pattern" binding:"omitempty"`
}

type Person

type Person struct {
	models.Person
	I18n map[string]*models.PersonI18n `json:"i18n"`
}

type PersonUIDChecker

type PersonUIDChecker struct{}

func (*PersonUIDChecker) Check

func (c *PersonUIDChecker) Check(exec boil.Executor, uid string) (exists bool, err error)

type PersonsRequest

type PersonsRequest struct {
	ListRequest
	IDsFilter
	UIDsFilter
	PatternsFilter
}

type PersonsResponse

type PersonsResponse struct {
	ListResponse
	Persons []*Person `json:"data"`
}

func NewPersonsResponse

func NewPersonsResponse() *PersonsResponse

type PlainNamer

type PlainNamer struct{}

func (PlainNamer) GetName

func (n PlainNamer) GetName(author *models.Author, path []*models.Source) (map[string]string, error)

<author>, <path...>

type PrefaceNamer

type PrefaceNamer struct{}

func (PrefaceNamer) GetName

func (n PrefaceNamer) GetName(author *models.Author, path []*models.Source) (map[string]string, error)

<author>. <leaf node in path>

type PublishedChangeImpact added in v1.0.0

type PublishedChangeImpact struct {
	ChangedContentUnit *models.ContentUnit
	ChangedCollections []*models.Collection
}

func FileAddedUnitImpact added in v1.0.0

func FileAddedUnitImpact(exec boil.Executor, fileIsPublished bool, cuID int64) (*PublishedChangeImpact, error)

func FileLeftUnitImpact added in v1.0.0

func FileLeftUnitImpact(exec boil.Executor, fileIsPublished bool, cuID int64) (*PublishedChangeImpact, error)

func PublishFile

func PublishFile(exec boil.Executor, file *models.File) (*PublishedChangeImpact, error)

func RemoveFile

func RemoveFile(exec boil.Executor, file *models.File) (*PublishedChangeImpact, error)

func (*PublishedChangeImpact) Events added in v1.0.0

func (p *PublishedChangeImpact) Events() []events.Event

type PublishedFilter

type PublishedFilter struct {
	Published string `json:"published" form:"published" binding:"omitempty"`
}

type Publisher

type Publisher struct {
	models.Publisher
	I18n map[string]*models.PublisherI18n `json:"i18n"`
}

type PublisherUIDChecker

type PublisherUIDChecker struct{}

func (*PublisherUIDChecker) Check

func (c *PublisherUIDChecker) Check(exec boil.Executor, uid string) (exists bool, err error)

type PublishersRequest

type PublishersRequest struct {
	ListRequest
	IDsFilter
	UIDsFilter
	PatternsFilter
}

type PublishersResponse

type PublishersResponse struct {
	ListResponse
	Publishers []*Publisher `json:"data"`
}

func NewPublishersResponse

func NewPublishersResponse() *PublishersResponse

type RBArticlesNamer

type RBArticlesNamer struct{}

func (RBArticlesNamer) GetName

func (n RBArticlesNamer) GetName(author *models.Author, path []*models.Source) (map[string]string, error)

<author>. <leaf.name>. <number (year)>

type RBRecordsNamer

type RBRecordsNamer struct{}

func (RBRecordsNamer) GetName

func (n RBRecordsNamer) GetName(author *models.Author, path []*models.Source) (map[string]string, error)

<author>. Record <position>. <leaf node in path>

type Rename

type Rename struct {
	Sha1     string `json:"sha1" binding:"required,len=40,hexadecimal"`
	FileName string `json:"file_name" binding:"required,max=255"`
}

type SHA1sFilter

type SHA1sFilter struct {
	SHA1s []string `json:"sha1s" form:"sha1" binding:"omitempty"`
}

type SearchTermFilter

type SearchTermFilter struct {
	Query string `json:"query" form:"query" binding:"omitempty"`
}

type SecureFilter

type SecureFilter struct {
	Levels []int16 `json:"security_levels" form:"secure" binding:"omitempty"`
}

type SendRequest

type SendRequest struct {
	Operation
	Original Rename      `json:"original"`
	Proxy    *Rename     `json:"proxy"`
	Metadata CITMetadata `json:"metadata"`
	Mode     null.String `json:"mode"`
}

type ShamatiNamer

type ShamatiNamer struct{}

func (ShamatiNamer) GetName

func (n ShamatiNamer) GetName(author *models.Author, path []*models.Source) (map[string]string, error)

<author>. path[0].name, <path[1]'s number (heb gimatria)>. path[1].name

type SirtutimRequest

type SirtutimRequest struct {
	Operation
	File
	OriginalSha1 string `json:"original_sha1" binding:"omitempty,len=40,hexadecimal"`
}

type Source

type Source struct {
	models.Source
	I18n map[string]*models.SourceI18n `json:"i18n"`
}

type SourceH

type SourceH struct {
	ID          int64       `json:"id"`
	UID         string      `json:"uid"`
	ParentID    null.Int64  `json:"parent_id"`
	Type        string      `json:"type"`
	Position    null.Int    `json:"position"`
	Pattern     null.String `json:"pattern,omitempty"`
	Name        null.String `json:"name"`
	Description null.String `json:"description,omitempty"`
	Children    []*SourceH  `json:"children,omitempty"`
}

type SourceUIDChecker

type SourceUIDChecker struct{}

func (*SourceUIDChecker) Check

func (c *SourceUIDChecker) Check(exec boil.Executor, uid string) (exists bool, err error)

type SourcesFilter

type SourcesFilter struct {
	Authors []string `json:"authors" form:"author" binding:"omitempty"`
	Sources []int64  `json:"sources" form:"source" binding:"omitempty"`
}

type SourcesHierarchyRequest

type SourcesHierarchyRequest struct {
	HierarchyRequest
}

type SourcesRequest

type SourcesRequest struct {
	ListRequest
}

type SourcesResponse

type SourcesResponse struct {
	ListResponse
	Sources []*Source `json:"data"`
}

func NewSourcesResponse

func NewSourcesResponse() *SourcesResponse

type Storage

type Storage struct {
	models.Storage
}

type StoragesRequest

type StoragesRequest struct {
	ListRequest
}

type StoragesResponse

type StoragesResponse struct {
	ListResponse
	Storages []*models.Storage `json:"data"`
}

func NewStoragesResponse

func NewStoragesResponse() *StoragesResponse

type Tag

type Tag struct {
	models.Tag
	I18n map[string]*models.TagI18n `json:"i18n"`
}

type TagH

type TagH struct {
	ID       int64       `json:"id"`
	UID      string      `json:"uid"`
	ParentID null.Int64  `json:"parent_id"`
	Pattern  null.String `json:"pattern,omitempty"`
	Label    null.String `json:"label"`
	Children []*TagH     `json:"children,omitempty"`
}

type TagUIDChecker

type TagUIDChecker struct{}

func (*TagUIDChecker) Check

func (c *TagUIDChecker) Check(exec boil.Executor, uid string) (exists bool, err error)

type TagsFilter

type TagsFilter struct {
	Tags []int64 `json:"tags" form:"tag" binding:"omitempty"`
}

type TagsHierarchyRequest

type TagsHierarchyRequest struct {
	HierarchyRequest
}

type TagsRequest

type TagsRequest struct {
	ListRequest
}

type TagsResponse

type TagsResponse struct {
	ListResponse
	Tags []*Tag `json:"data"`
}

func NewTagsResponse

func NewTagsResponse() *TagsResponse

type Timestamp

type Timestamp struct {
	time.Time
}

A time.Time like structure with Unix timestamp JSON marshalling

func (Timestamp) MarshalJSON

func (t Timestamp) MarshalJSON() ([]byte, error)

func (*Timestamp) UnmarshalJSON

func (t *Timestamp) UnmarshalJSON(b []byte) error

type TranscodeRequest

type TranscodeRequest struct {
	Operation
	MaybeFile
	OriginalSha1 string `json:"original_sha1" binding:"omitempty,len=40,hexadecimal"`
	Message      string `json:"message" binding:"omitempty"`
}

type TrimRequest

type TrimRequest struct {
	Operation
	OriginalSha1  string    `json:"original_sha1" binding:"required,len=40,hexadecimal"`
	ProxySha1     string    `json:"proxy_sha1" binding:"omitempty,len=40,hexadecimal"`
	Original      AVFile    `json:"original"`
	Proxy         *AVFile   `json:"proxy"`
	In            []float64 `json:"in"`
	Out           []float64 `json:"out"`
	CaptureSource string    `json:"capture_source"`
}

type UIDChecker

type UIDChecker interface {
	Check(exec boil.Executor, uid string) (exists bool, err error)
}

type UIDsFilter

type UIDsFilter struct {
	UIDs []string `json:"uids" form:"uid" binding:"omitempty"`
}

type UpChainOperationNotFound

type UpChainOperationNotFound struct {
	FileID int64
	// contains filtered or unexported fields
}

func (UpChainOperationNotFound) Error

func (x UpChainOperationNotFound) Error() string

type UploadRequest

type UploadRequest struct {
	Operation
	AVFile
	Url string `json:"url" binding:"required"`
}

type VideoProgramChapterDescriber

type VideoProgramChapterDescriber struct{}

func (VideoProgramChapterDescriber) DescribeContentUnit

func (d VideoProgramChapterDescriber) DescribeContentUnit(exec boil.Executor,
	cu *models.ContentUnit,
	metadata CITMetadata) ([]*models.ContentUnitI18n, error)

type ZoharNamer

type ZoharNamer struct{}

func (ZoharNamer) GetName

func (n ZoharNamer) GetName(author *models.Author, path []*models.Source) (map[string]string, error)

<path[0]>, <path[2:]>

Jump to

Keyboard shortcuts

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