Documentation ¶
Index ¶
- Constants
- func FaxResponseCodeToResponseInfo(code FaxResponseCode) hum.ResponseInfo
- func NewFaxRequestLegacyMultipartForm(form *multipart.Form) ru.FaxRequest
- func NewPasswordCredentialsLegacyMultipartForm(form *multipart.Form) ro.PasswordCredentials
- func RingoutCall(res http.ResponseWriter, apiClient *rc.APIClient, ringOut ru.RingOutRequest, ...)
- func RingoutList(res http.ResponseWriter, apiClient *rc.APIClient, responseFormat string)
- func WriteFaxResponse(res http.ResponseWriter, resp *http.Response, err error, format string)
- type FaxResponseCode
- type LegacyMultipartFormParser
- type RingOutRequestParams
Constants ¶
const (
Attachment = "attachment"
)
Variables ¶
This section is empty.
Functions ¶
func FaxResponseCodeToResponseInfo ¶
func FaxResponseCodeToResponseInfo(code FaxResponseCode) hum.ResponseInfo
FaxResponseCodeToResponseInfo
0 - Successful 1 - Authorization failed 2 - Faxing is prohibited for the account 3 - No recipients specified 4 - No fax data specified 5 - Generic error
func NewFaxRequestLegacyMultipartForm ¶
func NewFaxRequestLegacyMultipartForm(form *multipart.Form) ru.FaxRequest
NewFaxRequestLegacyMultipartForm returns a REST API clientutil.FaxRequest given a Legacy RPC API `*multipart.Form` https://github.com/golang/go/blob/master/src/net/http/request.go#L237 http://sanatgersappa.blogspot.com/2013/03/handling-multiple-file-uploads-in-go.html
func NewPasswordCredentialsLegacyMultipartForm ¶
func NewPasswordCredentialsLegacyMultipartForm(form *multipart.Form) ro.PasswordCredentials
func RingoutCall ¶
func RingoutCall(res http.ResponseWriter, apiClient *rc.APIClient, ringOut ru.RingOutRequest, responseFormat string)
func RingoutList ¶
func RingoutList(res http.ResponseWriter, apiClient *rc.APIClient, responseFormat string)
func WriteFaxResponse ¶
Types ¶
type FaxResponseCode ¶
type FaxResponseCode int
const ( Successful FaxResponseCode = iota // 0 AuthorizationFailed // 1 FaxingProhibited // 2 NoFaxRecipients // 3 NoFaxData // 4 GenericError // 5 )
type LegacyMultipartFormParser ¶
type LegacyMultipartFormParser struct {
// contains filtered or unexported fields
}
func NewLegacyMultipartFormParser ¶
func NewLegacyMultipartFormParser(form *multipart.Form) LegacyMultipartFormParser
func (*LegacyMultipartFormParser) FaxRequest ¶
func (parser *LegacyMultipartFormParser) FaxRequest() ru.FaxRequest
func (*LegacyMultipartFormParser) Format ¶
func (parser *LegacyMultipartFormParser) Format() string
func (*LegacyMultipartFormParser) PasswordCredentials ¶
func (parser *LegacyMultipartFormParser) PasswordCredentials() ro.PasswordCredentials
type RingOutRequestParams ¶
type RingOutRequestParams struct { Cmd string `schema:"cmd"` Username string `schema:"username"` Ext string `schema:"ext"` Password string `schema:"password"` To string `schema:"to"` From string `schema:"from"` Clid string `schema:"clid"` Prompt string `schema:"prompt"` SessionID string `schema:"sessionid"` Format string `schema:"format"` }
RingOutRequestParams represents the full list of request parameters that can be sent. All parameter names are lower-case. Supports both GET and POST.
func (*RingOutRequestParams) HasValidCommand ¶
func (params *RingOutRequestParams) HasValidCommand() bool
HasValidCommand returns true if `cmd` is set to a supported value.
func (*RingOutRequestParams) PlayPrompt ¶
func (params *RingOutRequestParams) PlayPrompt() bool
PlayPrompt returns the prompt parameter converted to a boolean.