Documentation ¶
Index ¶
- func ConvertStreamProfiles[T StreamProfile](ctx context.Context, m map[ProfileName]AbstractStreamProfile) error
- func GetPlatformSpecificConfig[T any](ctx context.Context, platCfgCfg any) T
- func InitConfig[T any, S StreamProfile](cfg Config, id PlatformName, platCfg PlatformConfig[T, S])
- func ToAbstractStreamProfiles[S StreamProfile](in map[ProfileName]S) map[ProfileName]AbstractStreamProfile
- type AbstractPlatformConfig
- type AbstractStreamController
- type AbstractStreamProfile
- type Config
- type ErrInvalidStreamProfileType
- type ErrNoStreamControllerForProfile
- type PlatformConfig
- type PlatformName
- type ProfileName
- type RawMessage
- type StreamController
- type StreamControllerCommons
- type StreamControllers
- func (s StreamControllers) ApplyProfiles(ctx context.Context, profiles []AbstractStreamProfile) error
- func (s StreamControllers) EndStream(ctx context.Context) error
- func (s StreamControllers) Flush(ctx context.Context) error
- func (s StreamControllers) InsertAdsCuePoint(ctx context.Context, ts time.Time, duration time.Duration) error
- func (s StreamControllers) SetDescription(ctx context.Context, description string) error
- func (s StreamControllers) SetTitle(ctx context.Context, title string) error
- func (s StreamControllers) StartStream(ctx context.Context, title string, description string, ...) error
- type StreamProfile
- type StreamProfileBase
- type StreamProfiles
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertStreamProfiles ¶
func ConvertStreamProfiles[T StreamProfile]( ctx context.Context, m map[ProfileName]AbstractStreamProfile, ) error
func InitConfig ¶
func InitConfig[T any, S StreamProfile](cfg Config, id PlatformName, platCfg PlatformConfig[T, S])
func ToAbstractStreamProfiles ¶
func ToAbstractStreamProfiles[S StreamProfile](in map[ProfileName]S) map[ProfileName]AbstractStreamProfile
Types ¶
type AbstractPlatformConfig ¶
type AbstractPlatformConfig = PlatformConfig[any, AbstractStreamProfile]
type AbstractStreamController ¶
type AbstractStreamController interface { StreamController[AbstractStreamProfile] GetImplementation() StreamControllerCommons StreamProfileType() reflect.Type }
func ToAbstract ¶
func ToAbstract[T StreamProfile](c StreamController[T]) AbstractStreamController
type AbstractStreamProfile ¶
type AbstractStreamProfile interface { GetParent() (ProfileName, bool) GetOrder() int }
type ErrInvalidStreamProfileType ¶
type ErrInvalidStreamProfileType struct { Received AbstractStreamProfile Expected AbstractStreamProfile }
func (ErrInvalidStreamProfileType) Error ¶
func (e ErrInvalidStreamProfileType) Error() string
type ErrNoStreamControllerForProfile ¶
type ErrNoStreamControllerForProfile struct {
StreamProfile AbstractStreamProfile
}
func (ErrNoStreamControllerForProfile) Error ¶
func (e ErrNoStreamControllerForProfile) Error() string
type PlatformConfig ¶
type PlatformConfig[T any, S StreamProfile] struct { Config T StreamProfiles StreamProfiles[S] }
func ConvertPlatformConfig ¶
func ConvertPlatformConfig[T any, S StreamProfile]( ctx context.Context, platCfg *AbstractPlatformConfig, ) *PlatformConfig[T, S]
func GetPlatformConfig ¶
func GetPlatformConfig[T any, S StreamProfile]( ctx context.Context, cfg Config, id PlatformName, ) *PlatformConfig[T, S]
func (PlatformConfig[T, S]) GetStreamProfile ¶
func (cfg PlatformConfig[T, S]) GetStreamProfile(name ProfileName) (S, bool)
type PlatformName ¶
type PlatformName string
type ProfileName ¶
type ProfileName string
type RawMessage ¶
type RawMessage json.RawMessage
func (RawMessage) GetOrder ¶
func (RawMessage) GetOrder() int
func (RawMessage) GetParent ¶
func (RawMessage) GetParent() (ProfileName, bool)
func (RawMessage) MarshalJSON ¶
func (m RawMessage) MarshalJSON() ([]byte, error)
func (RawMessage) MarshalYAML ¶
func (m RawMessage) MarshalYAML() ([]byte, error)
func (*RawMessage) UnmarshalJSON ¶
func (m *RawMessage) UnmarshalJSON(b []byte) error
func (*RawMessage) UnmarshalYAML ¶
func (m *RawMessage) UnmarshalYAML(b []byte) error
type StreamController ¶
type StreamControllerCommons ¶
type StreamControllerCommons interface { SetTitle(ctx context.Context, title string) error SetDescription(ctx context.Context, description string) error InsertAdsCuePoint(ctx context.Context, ts time.Time, duration time.Duration) error Flush(ctx context.Context) error EndStream(ctx context.Context) error }
type StreamControllers ¶
type StreamControllers []AbstractStreamController
func (StreamControllers) ApplyProfiles ¶
func (s StreamControllers) ApplyProfiles( ctx context.Context, profiles []AbstractStreamProfile, ) error
func (StreamControllers) EndStream ¶
func (s StreamControllers) EndStream( ctx context.Context, ) error
func (StreamControllers) InsertAdsCuePoint ¶
func (StreamControllers) SetDescription ¶
func (s StreamControllers) SetDescription( ctx context.Context, description string, ) error
func (StreamControllers) SetTitle ¶
func (s StreamControllers) SetTitle( ctx context.Context, title string, ) error
func (StreamControllers) StartStream ¶
func (s StreamControllers) StartStream( ctx context.Context, title string, description string, profiles []AbstractStreamProfile, customArgs ...any, ) error
type StreamProfile ¶
type StreamProfile interface { AbstractStreamProfile }
type StreamProfileBase ¶
type StreamProfileBase struct { Parent ProfileName Order int }
func (StreamProfileBase) GetOrder ¶
func (profile StreamProfileBase) GetOrder() int
func (StreamProfileBase) GetParent ¶
func (profile StreamProfileBase) GetParent() (ProfileName, bool)
func (*StreamProfileBase) SetOrder ¶
func (profile *StreamProfileBase) SetOrder(v int)
type StreamProfiles ¶
type StreamProfiles[S StreamProfile] map[ProfileName]S
func GetStreamProfiles ¶
func GetStreamProfiles[S StreamProfile](streamProfiles map[ProfileName]AbstractStreamProfile) StreamProfiles[S]
func (StreamProfiles[S]) Get ¶
func (profiles StreamProfiles[S]) Get(name ProfileName) (S, bool)
Click to show internal directories.
Click to hide internal directories.