mist_go

package
v0.1.10 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	//
	COMMAND_URL = "/api2"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ActiveStreamsCommand added in v0.1.10

type ActiveStreamsCommand struct {
	ActiveStreams string `json:"active_streams"`
}

{"active_streams":""}

type AddPushCommand added in v0.1.10

type AddPushCommand struct {
	PushStart PushStartCommand `json:"push_start"`
}

{"push_start":{"stream": "","target": "rtmp://",}}

type AddStreamCommand added in v0.1.10

type AddStreamCommand struct {
	AddStream map[string]interface{} `json:"addstream"`
}

{"addstream": {"ali": {"source": "dtsc://192.168.1.52:4200/live"}}}

type AuthCommand added in v0.1.10

type AuthCommand struct {
	Authorize AuthorizeCommand `json:"authorize"`
}

{"authorize":{"username":"","password":""}}

type Authorize added in v0.1.10

type Authorize struct {
	Challenge string `json:"challenge"`
	Status    string `json:"status"`
}

type AuthorizeCommand added in v0.1.10

type AuthorizeCommand struct {
	Username string `json:"username"`
	Password string `json:"password"`
}

type CapabilitiesCommand added in v0.1.10

type CapabilitiesCommand struct {
	Capabilites bool `json:"capabilities"`
}

{"capabilities": true }

type HeaderConfigurator

type HeaderConfigurator struct {
	Headers map[string]string
}

func InitHeaderConfigurator

func InitHeaderConfigurator() *HeaderConfigurator

func (*HeaderConfigurator) CreateBasicAuthHeader

func (h *HeaderConfigurator) CreateBasicAuthHeader(username string, password string)

Authorization Stuff

func (*HeaderConfigurator) CreateBasicAuthHeaderEncoded

func (h *HeaderConfigurator) CreateBasicAuthHeaderEncoded(base64EncodedToken string)

func (*HeaderConfigurator) DeleteHeader

func (h *HeaderConfigurator) DeleteHeader(key string)

func (*HeaderConfigurator) DeleteHeaders

func (h *HeaderConfigurator) DeleteHeaders()

func (*HeaderConfigurator) GetHeader

func (h *HeaderConfigurator) GetHeader(key string) *string

func (*HeaderConfigurator) GetHeaderKeyValuePairs

func (h *HeaderConfigurator) GetHeaderKeyValuePairs() map[string]string

func (*HeaderConfigurator) GetHeaderKeys

func (h *HeaderConfigurator) GetHeaderKeys() []string

func (*HeaderConfigurator) GetHeaderValues

func (h *HeaderConfigurator) GetHeaderValues() []string

func (*HeaderConfigurator) GetHeaders

func (h *HeaderConfigurator) GetHeaders() map[string]string

func (*HeaderConfigurator) HasHeader

func (h *HeaderConfigurator) HasHeader(key string) bool

func (*HeaderConfigurator) HasHeaders

func (h *HeaderConfigurator) HasHeaders() bool

func (*HeaderConfigurator) SetHeader

func (h *HeaderConfigurator) SetHeader(key string, value string)

func (*HeaderConfigurator) SetHeaders

func (h *HeaderConfigurator) SetHeaders(headers map[string]string)

type IMistGoClient

type IMistGoClient interface {
	//
	HealthCheck() error
	IsDebug() bool
	//debugPrint(data interface{})
	// Auth
	Authenticate(auth AuthorizeCommand) (*ResponseBase, error)
	// Capabilities
	GetCapabilities() (*ResponseBase, error)
	// Stream
	AddStream(streamName string, source string) (*ResponseBase, error)
	ActiveStreams() (*ResponseBase, error)
	AddPush(streamName string, target string) (*ResponseBase, error)
	ListPush() (*ResponseBase, error)
	ActiveStreamStatus() (*ResponseBase, error)
}

func BuildMist

func BuildMist(url string, debug bool, header *HeaderConfigurator) (IMistGoClient, error)

type PushListCommand added in v0.1.10

type PushListCommand struct {
	PushList bool `json:"push_list"`
}

{"push_list":true}

type PushStartCommand added in v0.1.10

type PushStartCommand struct {
	Stream string `json:"stream"`
	Target string `json:"target"`
}

type ResponseBase added in v0.1.10

type ResponseBase struct {
	Authorize Authorize `json:"authorize"`
}
{
    "authorize": {
        "challenge": "",
        "status": "CHALL"
    }
}

Jump to

Keyboard shortcuts

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