Versions in this module Expand all Collapse all v0 v0.1.0 Sep 17, 2024 Changes in this version + const DefaultAPIRequestTimeout + const DefaultBarWidth + var ErrFileNotFound = errors.New("file not found") + var ErrInvalidToken = errors.New("invalid token") + var Now func() time.Time + func CheckExpiration(token string) (expired bool, err error) + func Whoami(token string) (email string, expirationTime time.Time, err error) + type APIError struct + Err bool + Message string + type Box struct + CapacityMb int64 + RemainingMb int64 + UsedMb int64 + type ClientEphemeralfiles struct + func NewClient(token string) *ClientEphemeralfiles + func (c *ClientEphemeralfiles) DisableProgressBar() + func (c *ClientEphemeralfiles) Download(uuidFile string, outputfile string) error + func (c *ClientEphemeralfiles) DownloadEndpoint(uuidFile string) string + func (c *ClientEphemeralfiles) Fetch() (FileList, error) + func (c *ClientEphemeralfiles) FilesEndpoint() string + func (c *ClientEphemeralfiles) GetBoxInfos() (*Box, error) + func (c *ClientEphemeralfiles) Remove(uuidFileToRemove string) error + func (c *ClientEphemeralfiles) SetEndpoint(endpoint string) + func (c *ClientEphemeralfiles) SetHTTPClient(client *http.Client) + func (c *ClientEphemeralfiles) Upload(fileToUpload string) error + func (c *ClientEphemeralfiles) UploadEndpoint() string + func (c *ClientEphemeralfiles) UploadWithProgressBar(fileToUpload string) error + func (c *ClientEphemeralfiles) UploadWithoutProgressBar(fileToUpload string) error + type File struct + ExpirationDate time.Time + FileName string + Idfile string + Size int64 + UpdateDateBegin time.Time + UpdateDateEnd time.Time + type FileList []File + func (fl *FileList) Print() error + func (fl *FileList) PrintCSV() error + func (fl *FileList) PrintJSON() error + func (fl *FileList) PrintYAML() error