http

package
v1.4.6 Latest Latest
Warning

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

Go to latest
Published: May 22, 2023 License: Apache-2.0 Imports: 13 Imported by: 1

README

HTTP Stow Implementation

Location = endpoint

Container =

Item =

e.g.: https://mydomain.com//

Dev Notes

The init function of every implementation of stow must call stow.Register.

stow.Register accepts a few things:

Kind, a string argument respresenting the name of the location.

makefn a function that accepts any type that conforms to the stow.Config interface. It first validates the values of the Config argument, and then attempts to use the configuration to create a new client. If successful, An instance of a data type that conforms to the stow.Location interface is created. This Location should have fields that contain the client and configuration.

Further calls in the hierarchy of a Location, Container, and Item depend on the values of the configuration + the client to send and receive information.

  • kingmatchfn a function that ensures that a given URL matches the Kind of the type of storage.

*stow.Register(kind string, makefn func(Config) (Locaion, error), kindmatchfn func(url.URL) bool)

  • Adds kind and makefn into a map that contains a list of locations.

  • Adds kind to a slice that contains all of the different kinds.

  • Adds kind as part of an anonymous function which validates the scheme of the url.URL

Once the stow.Register function is completed, a location of the given kind is returned.


Documentation

Overview

Package provide basic http client for simpe storage Use case for using it you would like to donwolad object from url https://mydomain.com/<container>/<item>

Index

Constants

View Source
const (
	// ConfigAuthType is an optional argument that defines whether to use an IAM role or access key based auth
	ConfigUrl = "url"

	// ConfigAccessKeyID is one key of a pair of AWS credentials.
	ConfigHeader = "headers"
)
View Source
const Kind = "http"

Kind represents the name of the location/storage type.

Variables

This section is empty.

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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