helpers

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: May 17, 2017 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DataFromCache

func DataFromCache(repoUUID, repoRef string) ([]byte, error)

func DataToCache

func DataToCache(src []byte, repoUUID, repoRef string) (string, error)

For a given GitLab project archive, calculate sha1 hash and put archive to cache. sha1 hash is mandatory for npm.

func GetTokenFromRequest

func GetTokenFromRequest(r *http.Request) string

func TarGzToZip

func TarGzToZip(src []byte, repoUUID, repoRef string) ([]byte, error)

GitLab serves repository archive as tar.gz archive so, for composer:

  • repack gitlab archive: ungzip -> untar -> zip
  • cleanup all temporary files and directories
  • return zip archive bytes
  • cache archive forever

Types

This section is empty.

Jump to

Keyboard shortcuts

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