Documentation ¶
Index ¶
- Constants
- type Download
- type DownloadResponse
- type Envelope
- type EventNodeStruct
- type EventStruct
- type FaultStruct
- type GetParameterValues
- type GetParameterValuesResponse
- type GetRPCMethods
- type GetRPCMethodsResponse
- type HeaderStruct
- type IDStruct
- type Inform
- func (msg *Inform) CreateXML() []byte
- func (msg *Inform) GetConfigVersion() (version string)
- func (msg *Inform) GetID() string
- func (msg *Inform) GetName() string
- func (msg *Inform) GetParam(name string) (value string)
- func (msg *Inform) IsEvent(event string) bool
- func (msg *Inform) Parse(doc *xmlx.Document)
- type InformResponse
- type Message
- type NodeStruct
- type OnlineInform
- type ParameterListStruct
- type ParameterValueStruct
- type Reboot
- type RebootResponse
- type SetParameterValues
- type SetParameterValuesResponse
- type TransferComplete
- type TransferCompleteResponse
- type ValueChange
- type ValueStruct
Constants ¶
const ( FTFireware string = "1 Firmware Upgrade Image" FTWebContent string = "2 Web Content" FTConfig string = "3 Vendor Configuration File" )
Download type
const ( //XsdString string type XsdString string = "xsd:string" //XsdUnsignedint uint type XsdUnsignedint string = "xsd:unsignedInt" )
const ( //EventBootStrap first connection EventBootStrap string = "0 BOOTSTRAP" //EventBoot reset or power on EventBoot string = "1 BOOT" //EventPeriodic periodic inform EventPeriodic string = "2 PERIODIC" //EventScheduled scheduled infrorm EventScheduled string = "3 SCHEDULED" //EventValueChange value change event EventValueChange string = "4 VALUE CHANGE" //EventKicked acs notify cpe EventKicked string = "5 KICKED" //EventConnectionRequest cpe request connection EventConnectionRequest string = "6 CONNECTION REQUEST" //EventTransferComplete download complete EventTransferComplete string = "7 TRANSFER COMPLETE" //EventClientChange custom event client online/offline EventClientChange string = "8 CLIENT CHANGE" )
const ( //SoapArray array type SoapArray string = "SOAP-ENC:Array" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Download ¶
type Download struct { ID string Name string NoMore int CommandKey string FileType string URL string Username string Password string FileSize int TargetFileName string DelaySeconds int SuccessURL string FailureURL string }
Download tr069 download msg
type DownloadResponse ¶
type DownloadResponse struct { ID string Name string Status int StartTime string CompleteTime string }
DownloadResponse download response
func (*DownloadResponse) CreateXML ¶
func (msg *DownloadResponse) CreateXML() []byte
CreateXML encode into xml
func (*DownloadResponse) GetName ¶
func (msg *DownloadResponse) GetName() string
GetName msg type name
func (*DownloadResponse) Parse ¶
func (msg *DownloadResponse) Parse(doc *xmlx.Document)
Parse decode into struct
type Envelope ¶
type Envelope struct { XMLName xml.Name `xml:"SOAP-ENV:Envelope"` XmlnsEnv string `xml:"xmlns:SOAP-ENV,attr"` XmlnsEnc string `xml:"xmlns:SOAP-ENC,attr"` XmlnsXsd string `xml:"xmlns:xsd,attr"` XmlnsXsi string `xml:"xmlns:xsi,attr"` XmlnsCwmp string `xml:"xmlns:cwmp,attr"` Header interface{} `xml:"SOAP-ENV:Header"` Body interface{} `xml:"SOAP-ENV:Body"` }
Envelope tr069 body
type EventNodeStruct ¶
type EventNodeStruct struct { EventCode NodeStruct `xml:"EventCode"` CommandKey string `xml:"CommandKey"` }
EventNodeStruct event node
type EventStruct ¶
type EventStruct struct { Type string `xml:"SOAP-ENC:arrayType,attr"` Events []EventNodeStruct `xml:"EventStruct"` }
EventStruct event
type GetParameterValues ¶
GetParameterValues get paramvalues
func (*GetParameterValues) CreateXML ¶
func (msg *GetParameterValues) CreateXML() []byte
CreateXML encode into xml
func (*GetParameterValues) GetID ¶
func (msg *GetParameterValues) GetID() string
GetID get tr069 msg id
func (*GetParameterValues) GetName ¶
func (msg *GetParameterValues) GetName() string
GetName get type name
func (*GetParameterValues) Parse ¶
func (msg *GetParameterValues) Parse(doc *xmlx.Document)
Parse decode from xml
type GetParameterValuesResponse ¶
GetParameterValuesResponse getParameterValues response
func NewGetParameterValuesResponse ¶
func NewGetParameterValuesResponse() (m *GetParameterValuesResponse)
NewGetParameterValuesResponse create GetParameterValuesResponse object
func (*GetParameterValuesResponse) CreateXML ¶
func (msg *GetParameterValuesResponse) CreateXML() []byte
CreateXML encode into xml
func (*GetParameterValuesResponse) GetID ¶
func (msg *GetParameterValuesResponse) GetID() string
GetID get msg id
func (*GetParameterValuesResponse) GetName ¶
func (msg *GetParameterValuesResponse) GetName() string
GetName get type name
func (*GetParameterValuesResponse) Parse ¶
func (msg *GetParameterValuesResponse) Parse(doc *xmlx.Document)
Parse decode from xml
type GetRPCMethods ¶
GetRPCMethods get rpc methods
func (*GetRPCMethods) CreateXML ¶
func (msg *GetRPCMethods) CreateXML() []byte
CreateXML encode into xml
func (*GetRPCMethods) Parse ¶
func (msg *GetRPCMethods) Parse(doc *xmlx.Document)
Parse decode from xml
type GetRPCMethodsResponse ¶
GetRPCMethodsResponse getRPCMethods reponse
func (*GetRPCMethodsResponse) CreateXML ¶
func (msg *GetRPCMethodsResponse) CreateXML() []byte
CreateXML encode into xml
func (*GetRPCMethodsResponse) GetID ¶
func (msg *GetRPCMethodsResponse) GetID() string
GetID get msg id
func (*GetRPCMethodsResponse) GetName ¶
func (msg *GetRPCMethodsResponse) GetName() string
GetName get msg type
func (*GetRPCMethodsResponse) Parse ¶
func (msg *GetRPCMethodsResponse) Parse(doc *xmlx.Document)
Parse decode from xml
type HeaderStruct ¶
type HeaderStruct struct { ID IDStruct `xml:"cwmp:ID"` NoMore interface{} `xml:"cwmp:NoMoreRequests,ommitempty"` }
HeaderStruct tr069 header
type IDStruct ¶
type IDStruct struct { Attr string `xml:"SOAP-ENV:mustUnderstand,attr,ommitempty"` Value string `xml:",chardata"` }
IDStruct msg id
type Inform ¶
type Inform struct { ID string `json:"id"` Name string `json:"name"` Manufacturer string `json:"manufacturer"` OUI string `json:"oui"` ProductClass string `json:"productClass"` Sn string `json:"sn"` Events map[string]string `json:"events"` MaxEnvelopes int `json:"maxEnvelopes"` CurrentTime string `json:"currentTime"` RetryCount int `json:"retryCount"` Params map[string]string `json:"params"` }
Inform tr069 inform (heartbeat)
func (*Inform) GetConfigVersion ¶
GetConfigVersion get current config version
type InformResponse ¶
InformResponse infrom response
func (*InformResponse) CreateXML ¶
func (msg *InformResponse) CreateXML() []byte
CreateXML encode into xml
func (*InformResponse) Parse ¶
func (msg *InformResponse) Parse(doc *xmlx.Document)
Parse decode from xml
type Message ¶
type Message interface { Parse(doc *xmlx.Document) CreateXML() []byte GetName() string GetID() string }
Message tr069 msg interface
type NodeStruct ¶
type NodeStruct struct { Type interface{} `xml:"xsi:type,attr"` Value string `xml:",chardata"` }
NodeStruct node
type OnlineInform ¶
type OnlineInform struct { Sn string `json:"sn"` Hosts []host }
OnlineInform online client
func (*OnlineInform) CreateXML ¶
func (msg *OnlineInform) CreateXML() (xml []byte)
CreateXML encode into xml
func (*OnlineInform) Parse ¶
func (msg *OnlineInform) Parse(doc *xmlx.Document)
Parse parse from xml
type ParameterListStruct ¶
type ParameterListStruct struct { Type string `xml:"SOAP-ENC:arrayType,attr"` Params []ParameterValueStruct `xml:"ParameterValueStruct"` }
ParameterListStruct param list
type ParameterValueStruct ¶
type ParameterValueStruct struct { Name NodeStruct `xml:"Name"` Value NodeStruct `xml:"Value"` }
ParameterValueStruct param value
type RebootResponse ¶
RebootResponse reboot response
func (*RebootResponse) CreateXML ¶
func (msg *RebootResponse) CreateXML() []byte
CreateXML encode into xml
func (*RebootResponse) Parse ¶
func (msg *RebootResponse) Parse(doc *xmlx.Document)
Parse decode from xml
type SetParameterValues ¶
type SetParameterValues struct { ID string Name string NoMore int Params map[string]ValueStruct ParameterKey string }
SetParameterValues set param
func (*SetParameterValues) CreateXML ¶
func (msg *SetParameterValues) CreateXML() []byte
CreateXML encode into xml
func (*SetParameterValues) GetName ¶
func (msg *SetParameterValues) GetName() string
GetName get msg type
func (*SetParameterValues) Parse ¶
func (msg *SetParameterValues) Parse(doc *xmlx.Document)
Parse decode from xml
type SetParameterValuesResponse ¶
SetParameterValuesResponse set param reponse
func (*SetParameterValuesResponse) CreateXML ¶
func (msg *SetParameterValuesResponse) CreateXML() []byte
CreateXML encode into xml
func (*SetParameterValuesResponse) GetID ¶
func (msg *SetParameterValuesResponse) GetID() string
GetID get msg id
func (*SetParameterValuesResponse) GetName ¶
func (msg *SetParameterValuesResponse) GetName() string
GetName get msg type
func (*SetParameterValuesResponse) Parse ¶
func (msg *SetParameterValuesResponse) Parse(doc *xmlx.Document)
Parse decode from xml
type TransferComplete ¶
type TransferComplete struct { ID string Name string CommandKey string StartTime string CompleteTime string FaultCode int FaultString string }
TransferComplete download complete
func (*TransferComplete) CreateXML ¶
func (msg *TransferComplete) CreateXML() []byte
CreateXML encode into mxl
func (*TransferComplete) GetName ¶
func (msg *TransferComplete) GetName() string
GetName get msg type
func (*TransferComplete) Parse ¶
func (msg *TransferComplete) Parse(doc *xmlx.Document)
Parse decode from xml
type TransferCompleteResponse ¶
TransferCompleteResponse transferComplete response
func (*TransferCompleteResponse) CreateXML ¶
func (msg *TransferCompleteResponse) CreateXML() []byte
CreateXML encode into xml
func (*TransferCompleteResponse) GetID ¶
func (msg *TransferCompleteResponse) GetID() string
GetID get msg id
func (*TransferCompleteResponse) GetName ¶
func (msg *TransferCompleteResponse) GetName() string
GetName get msg name
func (*TransferCompleteResponse) Parse ¶
func (msg *TransferCompleteResponse) Parse(doc *xmlx.Document)
Parse decode from xml
type ValueChange ¶
ValueChange value change
func (*ValueChange) CreateXML ¶
func (msg *ValueChange) CreateXML() (xml []byte)
CreateXML encode into xml
Source Files ¶
- Download.go
- DownloadResponse.go
- GetParameterValues.go
- GetParameterValuesResponse.go
- GetRPCMethods.go
- GetRPCMethodsResponse.go
- Inform.go
- InformResponse.go
- Message.go
- OnlineInform.go
- Parser.go
- Reboot.go
- RebootResponse.go
- SetParameterValues.go
- SetParameterValuesResponse.go
- TransferComplete.go
- TransferCompleteResponse.go
- ValueChange.go