http

package
v0.0.0-...-8f1a291 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2022 License: MIT Imports: 7 Imported by: 0

README

Pukcab module: HTTP

Module name: http

This module enables you to download a file and save it as an artifact.

Requirements

None

Configuration

Key Type Description
url string The URL to fetch.
file_name string The output file name to save.
allow_untrusted_certificates boolean (Optional) If true, untrusted certificates are allowed.
headers map string -> string (Optional) Map of headers to add to the HTTP request.

Example

{
    "name": "http",
    "config": {
        "url": "https://github.com/ecnepsnai/pukcab/archive/refs/heads/main.zip",
        "file_name": "pukcab.zip",
        "headers": {
            "X-Example-Header": "Header Value"
        }
    }
}

Documentation

Index

Constants

View Source
const Name = "http"

Variables

This section is empty.

Functions

This section is empty.

Types

type HTTPConfig

type HTTPConfig struct {
	URL                        string            `json:"url"`
	FileName                   string            `json:"file_name"`
	AllowUntrustedCertificates bool              `json:"allow_untrusted_certificates"`
	Headers                    map[string]string `json:"headers"`
}

type HTTPModule

type HTTPModule struct{}

HTTPModule the HTTP pukcab module

func (HTTPModule) Name

func (m HTTPModule) Name() string

func (HTTPModule) Run

func (m HTTPModule) Run(c interface{}) ([]pukcab.File, error)

Jump to

Keyboard shortcuts

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