reporeader

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2018 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const IndexYaml = "index.yaml"

Variables

This section is empty.

Functions

This section is empty.

Types

type Err

type Err error
var (
	ErrGetIndexYamlFailed   Err = fmt.Errorf("get index.yaml failed")
	ErrParseUrlFailed       Err = fmt.Errorf("parse url failed")
	ErrDecodeJsonFailed     Err = fmt.Errorf("decode json failed")
	ErrEmptyAccessKeyId     Err = fmt.Errorf("access key id is empty")
	ErrEmptySecretAccessKey Err = fmt.Errorf("secret access key is empty")
	ErrSchemeNotMatched     Err = fmt.Errorf("scheme not matched")
	ErrInvalidType          Err = fmt.Errorf("invalid repo type")
)

type HttpReader

type HttpReader struct {
	// contains filtered or unexported fields
}

func NewHttpReader

func NewHttpReader(url *neturl.URL) *HttpReader

func (*HttpReader) GetIndexYaml

func (h *HttpReader) GetIndexYaml() ([]byte, error)

type Reader

type Reader interface {
	GetIndexYaml() ([]byte, error)
}

func New

func New(repoType, url, credential string) (Reader, error)

type S3Credential

type S3Credential struct {
	AccessKeyId     string `json:"access_key_id"`
	SecretAccessKey string `json:"secret_access_key"`
}

type S3Reader

type S3Reader struct {
	// contains filtered or unexported fields
}

func NewS3Reader

func NewS3Reader(url *neturl.URL, accessKeyId, secretAccessKey, zone, host, bucket string) *S3Reader

func (*S3Reader) GetIndexYaml

func (s *S3Reader) GetIndexYaml() ([]byte, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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