broadcast

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2020 License: MIT Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetComments

func GetComments(c echo.Context) error

func GetIndex

func GetIndex(c echo.Context) error

func GetSecurityCode

func GetSecurityCode(c echo.Context) error

func PostLive

func PostLive(c echo.Context) error

func PostSecurityCode

func PostSecurityCode(c echo.Context) error

func WebSocketComments

func WebSocketComments(c echo.Context) error

Types

type Account

type Account struct {
	Password string `yaml:"password"`
	Token    string `yaml:"token"`
}

type Announcement added in v1.0.4

type Announcement struct {
	Message    string `yaml:"message"`
	MinuteMark int    `yaml:"minute_mark"`
}

type Broadcast

type Broadcast struct {
	// contains filtered or unexported fields
}

func NewBroadcast

func NewBroadcast(c *Config) *Broadcast

func (*Broadcast) Start

func (b *Broadcast) Start() error

func (*Broadcast) StartStreams

func (b *Broadcast) StartStreams() error

func (*Broadcast) Stop

func (b *Broadcast) Stop() error

func (*Broadcast) StopStreams

func (b *Broadcast) StopStreams() error

type Config

type Config struct {
	InputURL     string              `yaml:"input_url"`
	Accounts     map[string]*Account `yaml:"accounts"`
	BindIP       string              `yaml:"bind_ip"`
	BindPort     int                 `yaml:"bind_port"`
	Encoder      Encoder             `yaml:"encoder"`
	Title        string              `yaml:"title"`
	IGTV         IGTV                `yaml:"igtv"`
	Notify       bool                `yaml:"notify"`
	LogLevel     string              `yaml:"log_level"`
	PollInterval int                 `yaml:"poll_interval"`
	Logging      Logging             `yaml:"logging"`
	Announcement Announcement        `yaml:"announcement"`
	// contains filtered or unexported fields
}

func LoadConfig

func LoadConfig(configPath string) (*Config, error)

func (*Config) SaveConfig

func (c *Config) SaveConfig() error

type Encoder

type Encoder struct {
	Command string   `yaml:"command"`
	Args    []string `yaml:"args"`
	Height  int      `yaml:"height"`
	Width   int      `yaml:"width"`
}

type IGTV

type IGTV struct {
	Enabled     bool   `yaml:"enabled"`
	MinDuration int    `yaml:"min_duration"`
	ShareToFeed bool   `yaml:"share_to_feed"`
	Description string `yaml:"description"`
}

type LoggerConfig

type LoggerConfig struct {
	IncludeRequestBodies  bool
	IncludeResponseBodies bool
}

type Logging added in v1.0.2

type Logging struct {
	Enabled      bool   `yaml:"enabled"`
	LogDirectory string `yaml:"log_directory"`
}

type Server

type Server struct {
	IP   string
	Port int
	// contains filtered or unexported fields
}

func NewServer

func NewServer(b *Broadcast, ip string, port int) *Server

func (*Server) Shutdown

func (s *Server) Shutdown() error

func (*Server) Start

func (s *Server) Start() error

type StateContext

type StateContext struct {
	echo.Context
	*Broadcast
}

type Stream

type Stream struct {
	// contains filtered or unexported fields
}

func NewStream

func NewStream(name string, config *Config, broadcast *Broadcast) *Stream

func (*Stream) PutSecurityCode

func (s *Stream) PutSecurityCode(code string) error

func (*Stream) Start

func (s *Stream) Start() error

func (*Stream) Stop

func (s *Stream) Stop() error

type Template

type Template struct {
	// contains filtered or unexported fields
}

func (*Template) Render

func (t *Template) Render(w io.Writer, name string, data interface{}, c echo.Context) error

Jump to

Keyboard shortcuts

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