Documentation
¶
Index ¶
- Constants
- func CleanXMLData(data []byte) []byte
- func FormateTime(t time.Time) string
- func MustParseTime(value string) time.Time
- func ParseTime(value string) (time.Time, error)
- type AccessList
- type AddObject
- type AddObjectResponse
- type AutonomousTransferComplete
- type AutonomousTransferCompleteResponse
- type CwmpFault
- type CwmpID
- type DeleteObject
- type DeleteObjectResponse
- type DeviceID
- type Download
- type DownloadResponse
- type Event
- type EventStruct
- type FactoryReset
- type FactoryResetResponse
- type FaultStruct
- type GetParameterAttributes
- type GetParameterAttributesResponse
- type GetParameterNames
- type GetParameterNamesResponse
- type GetParameterValues
- type GetParameterValuesResponse
- type GetRPCMethods
- type GetRPCMethodsResponse
- type HoldRequests
- type Inform
- type InformResponse
- type MethodList
- type ParameterAttributesStruct
- type ParameterInfoStruct
- type ParameterListOfParameterAttribute
- type ParameterListOfParameterInfo
- type ParameterListOfParameterValue
- type ParameterListOfSetParameterAttribute
- type ParameterName
- type ParameterNames
- type ParameterValue
- type ParameterValueStruct
- type Reboot
- type RebootResponse
- type SessionTimeout
- type SetParameterAttributes
- type SetParameterAttributesResponse
- type SetParameterAttributesStruct
- type SetParameterValues
- type SetParameterValuesFault
- type SetParameterValuesResponse
- type SoapBody
- type SoapEnvelope
- type SoapFault
- type SoapFaultDetail
- type SoapHeader
- type SoapNamespace
- type SupportedCWMPVersions
- type TransferComplete
- type TransferCompleteResponse
- type Upload
- type UploadResponse
- type UseCWMPVersion
- type Value
Constants ¶
View Source
const ( ACSFaultCodeMethodNotSupported = 8000 ACSFaultCodeRequestDenied = 8001 ACSFaultCodeInternalError = 8002 ACSFaultCodeInvalidArguments = 8003 ACSFaultCodeResourcesExceeded = 8004 ACSFaultCodeRetryRequest = 8005 )
View Source
const ( XMLNS_XSD = "http://www.w3.org/2001/XMLSchema" XMLNS_XSI = "http://www.w3.org/2001/XMLSchema-instance" XMLNS_SOAP_ENC = "http://schemas.xmlsoap.org/soap/encoding/" XMLNS_SOAP_ENV = "http://schemas.xmlsoap.org/soap/envelope/" XMLNS_CWMP_1_0 = "urn:dslforum-org:cwmp-1-0" XMLNS_CWMP_1_1 = "urn:dslforum-org:cwmp-1-1" XMLNS_CWMP_1_2 = "urn:dslforum-org:cwmp-1-2" XMLNS_CWMP_1_3 = "urn:dslforum-org:cwmp-1-3" XMLNS_CWMP_1_4 = "urn:dslforum-org:cwmp-1-4" )
Variables ¶
This section is empty.
Functions ¶
func CleanXMLData ¶
func FormateTime ¶
func MustParseTime ¶
Types ¶
type AccessList ¶
type AddObjectResponse ¶
type AutonomousTransferComplete ¶
type AutonomousTransferComplete struct { XMLName xml.Name Text string `xml:",chardata"` AnnounceURL string `xml:"AnnounceURL"` TransferURL string `xml:"TransferURL"` IsDownload bool `xml:"IsDownload"` FileType string `xml:"FileType"` FileSize uint `xml:"FileSize"` TargetFileName string `xml:"TargetFileName"` FaultStruct FaultStruct `xml:"FaultStruct"` StartTime string `xml:"StartTime"` CompleteTime string `xml:"CompleteTime"` }
type CwmpFault ¶
type DeleteObject ¶
type DeleteObjectResponse ¶
type DeviceID ¶
type Download ¶
type Download struct { XMLName xml.Name Text string `xml:",chardata"` CommandKey string `xml:"CommandKey"` FileType string `xml:"FileType"` URL string `xml:"URL"` Username string `xml:"Username"` Password string `xml:"Password"` FileSize uint `xml:"FileSize"` TargetFileName string `xml:"TargetFileName"` DelaySeconds uint `xml:"DelaySeconds"` SuccessURL string `xml:"SuccessURL"` FailureURL string `xml:"FailureURL"` }
type DownloadResponse ¶
type Event ¶
type Event struct { XMLName xml.Name Text string `xml:",chardata"` Events []EventStruct `xml:"EventStruct"` }
type EventStruct ¶
type EventStruct struct { XMLName xml.Name Text string `xml:",chardata"` EventCode string `xml:"EventCode"` CommandKey string `xml:"CommandKey"` }
func (EventStruct) String ¶
func (m EventStruct) String() string
type FactoryReset ¶
type FactoryResetResponse ¶
type FaultStruct ¶
type GetParameterAttributes ¶
type GetParameterAttributes struct { XMLName xml.Name Text string `xml:",chardata"` ParameterNames ParameterNames `xml:"ParameterNames"` }
type GetParameterAttributesResponse ¶
type GetParameterAttributesResponse struct { XMLName xml.Name Text string `xml:",chardata"` ParameterList ParameterListOfParameterAttribute `xml:"ParameterList"` }
type GetParameterNames ¶
type GetParameterNamesResponse ¶
type GetParameterNamesResponse struct { XMLName xml.Name Text string `xml:",chardata"` ParameterList ParameterListOfParameterInfo `xml:"ParameterList"` }
type GetParameterValues ¶
type GetParameterValues struct { XMLName xml.Name Text string `xml:",chardata"` ParameterNames ParameterNames `xml:"ParameterNames"` }
type GetParameterValuesResponse ¶
type GetParameterValuesResponse struct { XMLName xml.Name Text string `xml:",chardata"` ParameterList ParameterListOfParameterValue `xml:"ParameterList"` }
type GetRPCMethods ¶
type GetRPCMethodsResponse ¶
type GetRPCMethodsResponse struct { XMLName xml.Name Text string `xml:",chardata"` MethodList MethodList `xml:"MethodList"` }
type HoldRequests ¶
type Inform ¶
type Inform struct { XMLName xml.Name Text string `xml:",chardata"` DeviceID DeviceID `xml:"DeviceId"` Event Event `xml:"Event"` MaxEnvelopes int `xml:"MaxEnvelopes"` CurrentTime string `xml:"CurrentTime"` RetryCount int `xml:"RetryCount"` ParameterList ParameterListOfParameterValue `xml:"ParameterList"` }
type InformResponse ¶
type MethodList ¶
type ParameterInfoStruct ¶
type ParameterListOfParameterInfo ¶
type ParameterListOfParameterInfo struct { XMLName xml.Name Text string `xml:",chardata"` Attrs []xml.Attr `xml:",any,attr"` ParameterInfoStructs []*ParameterInfoStruct `xml:"ParameterInfoStruct"` }
func (ParameterListOfParameterInfo) String ¶
func (m ParameterListOfParameterInfo) String() string
type ParameterListOfParameterValue ¶
type ParameterListOfParameterValue struct { XMLName xml.Name Text string `xml:",chardata"` Attrs []xml.Attr `xml:",any,attr"` ParameterValueStructs []*ParameterValueStruct `xml:"ParameterValueStruct"` }
func (ParameterListOfParameterValue) String ¶
func (m ParameterListOfParameterValue) String() string
type ParameterName ¶
type ParameterNames ¶
type ParameterValue ¶
type ParameterValueStruct ¶
type ParameterValueStruct struct { XMLName xml.Name Text string `xml:",chardata"` Name ParameterName `xml:"Name"` Value ParameterValue `xml:"Value"` }
func (ParameterValueStruct) String ¶
func (m ParameterValueStruct) String() string
type RebootResponse ¶
type SessionTimeout ¶
type SetParameterAttributes ¶
type SetParameterAttributes struct { XMLName xml.Name Text string `xml:",chardata"` ParameterList ParameterListOfSetParameterAttribute `xml:"ParameterList"` }
type SetParameterAttributesStruct ¶
type SetParameterAttributesStruct struct { XMLName xml.Name Text string `xml:",chardata"` Name string `xml:"Name"` NotificationChange bool `xml:"NotificationChange,omitempty"` Notification int `xml:"Notification,omitempty"` AccessListChange bool `xml:"AccessListChange,omitempty"` AccessList AccessList `xml:"AccessList,omitempty"` }
type SetParameterValues ¶
type SetParameterValues struct { XMLName xml.Name Text string `xml:",chardata"` ParameterList ParameterListOfParameterValue `xml:"ParameterList"` ParameterKey string `xml:"ParameterKey"` }
type SetParameterValuesFault ¶
type SoapBody ¶
type SoapBody struct { XMLName xml.Name Text string `xml:",chardata"` Fault *SoapFault `xml:"Fault,omitempty"` GetRPCMethods *GetRPCMethods `xml:"GetRPCMethods,omitempty"` GetRPCMethodsResponse *GetRPCMethodsResponse `xml:"GetRPCMethodsResponse,omitempty"` SetParameterValues *SetParameterValues `xml:"SetParameterValues,omitempty"` SetParameterValuesResponse *SetParameterValuesResponse `xml:"SetParameterValuesResponse,omitempty"` GetParameterValues *GetParameterValues `xml:"GetParameterValues,omitempty"` GetParameterValuesResponse *GetParameterValuesResponse `xml:"GetParameterValuesResponse,omitempty"` GetParameterNames *GetParameterNames `xml:"GetParameterNames,omitempty"` GetParameterNamesResponse *GetParameterNamesResponse `xml:"GetParameterNamesResponse,omitempty"` GetParameterAttributes *GetParameterAttributes `xml:"GetParameterAttributes,omitempty"` GetParameterAttributesResponse *GetParameterAttributesResponse `xml:"GetParameterAttributesResponse,omitempty"` SetParameterAttributes *SetParameterAttributes `xml:"SetParameterAttributes,omitempty"` SetParameterAttributesResponse *SetParameterAttributesResponse `xml:"SetParameterAttributesResponse,omitempty"` AddObject *AddObject `xml:"AddObject,omitempty"` AddObjectResponse *AddObjectResponse `xml:"AddObjectResponse,omitempty"` DeleteObject *DeleteObject `xml:"DeleteObject,omitempty"` DeleteObjectResponse *DeleteObjectResponse `xml:"DeleteObjectResponse,omitempty"` Download *Download `xml:"Download,omitempty"` DownloadResponse *DownloadResponse `xml:"DownloadResponse,omitempty"` Upload *Upload `xml:"Upload,omitempty"` UploadResponse *UploadResponse `xml:"UploadResponse,omitempty"` Reboot *Reboot `xml:"Reboot,omitempty"` RebootResponse *RebootResponse `xml:"RebootResponse,omitempty"` FactoryReset *FactoryReset `xml:"FactoryReset,omitempty"` FactoryResetResponse *FactoryResetResponse `xml:"FactoryResetResponse,omitempty"` Inform *Inform `xml:"Inform,omitempty"` InformResponse *InformResponse `xml:"InformResponse,omitempty"` TransferComplete *TransferComplete `xml:"TransferComplete,omitempty"` TransferCompleteResponse *TransferCompleteResponse `xml:"TransferCompleteResponse,omitempty"` AutonomousTransferComplete *AutonomousTransferComplete `xml:"AutonomousTransferComplete,omitempty"` AutonomousTransferCompleteResponse *AutonomousTransferCompleteResponse `xml:"AutonomousTransferCompleteResponse,omitempty"` }
type SoapEnvelope ¶
type SoapEnvelope struct { XMLName xml.Name Text string `xml:",chardata"` Attrs []xml.Attr `xml:",any,attr"` NS SoapNamespace `xml:"-"` Header SoapHeader `xml:"Header"` Body SoapBody `xml:"Body"` }
func CreateEnvelope ¶
func CreateEnvelope(id string, ns SoapNamespace, body any) *SoapEnvelope
func CreateEnvelopeFault ¶
func CreateEnvelopeFault(id string, ns SoapNamespace, code int, err error) *SoapEnvelope
func CreateEnvelopeWithRequest ¶
func CreateEnvelopeWithRequest(req *SoapEnvelope) *SoapEnvelope
func (*SoapEnvelope) Decode ¶
func (m *SoapEnvelope) Decode() error
func (*SoapEnvelope) Encode ¶
func (m *SoapEnvelope) Encode() error
func (*SoapEnvelope) GetNamespace ¶
func (m *SoapEnvelope) GetNamespace() SoapNamespace
type SoapFault ¶
type SoapFault struct { XMLName xml.Name Text string `xml:",chardata"` FaultCode string `xml:"faultcode"` FaultString string `xml:"faultstring"` Detail SoapFaultDetail `xml:"detail"` }
func CreateSoapFault ¶
type SoapFaultDetail ¶
type SoapFaultDetail struct { XMLName xml.Name Text string `xml:",chardata"` Fault CwmpFault `xml:"Fault"` }
func (SoapFaultDetail) String ¶
func (m SoapFaultDetail) String() string
type SoapHeader ¶
type SoapHeader struct { XMLName xml.Name Text string `xml:",chardata"` ID *CwmpID `xml:"ID,omitempty"` HoldRequests *HoldRequests `xml:"HoldRequests,omitempty"` // ACS to CPE SessionTimeout *SessionTimeout `xml:"SessionTimeout,omitempty"` // CPE to ACS SupportedCWMPVersions *SupportedCWMPVersions `xml:"SupportedCWMPVersions,omitempty"` // CPE to ACS UseCWMPVersion *UseCWMPVersion `xml:"UseCWMPVersion,omitempty"` // ACS to CPE }
type SoapNamespace ¶
type SoapNamespace struct { SoapEnv xml.Attr `xml:"-"` SoapEnc xml.Attr `xml:"-"` Cwmp xml.Attr `xml:"-"` Xsd xml.Attr `xml:"-"` Xsi xml.Attr `xml:"-"` }
func (*SoapNamespace) FromString ¶
func (m *SoapNamespace) FromString(in string) error
func (SoapNamespace) ToString ¶
func (m SoapNamespace) ToString() string
type SupportedCWMPVersions ¶
type TransferComplete ¶
type UploadResponse ¶
type UseCWMPVersion ¶
Click to show internal directories.
Click to hide internal directories.