parser

package
v0.0.0-...-ef8f1f6 Latest Latest
Warning

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

Go to latest
Published: May 16, 2019 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Codec

type Codec struct {
	Type  CodecType `json:"type"`
	Paths []Path    `json:"paths"`
}

type CodecType

type CodecType int
const (
	JPEG CodecType = iota
	MJPEG
	H264
	HLS
	MPEG4
	Streamer
	Dashcam
)

func (CodecType) MarshalJSON

func (r CodecType) MarshalJSON() ([]byte, error)

MarshalJSON is generated so CodecType satisfies json.Marshaler.

func (CodecType) String

func (codec CodecType) String() string

func (*CodecType) UnmarshalJSON

func (r *CodecType) UnmarshalJSON(data []byte) error

UnmarshalJSON is generated so CodecType satisfies json.Unmarshaler.

type Connection

type Connection int
const (
	HTTP Connection = iota
	HTTPS
	RTSP
	RTMP
	RTMPS
	UDP
)

func (Connection) MarshalJSON

func (connection Connection) MarshalJSON() ([]byte, error)

MarshalJSON implementation of marshaler interface

func (Connection) String

func (connection Connection) String() string

func (*Connection) UnmarshalJSON

func (connection *Connection) UnmarshalJSON(data []byte) error

UnmarshalJSON implementation of marshaler interface

type ParamParser

type ParamParser interface {
	Parse(camBrands, camParamFolder string) ([]ShinobiParam, error)
}

func NewFileParser

func NewFileParser() ParamParser

NewFileParser returns a new instance of fileParser

type Path

type Path struct {
	SubPath  string `json:"subpath"`
	IsSecure bool   `json:"isSecure"`
}

func (Path) MarshalJSON

func (path Path) MarshalJSON() ([]byte, error)

func (Path) String

func (path Path) String() string

func (*Path) UnmarshalJSON

func (path *Path) UnmarshalJSON(data []byte) error

type Protocol

type Protocol struct {
	Protocol Connection `json:"protocol"`
	Models   []string   `json:"models"`
	Codecs   []Codec    `json:"codec"`
}

type ShinobiParam

type ShinobiParam struct {
	Vendor    string
	Protocols []Protocol
}

Jump to

Keyboard shortcuts

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