mediaserver

package
v0.0.0-...-957339b Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2021 License: Apache-2.0 Imports: 14 Imported by: 0

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) error
	GetMetadata(collection, signature string) (*Metadata, error)
	GetFulltext(collection, signature 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 *logging.Logger) (*MediaserverMySQL, error)

func (*MediaserverMySQL) CreateMasterUrl

func (ms *MediaserverMySQL) CreateMasterUrl(collection, signature, url 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) Init

func (ms *MediaserverMySQL) Init() error

func (*MediaserverMySQL) IsMediaserverURL

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

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