Documentation ¶
Index ¶
Constants ¶
View Source
const ( QONTAK_FILE_UPLOADER_URI = "/file_uploader" DEFAULT_CONTENT_TYPE = "application/octet-stream" CONTENT_TYPE_PDF = "application/pdf" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service interface { // UploadFromUrl Upload a file to Qontak server, if there is any document you want to send via qontak whatsapp //if there are no content type, the default content type will be application/octet-stream UploadFromUrl(ctx context.Context, filename string, url string) (response *UploadResponse, err error) //UploadFromUrlWithContentType Upload a file with mime type application/octet-stream to Qontak server UploadFromUrlWithContentType(ctx context.Context, filename string, url string, contentType string) (response *UploadResponse, err error) }
type UploadResponse ¶
type UploadResponse struct { Status string `json:"status,omitempty"` Data UploadResponseSuccess `json:"data"` }
type UploadResponseSuccess ¶
Click to show internal directories.
Click to hide internal directories.