Documentation ¶
Index ¶
- type Adapter
- func (dbAdapter Adapter) AddToRepo(...) error
- func (dbAdapter Adapter) ChangeArchiveURL(name, archiveURL string) error
- func (dbAdapter Adapter) ChangeBuildFilesDir(name, buildFilesDir string) error
- func (dbAdapter Adapter) ChangeDeps(name, dependencies string) error
- func (dbAdapter Adapter) ChangeHash(name, hash string) error
- func (dbAdapter Adapter) ChangePkgDesc(name, description string) error
- func (dbAdapter Adapter) CloseDBConnection() error
- func (dbAdapter Adapter) CreatePkgTable() error
- func (dbAdapter Adapter) GetAllPkgInfo() ([]PkgInfo, error)
- func (dbAdapter Adapter) GetInstalledPkgInfo() ([]PkgInfo, error)
- func (dbAdapter Adapter) GetPkgBuildFilesDir(name string) (string, error)
- func (dbAdapter Adapter) GetPkgInfo(name string) (PkgInfo, error)
- func (dbAdapter Adapter) IsInstalled(name string) (bool, error)
- func (dbAdapter Adapter) IsPkgInRepo(name string) (bool, error)
- func (dbAdapter Adapter) MarkAsInstalled(name string) error
- func (dbAdapter Adapter) MarkAsNotInstalled(name string) error
- func (dbAdapter Adapter) RemovePackage(name string) error
- func (dbAdapter Adapter) RenamePackage(oldName, newName string) error
- func (dbAdapter Adapter) SetInstalledVersion(name, version string) error
- func (dbAdapter Adapter) SyncRepo(...) error
- func (dbAdapter Adapter) UpdateRepoVersion(name, version string) error
- type Package
- type Packages
- type PkgInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Adapter ¶
type Adapter struct {
// contains filtered or unexported fields
}
Adapter implements the DBPort interface.
func NewAdapter ¶
NewAdapter creates a new Adapter.
func (Adapter) AddToRepo ¶
func (dbAdapter Adapter) AddToRepo( name, description, repoVersion, buildFilesDir, archiveURL, hash, dependencies string, ) error
AddToRepo adds a package to the package table in the repo.
func (Adapter) ChangeArchiveURL ¶
ChangeArchiveURL changes the archive url.
func (Adapter) ChangeBuildFilesDir ¶
ChangeBuildFilesDir changes the build files directory for a given package.
func (Adapter) ChangeDeps ¶
ChangeDeps changes a package's dependencies list.
func (Adapter) ChangeHash ¶
ChangeHash changes an archive's hash.
func (Adapter) ChangePkgDesc ¶
ChangePkgDesc changes a given package's description.
func (Adapter) CloseDBConnection ¶
CloseDBConnection closes the db connection.
func (Adapter) CreatePkgTable ¶
CreatePkgTable create the packages table.
func (Adapter) GetAllPkgInfo ¶
GetAllPkgInfo returns the basic information about all packages in the repo.
func (Adapter) GetInstalledPkgInfo ¶
GetInstalledPkgInfo returns the basic information about every installed packages in the repo.
func (Adapter) GetPkgBuildFilesDir ¶
GetPkgBuildFilesDir returns the build files dir for a given package.
func (Adapter) GetPkgInfo ¶
GetPkgInfo returns the basic information about a given package.
func (Adapter) IsInstalled ¶
IsInstalled checks if a given packages is already installed or not.
func (Adapter) IsPkgInRepo ¶
IsPkgInRepo searches the database for a package based on its name.
func (Adapter) MarkAsInstalled ¶
MarkAsInstalled marks a package as installed.
func (Adapter) MarkAsNotInstalled ¶
MarkAsNotInstalled marks a package as installed.
func (Adapter) RemovePackage ¶
RemovePackage removes a given package from the repository.
func (Adapter) RenamePackage ¶
RenamePackage renames a given package.
func (Adapter) SetInstalledVersion ¶
SetInstalledVersion sets the installed version for a package.
func (Adapter) SyncRepo ¶
func (dbAdapter Adapter) SyncRepo( name, description, repoVersion, buildFilesDir, archiveURL, hash, dependencies string, ) error
SyncRepo syncs packages in the database (using the name as the key).
func (Adapter) UpdateRepoVersion ¶
UpdateRepoVersion updates the repo's version of a package.
type Package ¶
type Package struct { Name string `json:"name"` Description string `json:"description"` Version string `json:"version"` BuildFilesDir string `json:"buildFilesDir"` ArchiveURL string `json:"archiveUrl"` Sha512 string `json:"sha512"` Dependencies string `json:"dependencies"` }
Package defines a package in the database.