httputilsparameteroptions

package
v0.414.0 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2025 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DownloadAsFileOptions

type DownloadAsFileOptions struct {
	RequestOptions    *RequestOptions
	OutputPath        string
	OverwriteExisting bool

	// If Sha256Sum is set:
	// - The download will be skipped if OutputPath has already the expected content.
	// - The download is validated.
	Sha256Sum string
}

func NewDownloadAsFileOptions

func NewDownloadAsFileOptions() (d *DownloadAsFileOptions)

func (*DownloadAsFileOptions) GetDeepCopy

func (d *DownloadAsFileOptions) GetDeepCopy() (copy *DownloadAsFileOptions)

func (*DownloadAsFileOptions) GetOutputPath

func (d *DownloadAsFileOptions) GetOutputPath() (outputPath string, err error)

func (*DownloadAsFileOptions) GetOverwriteExisting

func (d *DownloadAsFileOptions) GetOverwriteExisting() (overwriteExisting bool)

func (*DownloadAsFileOptions) GetRequestOptions

func (d *DownloadAsFileOptions) GetRequestOptions() (requestOptions *RequestOptions, err error)

func (*DownloadAsFileOptions) SetOutputPath

func (d *DownloadAsFileOptions) SetOutputPath(outputPath string) (err error)

func (*DownloadAsFileOptions) SetOverwriteExisting

func (d *DownloadAsFileOptions) SetOverwriteExisting(overwriteExisting bool)

func (*DownloadAsFileOptions) SetRequestOptions

func (d *DownloadAsFileOptions) SetRequestOptions(requestOptions *RequestOptions) (err error)

type RequestOptions

type RequestOptions struct {
	// Url to request
	Url string

	// Port to use.
	// Overrides the port defined in URL if specified.
	Port int

	// Request method like GET, POST...
	Method string

	// Skip TLS validation
	SkipTLSvalidation bool
}

func NewRequestOptions

func NewRequestOptions() (r *RequestOptions)

func (*RequestOptions) GetDeepCopy

func (r *RequestOptions) GetDeepCopy() (copy *RequestOptions)

func (*RequestOptions) GetMethod

func (r *RequestOptions) GetMethod() (method string, err error)

func (*RequestOptions) GetMethodOrDefault

func (r *RequestOptions) GetMethodOrDefault() (method string, err error)

func (*RequestOptions) GetPort

func (r *RequestOptions) GetPort() (port int, err error)

func (*RequestOptions) GetSkipTLSvalidation

func (r *RequestOptions) GetSkipTLSvalidation() (skipTLSvalidation bool)

func (*RequestOptions) GetUrl

func (r *RequestOptions) GetUrl() (url string, err error)

func (*RequestOptions) IsMethodSet

func (r *RequestOptions) IsMethodSet() (isSet bool)

func (*RequestOptions) SetMethod

func (r *RequestOptions) SetMethod(method string) (err error)

func (*RequestOptions) SetPort

func (r *RequestOptions) SetPort(port int) (err error)

func (*RequestOptions) SetSkipTLSvalidation

func (r *RequestOptions) SetSkipTLSvalidation(skipTLSvalidation bool)

func (*RequestOptions) SetUrl

func (r *RequestOptions) SetUrl(url string) (err error)

Jump to

Keyboard shortcuts

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