sdstore

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2018 License: BSD-3-Clause Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Unzip added in v0.0.6

func Unzip(src string, dest string) ([]string, error)

Taken from https://golangcode.com/unzip-files-in-go/

Types

type SDError

type SDError struct {
	StatusCode int    `json:"statusCode"`
	Reason     string `json:"error"`
	Message    string `json:"message"`
}

SDError is an error response from the Screwdriver API

func (SDError) Error

func (e SDError) Error() string

Error implements the error interface for SDError

type SDStore

type SDStore interface {
	Upload(u *url.URL, filePath string, toCompress bool) error
	Download(url *url.URL, toExtract bool) ([]byte, error)
	Remove(url *url.URL) error
}

SDStore is able to upload, download, and remove the contents of a Reader to the SD Store

func NewStore

func NewStore(token string) SDStore

NewStore returns an SDStore instance.

Jump to

Keyboard shortcuts

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