daemon

package
v0.0.0-...-5907d15 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2019 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const Version = "0.2.6"

Variables

This section is empty.

Functions

func Auth

func Auth(username string, password string, uri string) (bool, error)

func CwmpHandler

func CwmpHandler(w http.ResponseWriter, r *http.Request)

func DigestAuthParams

func DigestAuthParams(r *http.Response) map[string]string

Parse Authorization header from the http.Request. Returns a map of auth parameters or nil if the header is not a valid parsable Digest auth header.

func H

func H(data string) string

H function for MD5 algorithm (returns a lower-case hex MD5 digest)

func RandomKey

func RandomKey() string

func Run

func Run(port *int, logObj MosesWriter, xmppUser, xmppPass string)

Types

type BasicWriter

type BasicWriter struct {
}

func (*BasicWriter) Logger

func (w *BasicWriter) Logger(log string)

type CPE

type CPE struct {
	SerialNumber         string
	Manufacturer         string
	OUI                  string
	ConnectionRequestURL string
	XmppId               string
	XmppUsername         string
	XmppPassword         string
	SoftwareVersion      string
	ExternalIPAddress    string
	State                string
	Queue                *lane.Queue
	Waiting              *Request
	HardwareVersion      string
	LastConnection       time.Time
	DataModel            string
	KeepConnectionOpen   bool
}

type Client

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

func (*Client) Send

func (client *Client) Send(cmd string)

func (*Client) SendNew

func (client *Client) SendNew(msg *WsSendMessage)

func (*Client) String

func (client *Client) String() string

type Message

type Message struct {
	SerialNumber string
	Message      string
}

type MosesWriter

type MosesWriter interface {
	Logger(string)
}

type MsgCPEs

type MsgCPEs struct {
	CPES map[string]CPE
}

type Request

type Request struct {
	Id          string
	Websocket   *websocket.Conn
	CwmpMessage string
	Callback    func(msg *WsSendMessage) error
}

type WsMessage

type WsMessage struct {
	Cmd string
}

type WsSendMessage

type WsSendMessage struct {
	MsgType string
	Data    json.RawMessage
}

Jump to

Keyboard shortcuts

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