mediaserver

package
v2.0.7 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2024 License: Apache-2.0 Imports: 13 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewJWT

func NewJWT(secret string, subject string, valid int64) (tokenString string, err error)

Types

type Collection

type Collection struct {
	CollectionId,
	EstateId int64
	Name,
	Description string
	StorageId int64
	JWTKey    string
}

type Mediaserver

type Mediaserver interface {
	IsMediaserverURL(url string) (string, string, bool)
	GetCollectionByName(name string) (*Collection, error)
	GetCollectionById(id int64) (*Collection, error)
	CreateMasterUrl(collection, signature, url string, public bool) error
	GetMetadata(collection, signature string) (*Metadata, error)
	GetFulltext(collection, signature string) (string, error)
	FindByUrn(urn string) (string, string, error)
	GetOriginalUrn(collection, signature string) (string, error)
	GetUrl(collection, signature, function string) (string, error)
}

type MediaserverMySQL

type MediaserverMySQL struct {
	// contains filtered or unexported fields
}

func NewMediaserverMySQL

func NewMediaserverMySQL(mediaserverbase string, db *sql.DB, dbSchema string, logger zLogger.ZLogger) (*MediaserverMySQL, error)

func (*MediaserverMySQL) CreateMasterUrl

func (ms *MediaserverMySQL) CreateMasterUrl(collection, signature, url string, public bool) error

func (*MediaserverMySQL) FindByUrn

func (ms *MediaserverMySQL) FindByUrn(urn string) (string, string, error)

func (*MediaserverMySQL) GetCollectionById

func (ms *MediaserverMySQL) GetCollectionById(id int64) (*Collection, error)

func (*MediaserverMySQL) GetCollectionByName

func (ms *MediaserverMySQL) GetCollectionByName(name string) (*Collection, error)

func (*MediaserverMySQL) GetFulltext

func (ms *MediaserverMySQL) GetFulltext(collection, signature string) (string, error)

func (*MediaserverMySQL) GetMetadata

func (ms *MediaserverMySQL) GetMetadata(collection, signature string) (*Metadata, error)

func (*MediaserverMySQL) GetOriginalUrn

func (ms *MediaserverMySQL) GetOriginalUrn(collection, signature string) (string, error)

func (*MediaserverMySQL) GetUrl

func (ms *MediaserverMySQL) GetUrl(collection, signature, function string) (string, error)

func (*MediaserverMySQL) Init

func (ms *MediaserverMySQL) Init() error

func (*MediaserverMySQL) IsMediaserverURL

func (ms *MediaserverMySQL) IsMediaserverURL(url string) (string, string, bool)

func (*MediaserverMySQL) IsPublic

func (ms *MediaserverMySQL) IsPublic(collection, signature string) (bool, error)

type Metadata

type Metadata struct {
	Mimetype string
	Type     string
	Ext      string
	Sha256   string
	Width    int64
	Height   int64
	Duration int64
	Filesize int64
	Image    interface{}
	Exif     interface{}
	Video    interface{}
}

Jump to

Keyboard shortcuts

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