gurl

command module
v0.0.0-...-af1b242 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2022 License: Apache-2.0 Imports: 17 Imported by: 0

README

gURL - A cURL replacement developed in Go

gURL

This is developed because, the default curl binary provided via the Alpine packages registry doesn't support kerberos authentication.

NOTE: It supports just the GET method currently


gURL can be statically compiled for Linux

env CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -mod=vendor -a -installsuffix cgo -gcflags=all='-l -B' -ldflags '-s -w' -o gurl

Building the docker container

docker build --build-arg BASE_IMAGE_VERSION=3.16 --build-arg ALPINE_VERSION=3.16 --build-arg GO_VERSION=1.19 -t gurl:latest .

Options

Flags: 
    --version              Displays the program version string.
-h --help                 Displays help with available flag, subcommand, and positional value parameters.
-l --url                  URL to make request
-X --type                 HTTP request type to use (default: GET)
-k --kerberized           Is Kerberos enabled for the URL
-kt --keytab-path          Kerberos Keytab Path (default: /etc/security/hdfs-headless.keytab)
-kp --kerberos-principle   Kerberos principle to use with keytab (default: hdfs@ACME.ORG)
-ts --ts-format            Timestamp format klist uses in 'Go Time Format'. Example: 'mm/dd/yyyy' => '01/02/2006' (default: 02/01/2006)
-u --basic-auth           Is Basic Auth Enabled for the URL
-ev --enforce-tls-verify   Enforce TLS certification verification
-ua --user-agent           User Agent to be set for the client requests (default: curl/7.29.0)
-o --output-file          Write the request response to a file


Usage

gurl -X GET -ev -ua "gurl/0.0.1" -l "https://acceldata.io/" -o /tmp/output
gurl -X GET -ua "gurl/0.0.1" -u "username:secret" -k -kt /etc/security/hdfs-headless.keytab -kp hdfs@ACME.ORG -ts '01/02/2006' -l "http://node.acme.org:9871/"

Documentation

Overview

Acceldata Inc. and its affiliates.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

	Unless required by applicable law or agreed to in writing, software

distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Jump to

Keyboard shortcuts

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