repository

package
v0.0.0-...-b2eb650 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package repository defines the operations on the remote instance linux software packages repository.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Debian

type Debian struct {
	SSHClient ssh.Interface
}

Debian is a repository manager implementation for Debian.

func NewDeb

func NewDeb(sshClient ssh.Interface) *Debian

NewDeb returns a new Debian repository manager.

func (*Debian) Add

func (d *Debian) Add(path string) error

Add adds a local repository using the iso file.

func (*Debian) Install

func (d *Debian) Install(pkg ...string) error

Install installs common packages.

func (*Debian) Update

func (d *Debian) Update() error

Update updates the repository cache.

type RedhatPackageManager

type RedhatPackageManager struct {
	SSHClient ssh.Interface
}

RedhatPackageManager is a repository manager implementation for Redhat, Centos.

func NewRPM

func NewRPM(sshClient ssh.Interface) *RedhatPackageManager

NewRPM returns a new RedhatPackageManager.

func (*RedhatPackageManager) Add

func (r *RedhatPackageManager) Add(path string) error

Add adds a local repository using the iso file.

func (*RedhatPackageManager) Install

func (r *RedhatPackageManager) Install(pkg ...string) error

Install installs common packages.

func (*RedhatPackageManager) Update

func (r *RedhatPackageManager) Update() error

Update updates the repository cache.

type Service

type Service interface {
	Add(path string) error
	Update() error
	Install(pkg ...string) error
}

Service holds a collection of interfaces. The interfaces are broken down like this to group functions together.

func NewService

func NewService(sshClient ssh.Interface, os *osrelease.Data) Service

NewService returns a new service given the remote instance package manager client.

Jump to

Keyboard shortcuts

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