uploader

package
v0.0.0-...-a0e9b24 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 23, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package uploader provides an abstraction for uploading images to a destination and retrieving a publicly accessible URL for the uploaded content.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Uploader

type Uploader interface {
	// Upload uploads the provided image with the specified name to a destination
	// and returns a publicly accessible URL for the uploaded image.
	//
	// Parameters:
	//   ctx: The context for managing request deadlines, cancellation signals,
	//        and other request-scoped values.
	//   name: The desired name or identifier for the uploaded image.
	//   img: The image.Image object representing the image to upload.
	//
	// Returns:
	//   string: A publicly accessible URL where the uploaded image can be accessed.
	//   error: An error object if the upload fails, or nil if the operation is successful.
	Upload(ctx context.Context, name string, img image.Image) (string, error)
}

Uploader defines an interface for uploading images to a destination. Implementations of this interface should ensure the uploaded images are accessible via a publicly available URL.

Directories

Path Synopsis
Package ngrok provides functionality to expose a locally hosted image to the public internet using ngrok tunneling.
Package ngrok provides functionality to expose a locally hosted image to the public internet using ngrok tunneling.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL