data

package
v1.4.21 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2026 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ProviderSet = wire.NewSet(SetupDB)

ProviderSet is data providers.

Functions

func MigrateStreamData added in v1.3.34

func MigrateStreamData(db *gorm.DB, uni uniqueid.Core) error

MigrateStreamData 迁移 stream_pushs 和 stream_proxys 数据到 channels 表 迁移完成后,旧表数据保留,建议手动确认后删除

func SetupDB

func SetupDB(c *conf.Bootstrap) (*gorm.DB, error)

SetupDB 初始化数据存储

Types

type StreamProxy added in v1.3.34

type StreamProxy struct {
	ID                        string   `gorm:"primaryKey"`
	App                       string   `gorm:"column:app"`
	Stream                    string   `gorm:"column:stream"`
	Name                      string   `gorm:"column:name"`
	SourceURL                 string   `gorm:"column:source_url"`
	Transport                 int      `gorm:"column:transport"`
	TimeoutS                  int      `gorm:"column:timeout_s"`
	EnabledAudio              bool     `gorm:"column:enabled_audio"`
	EnabledRemoveNoneReader   bool     `gorm:"column:enabled_remove_none_reader"`
	EnabledDisabledNoneReader bool     `gorm:"column:enabled_disabled_none_reader"`
	StreamKey                 string   `gorm:"column:stream_key"`
	Pulling                   bool     `gorm:"column:pulling"`
	Enabled                   bool     `gorm:"column:enabled"`
	CreatedAt                 orm.Time `gorm:"column:created_at"`
	UpdatedAt                 orm.Time `gorm:"column:updated_at"`
}

StreamProxy 旧的代理模型(用于迁移)

func (*StreamProxy) TableName added in v1.3.34

func (*StreamProxy) TableName() string

type StreamPush added in v1.3.34

type StreamPush struct {
	ID             string    `gorm:"primaryKey"`
	App            string    `gorm:"column:app"`
	Stream         string    `gorm:"column:stream"`
	IsAuthDisabled bool      `gorm:"column:is_auth_disabled"`
	Session        string    `gorm:"column:session"`
	Status         string    `gorm:"column:status"`
	PushedAt       *orm.Time `gorm:"column:pushed_at"`
	StoppedAt      *orm.Time `gorm:"column:stopped_at"`
	MediaServerID  string    `gorm:"column:media_server_id"`
	Name           string    `gorm:"column:name"`
	CreatedAt      orm.Time  `gorm:"column:created_at"`
	UpdatedAt      orm.Time  `gorm:"column:updated_at"`
}

StreamPush 旧的推流模型(用于迁移)

func (*StreamPush) TableName added in v1.3.34

func (*StreamPush) TableName() string

Jump to

Keyboard shortcuts

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