Versions in this module Expand all Collapse all v1 v1.0.2 Aug 25, 2023 v1.0.1 Aug 20, 2023 Changes in this version type Image + func NewImageFromFile(name string, ttl uint64, file []byte) (*Image, error) v1.0.0 Aug 18, 2023 Changes in this version + var ErrFileEmpty = errors.New("image file is empty") + var ErrFileSize = errors.New("image is too large (max image size is 32mb)") + type Client struct + func NewClient(client *http.Client, key string) *Client + func (i *Client) Upload(ctx context.Context, img *Image) (Response, error) + type Data struct + DeleteURL string + DisplayURL string + Height int + ID string + Image Info + Medium Info + Size int + TTL int64 + Thumb Info + Time int64 + Title string + URL string + URLViewer string + Width int + type Error struct + Info ErrorInfo + StatusCode int + StatusText string + func (e Error) Error() string + type ErrorInfo struct + Code int + Context string + Message string + type Image struct + func NewImage(name string, ttl uint64, file []byte) (*Image, error) + type Info struct + Extension string + Filename string + Mime string + Name string + URL string + type Response struct + Data Data + StatusCode int + Success bool