Documentation
¶
Index ¶
- func ValidatePathIndex(id string) (string, error)
- type Api
- func (a *Api) LocationGet(w http.ResponseWriter, r *http.Request)
- func (a *Api) ModemDetail(w http.ResponseWriter, r *http.Request)
- func (a *Api) ModemList(w http.ResponseWriter, r *http.Request)
- func (a *Api) SmsDelete(w http.ResponseWriter, r *http.Request)
- func (a *Api) SmsGet(w http.ResponseWriter, r *http.Request)
- func (a *Api) SmsSend(w http.ResponseWriter, r *http.Request)
- type Response
- type SmsCreated
- type SmsRequestData
- type Utils
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidatePathIndex ¶
ValidatePathIndex unescapes and validates a Modem ID string by replacing "%2f" and "%2F" with "/"
Types ¶
type Api ¶
type Api struct {
// contains filtered or unexported fields
}
func (*Api) LocationGet ¶
func (a *Api) LocationGet(w http.ResponseWriter, r *http.Request)
LocationGet @Summary Get location @Accept json @Produce json @Tags location @Success 200 @Failure 404 {object} http.ErrorResponse @Router /location [get] @Param modem query string false "Modem-Id"
func (*Api) ModemDetail ¶
func (a *Api) ModemDetail(w http.ResponseWriter, r *http.Request)
ModemDetail @Summary Modem info @Accept json @Produce json @Tags modem @Success 200 @Failure 404 {object} http.ErrorResponse @Router /modem/{id} [get] @Param id path string true "Modem-Id"
func (*Api) ModemList ¶
func (a *Api) ModemList(w http.ResponseWriter, r *http.Request)
ModemList @Summary List modems @Accept json @Produce json @Tags modem @Success 200 @Router /modem/ [get]
func (*Api) SmsDelete ¶
func (a *Api) SmsDelete(w http.ResponseWriter, r *http.Request)
SmsDelete @Summary Delete a single SMS @Accept json @Produce json @Tags sms @Success 200 @Router /sms/{id} [delete] @Param id path string true "SMS-Id"
func (*Api) SmsGet ¶
func (a *Api) SmsGet(w http.ResponseWriter, r *http.Request)
SmsGet @Summary List SMS messages @Accept json @Produce json @Tags sms @Success 200 @Failure 404 {object} http.ErrorResponse @Router /sms/ [get] @Router /sms/{id} [get] @Param id path string true "SMS-Id" @Param modem query string false "Modem-Id"
type SmsCreated ¶
type SmsCreated struct { Modem struct { Messaging struct { CreatedSms string `json:"created-sms"` } `json:"messaging"` } `json:"modem"` }
SmsCreated {"modem":{"messaging":{"created-sms":"/org/freedesktop/ModemManager1/SMS/0"}}}