debian

package
v0.0.0-...-552d98a Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2020 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ControlFileReader

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

ControlFileReader reads Paragraphs from a control file

func NewControlFileReader

func NewControlFileReader(r io.Reader) *ControlFileReader

NewControlFileReader creates a new ControlFileReader

func (*ControlFileReader) Read

func (r *ControlFileReader) Read() (par Paragraph, ok bool)

Read the next paragraph from the control file

type Paragraph

type Paragraph map[string]string

Paragraph consist of a series of fields. Field names are unique for a paragraph.

func (Paragraph) Filename

func (p Paragraph) Filename() string

Filename return the 'Filename' field value from the paragraph

func (Paragraph) Package

func (p Paragraph) Package() string

Package return the 'Package' field value from the paragraph

func (Paragraph) Version

func (p Paragraph) Version() string

Version return the 'Version' field value from the paragraph

type Repository

type Repository interface {
	// Release reads the InRelease file from the repository
	Release(ctx context.Context, dist string) (io.ReadCloser, error)

	// Index reads the Index file for a disttribution/component/architecture
	Index(ctx context.Context, dist, comp, arch, compression string) (io.ReadCloser, error)

	// File reads the deb package
	File(ctx context.Context, path string) (io.ReadCloser, *model.Package, error)
}

Repository is a Debian repositry

func NewClient

func NewClient(url string) Repository

NewClient initialize a new Debian client repository

func NewRemote

func NewRemote(url string, storage driver.StorageDriver) Repository

NewRemote initialize a remote repository

type Server

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

Server is a HTTP debian repository

func NewServer

func NewServer(name string, url *url.URL, repo Repository) *Server

NewServer creates a new server that delegate requests to a repository

func (*Server) Mount

func (srv *Server) Mount(route *mux.Route)

Mount the server routes

Jump to

Keyboard shortcuts

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