common

package
v1.0.14-0...-56f5250 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2023 License: Apache-2.0 Imports: 9 Imported by: 11

Documentation

Index

Constants

This section is empty.

Variables

View Source
var HttpClient = &http.Client{
	Transport: &http.Transport{
		MaxIdleConns:        50,
		MaxConnsPerHost:     50,
		MaxIdleConnsPerHost: 50,
		IdleConnTimeout:     30 * time.Second,
		TLSClientConfig: &tls.Config{
			InsecureSkipVerify: false,
		},
	},
	Timeout: 60 * time.Second,
}

Functions

func CreateTemp

func CreateTemp(pattern string) *os.File

func DownloadUrlFromRepos

func DownloadUrlFromRepos(route string, do func(repo RepoConfig, r io.Reader), repos ...RepoConfig) bool

func InitHttpClient

func InitHttpClient(insecure bool)

func MkdirTemp

func MkdirTemp(pattern string) string

Types

type RepoConfig

type RepoConfig struct {
	Url      string `json:"url"`
	Username string `json:"username"`
	Password string `json:"password"`
}

func TrimRepo

func TrimRepo(repos ...RepoConfig) []RepoConfig

Jump to

Keyboard shortcuts

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