storage

package
v0.0.0-...-69a18a5 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2018 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Identifier

type Identifier struct {
	Key       string `json:"key"`
	Separator string `json:"separator"`
}

Identifier : Basic building block of the index.

type Storage

type Storage interface {
	DownloadArtifactToStorage(uri string, id Identifier, codes ...int) (int, error)
	ServeFile(w http.ResponseWriter, r *http.Request, id Identifier)
	GetArtifacts() []Identifier
	SaveArtifact(w http.ResponseWriter, r *http.Request, id Identifier)
}

Storage : Interface for the Storage Core Module

func BuildStorage

func BuildStorage(storageConfigKey string) Storage

BuildStorage : Returns an initialised storage based on the config key.

func NewStorageLocal

func NewStorageLocal(path string) Storage

NewStorageLocal : Creates a new Storage module which uses the local disk.

Jump to

Keyboard shortcuts

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