Versions in this module Expand all Collapse all v1 v1.5.0 May 21, 2024 Changes in this version + type ClientWrapper struct + Client *req.Client + UploadCallback func(info req.UploadInfo) + type ErrorMessage struct + ErrorCode int + ErrorMessage string type PixelDrainClient + func (pd *PixelDrainClient) SetUploadCallback(callback func(info req.UploadInfo)) v1.4.1 Oct 18, 2023 v1.4.0 May 16, 2023 v1.3.0 Nov 30, 2022 Changes in this version + type GetUserSubscription struct + FileExpiryDays int + FileSizeLimit int64 + FileViewerBranding bool + ID string + MonthlyTransferCap int + Name string + PricePerTbBandwidth int + PricePerTbStorage int + StorageSpace int + Type string type PixelDrainClient + func (pd *PixelDrainClient) GetUser(r *RequestGetUser) (*ResponseGetUser, error) + type RequestGetUser struct + Auth Auth + URL string + type ResponseGetUser struct + BalanceMicroEur int + Email string + FileEmbedDomains string + FileViewerBranding interface{} + HotlinkingEnabled bool + IsAdmin bool + MonthlyTransferCap int + MonthlyTransferUsed int + SkipFileViewer bool + StorageSpaceUsed int + Subscription GetUserSubscription + Username string v1.2.1 Jun 28, 2022 Changes in this version + const APIURL + const BaseURL + const DefaultUserAgent + const ErrMissingFileID + const ErrMissingFilename + const ErrMissingPathToFile + const Name + func MockFileUploadServer() *httptest.Server + type Auth struct + APIKey string + func (a *Auth) IsAuthAvailable() bool + type Client struct + Header req.Header + Request *req.Req + type ClientOptions struct + Debug bool + EnableCookies bool + EnableInsecureTLS bool + ProxyURL string + Timeout time.Duration + type FileGetList struct + BandwidthUsed int + DateCreated time.Time + DateLastView time.Time + Description string + DetailHref string + ID string + MimeType string + Name string + Size int + Success bool + ThumbnailHref string + Views int + type FileGetUser struct + AbuseReporterName string + AbuseType string + AllowVideoPlayer bool + Availability string + AvailabilityMessage string + BandwidthUsed int + BandwidthUsedPaid int + CanEdit bool + DateLastView time.Time + DateUpload time.Time + DownloadSpeedLimit int + Downloads int + HashSha256 string + ID string + MimeType string + Name string + ShowAds bool + Size int + ThumbnailHref string + Views int + type ListFile struct + Description string + ID string + type ListsGetUser struct + CanEdit bool + DateCreated time.Time + FileCount int + Files interface{} + ID string + Title string + type PixelDrainClient struct + Client *Client + Debug bool + func New(opt *ClientOptions, c *Client) *PixelDrainClient + func (pd *PixelDrainClient) CreateList(r *RequestCreateList) (*ResponseCreateList, error) + func (pd *PixelDrainClient) Delete(r *RequestDelete) (*ResponseDelete, error) + func (pd *PixelDrainClient) Download(r *RequestDownload) (*ResponseDownload, error) + func (pd *PixelDrainClient) DownloadThumbnail(r *RequestThumbnail) (*ResponseThumbnail, error) + func (pd *PixelDrainClient) GetFileInfo(r *RequestFileInfo) (*ResponseFileInfo, error) + func (pd *PixelDrainClient) GetList(r *RequestGetList) (*ResponseGetList, error) + func (pd *PixelDrainClient) GetUserFiles(r *RequestGetUserFiles) (*ResponseGetUserFiles, error) + func (pd *PixelDrainClient) GetUserLists(r *RequestGetUserLists) (*ResponseGetUserLists, error) + func (pd *PixelDrainClient) UploadPOST(r *RequestUpload) (*ResponseUpload, error) + func (pd *PixelDrainClient) UploadPUT(r *RequestUpload) (*ResponseUpload, error) + type RequestCreateList struct + Anonymous bool + Auth Auth + Files []ListFile + Title string + URL string + type RequestDelete struct + Auth Auth + ID string + URL string + type RequestDownload struct + Auth Auth + ID string + PathToSave string + URL string + type RequestFileInfo struct + Auth Auth + ID string + URL string + type RequestGetList struct + Auth Auth + ID string + URL string + type RequestGetUserFiles struct + Auth Auth + URL string + type RequestGetUserLists struct + Auth Auth + URL string + type RequestThumbnail struct + Auth Auth + Height string + ID string + PathToSave string + URL string + Width string + type RequestUpload struct + Anonymous bool + Auth Auth + File io.ReadCloser + FileName string + PathToFile string + URL string + func (r *RequestUpload) GetFileName() string + type ResponseCreateList struct + ID string + type ResponseDefault struct + Message string + StatusCode int + Success bool + Value string + type ResponseDelete struct + type ResponseDownload struct + FileName string + FilePath string + FileSize int64 + type ResponseFileInfo struct + BandwidthUsed int + BandwidthUsedPaid int + CanEdit bool + DateLastView time.Time + DateUpload time.Time + Downloads int + HashSha256 string + ID string + MimeType string + Name string + Size int + ThumbnailHref string + Views int + type ResponseGetList struct + DateCreated time.Time + Files []FileGetList + ID string + Title string + type ResponseGetUserFiles struct + Files []FileGetUser + type ResponseGetUserLists struct + Lists []ListsGetUser + type ResponseThumbnail struct + FileName string + FilePath string + FileSize int64 + type ResponseUpload struct + ID string + func (rsp *ResponseUpload) GetFileURL() string