mirror of
https://github.com/navidrome/navidrome.git
synced 2026-12-06 03:37:47 +00:00
27 lines
755 B
Go
27 lines
755 B
Go
package model
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/deluan/rest"
|
|
)
|
|
|
|
type Transcoding struct {
|
|
ID string `db:"id" json:"id"`
|
|
Name string `db:"name" json:"name"`
|
|
TargetFormat string `db:"target_format" json:"targetFormat"`
|
|
Command string `db:"command" json:"command"`
|
|
DefaultBitRate int `db:"default_bit_rate" json:"defaultBitRate"`
|
|
}
|
|
|
|
type Transcodings []Transcoding
|
|
|
|
type TranscodingRepository interface {
|
|
rest.Repository[Transcoding]
|
|
rest.Persistable[Transcoding]
|
|
Get(ctx context.Context, id string) (*Transcoding, error)
|
|
CountAll(ctx context.Context, options ...QueryOptions) (int64, error)
|
|
Put(ctx context.Context, t *Transcoding) error
|
|
FindByFormat(ctx context.Context, format string) (*Transcoding, error)
|
|
}
|