upload

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options struct {
	Backend     string
	Format      string
	Title       string
	Description string
	Tags        []string
	Alt         string
	Private     bool
}

Options for upload

type Result

type Result struct {
	PhotoID         string
	PhotoURL        string
	DirectURL       string
	EditURL         string
	FormattedOutput string
}

Result of an upload

type Service

type Service struct {
	// contains filtered or unexported fields
}

Service implements the Uploader interface

func New

func New(cfg *config.Config) *Service

New creates a new upload service

func (*Service) Upload

func (s *Service) Upload(ctx context.Context, imagePath string, opts Options) (*Result, error)

Upload performs the upload to the specified backend

type Uploader

type Uploader interface {
	Upload(ctx context.Context, imagePath string, opts Options) (*Result, error)
}

Uploader interface for GUI server

Jump to

Keyboard shortcuts

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