dl

package
v0.0.0-...-5129a00 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2021 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Address   string
	ErrWriter io.Writer
	OutWriter io.Writer
	Port      string
	Sources   map[platform.Variant]SourceConfig
}

Config instructs Dl how to download source file and where to put it.

type FilesStatus

type FilesStatus struct {
	SourceExists bool
}

FilesStatus groups information about existence of specific platform's source files.

type Server

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

func NewServer

func NewServer(cfg Config) *Server

func (*Server) DownloadPlatformSource

func (s *Server) DownloadPlatformSource(variant platform.Variant, notifier progress.Notifier) error

DownloadPlatformSource downloads neccessary source files related to provided platform. Progress of the process is being reported on the printer.

func (*Server) ServeGRPC

func (s *Server) ServeGRPC() error

type SourceConfig

type SourceConfig struct {
	DirectoryPath   string
	Filepath        string
	ForceRedownload bool
	PlatformName    string
	URL             string
}

Jump to

Keyboard shortcuts

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