mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
lowercased the config desc
This commit is contained in:
parent
3a46fa43e6
commit
9e4e427779
@ -12,17 +12,17 @@ type Root struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (Root) Init(cmd *cobra.Command) error {
|
func (Root) Init(cmd *cobra.Command) error {
|
||||||
cmd.PersistentFlags().BoolP("debug", "d", false, "Enable debug mode")
|
cmd.PersistentFlags().BoolP("debug", "d", false, "enable debug mode")
|
||||||
if err := viper.BindPFlag("debug", cmd.PersistentFlags().Lookup("debug")); err != nil {
|
if err := viper.BindPFlag("debug", cmd.PersistentFlags().Lookup("debug")); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
cmd.PersistentFlags().BoolP("logs", "l", false, "Save logs to file")
|
cmd.PersistentFlags().BoolP("logs", "l", false, "save logs to file")
|
||||||
if err := viper.BindPFlag("logs", cmd.PersistentFlags().Lookup("logs")); err != nil {
|
if err := viper.BindPFlag("logs", cmd.PersistentFlags().Lookup("logs")); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
cmd.PersistentFlags().String("config", "", "Configuration file path")
|
cmd.PersistentFlags().String("config", "", "configuration file path")
|
||||||
if err := viper.BindPFlag("config", cmd.PersistentFlags().Lookup("config")); err != nil {
|
if err := viper.BindPFlag("config", cmd.PersistentFlags().Lookup("config")); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
@ -13,22 +13,22 @@ type Server struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (Server) Init(cmd *cobra.Command) error {
|
func (Server) Init(cmd *cobra.Command) error {
|
||||||
cmd.PersistentFlags().String("bind", "127.0.0.1:8080", "Address/port/socket to serve neko")
|
cmd.PersistentFlags().String("bind", "127.0.0.1:8080", "address/port/socket to serve neko")
|
||||||
if err := viper.BindPFlag("bind", cmd.PersistentFlags().Lookup("bind")); err != nil {
|
if err := viper.BindPFlag("bind", cmd.PersistentFlags().Lookup("bind")); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
cmd.PersistentFlags().String("cert", "", "Path to the SSL cert used to secure the neko server")
|
cmd.PersistentFlags().String("cert", "", "path to the SSL cert used to secure the neko server")
|
||||||
if err := viper.BindPFlag("cert", cmd.PersistentFlags().Lookup("cert")); err != nil {
|
if err := viper.BindPFlag("cert", cmd.PersistentFlags().Lookup("cert")); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
cmd.PersistentFlags().String("key", "", "Path to the SSL key used to secure the neko server")
|
cmd.PersistentFlags().String("key", "", "path to the SSL key used to secure the neko server")
|
||||||
if err := viper.BindPFlag("key", cmd.PersistentFlags().Lookup("key")); err != nil {
|
if err := viper.BindPFlag("key", cmd.PersistentFlags().Lookup("key")); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
cmd.PersistentFlags().String("static", "./www", "Neko client files to serve")
|
cmd.PersistentFlags().String("static", "./www", "path to neko client files to serve")
|
||||||
if err := viper.BindPFlag("static", cmd.PersistentFlags().Lookup("static")); err != nil {
|
if err := viper.BindPFlag("static", cmd.PersistentFlags().Lookup("static")); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
@ -21,12 +21,12 @@ type WebRTC struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (WebRTC) Init(cmd *cobra.Command) error {
|
func (WebRTC) Init(cmd *cobra.Command) error {
|
||||||
cmd.PersistentFlags().String("device", "auto_null.monitor", "Audio device to capture")
|
cmd.PersistentFlags().String("device", "auto_null.monitor", "audio device to capture")
|
||||||
if err := viper.BindPFlag("device", cmd.PersistentFlags().Lookup("device")); err != nil {
|
if err := viper.BindPFlag("device", cmd.PersistentFlags().Lookup("device")); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
cmd.PersistentFlags().String("aduio", "", "Audio codec parameters to use for streaming (unused)")
|
cmd.PersistentFlags().String("aduio", "", "audio codec parameters to use for streaming (unused)")
|
||||||
if err := viper.BindPFlag("aparams", cmd.PersistentFlags().Lookup("aduio")); err != nil {
|
if err := viper.BindPFlag("aparams", cmd.PersistentFlags().Lookup("aduio")); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
@ -36,50 +36,50 @@ func (WebRTC) Init(cmd *cobra.Command) error {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
cmd.PersistentFlags().String("video", "", "Video codec parameters to use for streaming (unused)")
|
cmd.PersistentFlags().String("video", "", "video codec parameters to use for streaming (unused)")
|
||||||
if err := viper.BindPFlag("vparams", cmd.PersistentFlags().Lookup("video")); err != nil {
|
if err := viper.BindPFlag("vparams", cmd.PersistentFlags().Lookup("video")); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
cmd.PersistentFlags().String("epr", "59000-59100", "Limits the pool of ephemeral ports that ICE UDP connections can allocate from")
|
cmd.PersistentFlags().String("epr", "59000-59100", "limits the pool of ephemeral ports that ICE UDP connections can allocate from")
|
||||||
if err := viper.BindPFlag("epr", cmd.PersistentFlags().Lookup("epr")); err != nil {
|
if err := viper.BindPFlag("epr", cmd.PersistentFlags().Lookup("epr")); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
// video codecs
|
// video codecs
|
||||||
cmd.PersistentFlags().Bool("vp8", false, "Use VP8 video codec")
|
cmd.PersistentFlags().Bool("vp8", false, "use VP8 video codec")
|
||||||
if err := viper.BindPFlag("vp8", cmd.PersistentFlags().Lookup("vp8")); err != nil {
|
if err := viper.BindPFlag("vp8", cmd.PersistentFlags().Lookup("vp8")); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
cmd.PersistentFlags().Bool("vp9", false, "Use VP9 video codec")
|
cmd.PersistentFlags().Bool("vp9", false, "use VP9 video codec")
|
||||||
if err := viper.BindPFlag("vp9", cmd.PersistentFlags().Lookup("vp9")); err != nil {
|
if err := viper.BindPFlag("vp9", cmd.PersistentFlags().Lookup("vp9")); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
cmd.PersistentFlags().Bool("h264", false, "Use H264 video codec")
|
cmd.PersistentFlags().Bool("h264", false, "use H264 video codec")
|
||||||
if err := viper.BindPFlag("h264", cmd.PersistentFlags().Lookup("h264")); err != nil {
|
if err := viper.BindPFlag("h264", cmd.PersistentFlags().Lookup("h264")); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
// audio codecs
|
// audio codecs
|
||||||
cmd.PersistentFlags().Bool("opus", false, "Use Opus audio codec")
|
cmd.PersistentFlags().Bool("opus", false, "use Opus audio codec")
|
||||||
if err := viper.BindPFlag("opus", cmd.PersistentFlags().Lookup("opus")); err != nil {
|
if err := viper.BindPFlag("opus", cmd.PersistentFlags().Lookup("opus")); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
cmd.PersistentFlags().Bool("g722", false, "Use G722 audio codec")
|
cmd.PersistentFlags().Bool("g722", false, "use G722 audio codec")
|
||||||
if err := viper.BindPFlag("g722", cmd.PersistentFlags().Lookup("g722")); err != nil {
|
if err := viper.BindPFlag("g722", cmd.PersistentFlags().Lookup("g722")); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
cmd.PersistentFlags().Bool("pcmu", false, "Use PCMU audio codec")
|
cmd.PersistentFlags().Bool("pcmu", false, "use PCMU audio codec")
|
||||||
if err := viper.BindPFlag("pcmu", cmd.PersistentFlags().Lookup("pcmu")); err != nil {
|
if err := viper.BindPFlag("pcmu", cmd.PersistentFlags().Lookup("pcmu")); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
cmd.PersistentFlags().Bool("pcma", false, "Use PCMA audio codec")
|
cmd.PersistentFlags().Bool("pcma", false, "use PCMA audio codec")
|
||||||
if err := viper.BindPFlag("pcmu", cmd.PersistentFlags().Lookup("pcmu")); err != nil {
|
if err := viper.BindPFlag("pcma", cmd.PersistentFlags().Lookup("pcma")); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -11,12 +11,12 @@ type WebSocket struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (WebSocket) Init(cmd *cobra.Command) error {
|
func (WebSocket) Init(cmd *cobra.Command) error {
|
||||||
cmd.PersistentFlags().String("password", "neko", "Password for connecting to stream")
|
cmd.PersistentFlags().String("password", "neko", "password for connecting to stream")
|
||||||
if err := viper.BindPFlag("password", cmd.PersistentFlags().Lookup("password")); err != nil {
|
if err := viper.BindPFlag("password", cmd.PersistentFlags().Lookup("password")); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
cmd.PersistentFlags().String("admin", "admin", "Admin password for connecting to stream")
|
cmd.PersistentFlags().String("admin", "admin", "admin password for connecting to stream")
|
||||||
if err := viper.BindPFlag("admin", cmd.PersistentFlags().Lookup("admin")); err != nil {
|
if err := viper.BindPFlag("admin", cmd.PersistentFlags().Lookup("admin")); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user