services

package
v0.0.0-...-29134ca Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2018 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DownloadService

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

func NewDownloadService

func NewDownloadService(storage Storage) *DownloadService

func (*DownloadService) ListVersions

func (d *DownloadService) ListVersions(module string) ([]string, error)

func (*DownloadService) Mod

func (d *DownloadService) Mod(module string, version *semver.Version) (io.ReadSeeker, *time.Time, error)

func (*DownloadService) Source

func (d *DownloadService) Source(module string, version *semver.Version) (io.ReadSeeker, *time.Time, error)

func (*DownloadService) VersionInfo

func (d *DownloadService) VersionInfo(module string, version *semver.Version) (*api.VersionInfo, error)

type ErrModuleDoesntExist

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

func NewErrModuleDoesntExist

func NewErrModuleDoesntExist(module string) *ErrModuleDoesntExist

func (*ErrModuleDoesntExist) Error

func (e *ErrModuleDoesntExist) Error() string

type Storage

type Storage interface {
	HasModule(module string) bool
	ModuleVersions(module string) ([]string, error)
	VersionInfo(module string, version *semver.Version) (*api.VersionInfo, error)
	Mod(module string, version *semver.Version) (io.ReadSeeker, *time.Time, error)
	Source(module string, version *semver.Version) (io.ReadSeeker, *time.Time, error)
	CreateModuleVersion(module string, version *semver.Version, file io.ReadCloser) error
}

type UploadService

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

func NewUploadService

func NewUploadService(storage Storage) *UploadService

func (*UploadService) CreateModuleVersion

func (s *UploadService) CreateModuleVersion(module string, version *semver.Version, file io.ReadCloser) error

Jump to

Keyboard shortcuts

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