Documentation
¶
Overview ¶
Code generated by godddx, DO AVOID EDIT.
Code generated by godddx, DO AVOID EDIT.
Code generated by godddx, DO AVOID EDIT.
Code generated by godddx, DO AVOID EDIT.
Code generated by godddx, DO AVOID EDIT.
Index ¶
- Constants
- type AddStreamPushInput
- type Core
- func (c Core) AddStreamPush(ctx context.Context, in *AddStreamPushInput) (*StreamPush, error)
- func (c *Core) DelStreamPush(ctx context.Context, id string) (*StreamPush, error)
- func (c Core) EditStreamPush(ctx context.Context, in *EditStreamPushInput, id string) (*StreamPush, error)
- func (c Core) FindStreamPush(ctx context.Context, in *FindStreamPushInput) ([]*StreamPush, int64, error)
- func (c Core) GetStreamPush(ctx context.Context, id string) (*StreamPush, error)
- func (c Core) GetStreamPushByAppStream(ctx context.Context, app, stream string) (*StreamPush, error)
- func (c *Core) OnPlay(ctx context.Context, in OnPlayInput) error
- func (c *Core) Publish(ctx context.Context, in PublishInput) error
- func (c *Core) UnPublish(ctx context.Context, app, stream string) error
- type EditStreamPushInput
- type FindStreamPushInput
- type FindStreamPushOutputItem
- type OnPlayInput
- type PublishInput
- type Storer
- type StreamPush
- type StreamPushStorer
Constants ¶
View Source
const ( StatusPushing = "PUSHING" // 推流中状态 StatusStopped = "STOPPED" // 停止 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddStreamPushInput ¶
type Core ¶
type Core struct {
// contains filtered or unexported fields
}
Core business domain
func (Core) AddStreamPush ¶
func (c Core) AddStreamPush(ctx context.Context, in *AddStreamPushInput) (*StreamPush, error)
AddStreamPush Insert into database
func (*Core) DelStreamPush ¶
DelStreamPush Delete object
func (Core) EditStreamPush ¶
func (c Core) EditStreamPush(ctx context.Context, in *EditStreamPushInput, id string) (*StreamPush, error)
EditStreamPush Update object information
func (Core) FindStreamPush ¶
func (c Core) FindStreamPush(ctx context.Context, in *FindStreamPushInput) ([]*StreamPush, int64, error)
FindStreamPush Paginated search
func (Core) GetStreamPush ¶
GetStreamPush Query a single object
func (Core) GetStreamPushByAppStream ¶
type EditStreamPushInput ¶
type FindStreamPushInput ¶
type FindStreamPushInput struct {
web.PagerFilter
// App string `form:"app"` // 应用名
// PushedAt *orm.Time `form:"pushed_at"` // 最后一次推流时间
// StoppedAt *orm.Time `form:"stopped_at"` // 最后一次停止时间
// Stream string `form:"stream"` // 流 ID
// MediaServerID string `form:"media_server_id"` // 媒体服务器 ID
// ServerID string `form:"server_id"` // 服务器 ID
Status string `form:"status"` // 推流状态(PUSHING)
Key string `form:"key"`
}
type FindStreamPushOutputItem ¶
type FindStreamPushOutputItem struct {
StreamPush
PushAddrs []string `json:"push_addrs"`
}
type OnPlayInput ¶
type PublishInput ¶
type StreamPush ¶
type StreamPush struct {
ID string `gorm:"primaryKey" json:"id"`
CreatedAt orm.Time `gorm:"column:created_at;notNull;default:CURRENT_TIMESTAMP;comment:创建时间" json:"created_at"` // 创建时间
UpdatedAt orm.Time `gorm:"column:updated_at;notNull;default:CURRENT_TIMESTAMP;comment:更新时间" json:"updated_at"` // 更新时间
Name string `gorm:"column:name;notNull;default:'';comment:推流名称" json:"name"` // 推流名称
PushedAt *orm.Time `gorm:"column:pushed_at;notNull;default:'1970-01-01 00:00:00';comment:最后一次推流时间" json:"pushed_at"` // 最后一次推流时间
StoppedAt *orm.Time `gorm:"column:stopped_at;notNull;default:'1970-01-01 00:00:00';comment:最后一次停止时间" json:"stopped_at"` // 最后一次停止时间
App string `gorm:"column:app;notNull;default:'';uniqueIndex:idx_stream_pushs_app_stream;comment:应用名" json:"app"` // 应用名
Stream string `gorm:"column:stream;notNull;default:'';uniqueIndex:idx_stream_pushs_app_stream;comment:流 ID" json:"stream"` // 流 ID
MediaServerID string `gorm:"column:media_server_id;notNull;default:'';comment:媒体服务器 ID" json:"media_server_id"` // 媒体服务器 ID
ServerID string `gorm:"column:server_id;notNull;default:'';comment:服务器 ID" json:"server_id"` // 服务器 ID
Status string `gorm:"column:status;notNull;default:'';comment:推流状态(PUSHING)" json:"status"` // 推流状态(PUSHING)
IsAuthDisabled bool `gorm:"column:is_auth_disabled;notNull;default:false;comment:是否启用推流鉴权" json:"is_auth_disabled"` // 是否启用推流鉴权
// 自定义拉流鉴权参数,IsAuthDisabled=false 时生效
Session string `gorm:"column:session;notNull;default:'';comment:session" json:"-"`
}
StreamPush domain model
type StreamPushStorer ¶
type StreamPushStorer interface {
Find(context.Context, *[]*StreamPush, orm.Pager, ...orm.QueryOption) (int64, error)
Get(context.Context, *StreamPush, ...orm.QueryOption) error
Add(context.Context, *StreamPush) error
Edit(context.Context, *StreamPush, func(*StreamPush), ...orm.QueryOption) error
Del(context.Context, *StreamPush, ...orm.QueryOption) error
}
StreamPushStorer Instantiation interface
Source Files
¶
Click to show internal directories.
Click to hide internal directories.