Versions in this module Expand all Collapse all v0 v0.1.1 Sep 17, 2026 Changes in this version + const MaxConcurrentPuts v0.1.0 Sep 16, 2026 Changes in this version + const DefaultAPIBase + const DefaultCDNBase + const MaxFilesPerRequest + const MaxSizesPerRequest + const Version + func BuildRawURL(cdnBase, project, imageKey string) string + func BuildSrcSet(cdnBase, project, imageKey string, opts SrcSetOptions) string + func BuildURL(cdnBase, project, imageKey string, opts Options) string + func GuessContentType(filename, headerType string) string + func IsURL(src string) bool + func RewriteURL(src string, opts Options) string + func SanitizeFilename(name string) string + func SizesAttr(maxWidth int) string + func SrcSetFromURL(src string, opts SrcSetOptions) string + type Client struct + func New(cfg Config) (*Client, error) + func (c *Client) Configured() bool + func (c *Client) Delete(ctx context.Context, imageKey string) error + func (c *Client) ListImages(ctx context.Context, params ListImagesParams) (*ListImagesResponse, error) + func (c *Client) ListProjects(ctx context.Context) ([]Project, error) + func (c *Client) Moderate(ctx context.Context, imageKey string) (*ModerationResult, error) + func (c *Client) Presign(ctx context.Context, filename, contentType string, sizes []Size) (*PresignResult, error) + func (c *Client) PresignMany(ctx context.Context, files []FileSpec, sizes []Size) ([]PresignResult, error) + func (c *Client) PublicURL(imageKey string) string + func (c *Client) Put(ctx context.Context, uploadURL, contentType string, body io.Reader) error + func (c *Client) RawURL(imageKey string) string + func (c *Client) SrcSet(imageKey string, opts SrcSetOptions) string + func (c *Client) URL(imageKey string, opts Options) string + func (c *Client) Upload(ctx context.Context, file Upload) (*UploadResult, error) + func (c *Client) UploadMany(ctx context.Context, files []Upload) ([]UploadResult, error) + type Config struct + APIBase string + APIKey string + CDNBase string + HTTPClient *http.Client + Project string + type Error struct + Message string + Op string + Status int + func (e *Error) Error() string + type FileSpec struct + ContentType string + Filename string + type Image struct + CacheVersion int + ContentType string + ImageKey string + OriginalSizeBytes int64 + S3RawKey string + UploadedAt string + VariationsGeneratedCount int + type ListImagesParams struct + Folder string + Limit int + NextToken string + type ListImagesResponse struct + Folder string + Images []Image + NextToken string + type ModerationLabel struct + Confidence float64 + Name string + Parent string + type ModerationResult struct + Labels []ModerationLabel + Moderation string + Reason string + type Options struct + Fill string + Fit string + Fmt string + Format string + Height int + Pos string + Position string + Quality string + Version int + Width int + type PresignResult struct + ExpiresInSecs int + Filename string + S3Key string + UploadURL string + type Project struct + CreatedAt string + ProjectName string + Slug string + TeamID string + type Size struct + Fill string + Fit string + Fmt string + Height int + Pos string + Quality string + Width int + func SizesForWidths(widths []int) []Size + type SrcSetOptions struct + MaxWidth int + MinWidth int + Options Options + SnapStep int + Widths []int + type Upload struct + Body io.Reader + Bytes []byte + ContentType string + Filename string + Path string + Sizes []Size + type UploadResult struct + CDNURL string + Filename string + ImageKey string + S3Key string