Documentation ¶
Index ¶
- type APIClient
- func (c *APIClient) DeleteFile(id string) ([]byte, int, error)
- func (c *APIClient) DeletePhoneNumber(id string) ([]byte, int, error)
- func (c *APIClient) GetFile(id string) ([]byte, int, error)
- func (c *APIClient) GetPhoneNumber(id string) ([]byte, int, error)
- func (c *APIClient) ImportTwilioPhoneNumber(requestData ImportTwilioRequest) ([]byte, int, error)
- func (c *APIClient) SendRequest(method, endpoint string, body interface{}) ([]byte, int, error)
- func (c *APIClient) UploadData(fieldName, filename string, content []byte) ([]byte, int, error)
- type FallbackDestination
- type FileResponse
- type ImportTwilioRequest
- type TwilioPhoneNumber
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIClient ¶
APIClient handles communication with the remote provider.
func (*APIClient) DeleteFile ¶ added in v0.3.0
DeleteFile deletes a specific phone number by ID.
func (*APIClient) DeletePhoneNumber ¶ added in v0.3.0
DeletePhoneNumber deletes a specific phone number by ID.
func (*APIClient) GetFile ¶ added in v0.3.0
GetFile retrieves the details of a specific phone number by ID.
func (*APIClient) GetPhoneNumber ¶ added in v0.3.0
GetPhoneNumber retrieves the details of a specific phone number by ID.
func (*APIClient) ImportTwilioPhoneNumber ¶ added in v0.3.0
func (c *APIClient) ImportTwilioPhoneNumber(requestData ImportTwilioRequest) ([]byte, int, error)
ImportTwilioPhoneNumber requests the creation of a new phone number.
func (*APIClient) SendRequest ¶
Sends a request to the API.
type FallbackDestination ¶ added in v0.3.0
type FallbackDestination struct { Type string `json:"type"` NumberE164CheckEnabled bool `json:"numberE164CheckEnabled"` Number string `json:"number"` Extension string `json:"extension"` Message string `json:"message"` Description string `json:"description"` }
FallbackDestination struct.
type FileResponse ¶
type FileResponse struct { ID string `json:"id"` Name string `json:"name"` OriginalName string `json:"originalName"` Bytes int64 `json:"bytes"` Mimetype string `json:"mimetype"` Path string `json:"path"` URL string `json:"url"` Metadata map[string]interface{} `json:"metadata"` OrgID string `json:"orgId"` CreatedAt string `json:"createdAt"` UpdatedAt string `json:"updatedAt"` Status string `json:"status"` Purpose string `json:"purpose"` Bucket string `json:"bucket"` }
FileResponse represents the structure of the API response.
func (*FileResponse) UnmarshalJSON ¶
func (fr *FileResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON implements custom unmarshaling for FileResponse.
type ImportTwilioRequest ¶ added in v0.3.0
type ImportTwilioRequest struct { Provider string `json:"provider"` Name string `json:"name"` Number string `json:"number"` TwilioAccountSID string `json:"twilioAccountSid"` TwilioAuthToken string `json:"twilioAuthToken"` Fallback *FallbackDestination `json:"fallbackDestination,omitempty"` }
ImportTwilioRequest struct.
type TwilioPhoneNumber ¶ added in v0.3.0
type TwilioPhoneNumber struct { ID string `json:"id"` OrgID string `json:"orgId"` Number string `json:"number"` CreatedAt string `json:"createdAt"` UpdatedAt string `json:"updatedAt"` TwilioAccountSid string `json:"twilioAccountSid"` TwilioAuthToken string `json:"twilioAuthToken"` Name string `json:"name"` Provider string `json:"provider"` }
TwilioPhoneNumber represents the structure of a Twilio phone number API response.