remoteinput

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultMaxBytes

func DefaultMaxBytes() int64

func DefaultTimeout

func DefaultTimeout() time.Duration

func IsHTTPURL

func IsHTTPURL(value string) bool

func RedactedURL

func RedactedURL(rawURL string) string

func SuggestedName

func SuggestedName(rawURL string) string

Types

type Options

type Options struct {
	MaxBytes int64
	Timeout  time.Duration
	Client   *http.Client
}

type Result

type Result struct {
	SourceURL   string `json:"source_url"`
	FinalURL    string `json:"final_url"`
	LocalPath   string `json:"local_path"`
	Filename    string `json:"filename"`
	ContentType string `json:"content_type"`
	Bytes       int64  `json:"bytes"`
}

func Download

func Download(ctx context.Context, rawURL string, outputDir string, options Options) (Result, error)

Jump to

Keyboard shortcuts

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