registry

package
v0.0.0-...-4a904d8 Latest Latest
Warning

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

Go to latest
Published: May 8, 2022 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Entry

type Entry struct {
	Key      string
	SearchBy string
}

type ModIndex

type ModIndex []Entry

func (ModIndex) Len

func (entry ModIndex) Len() int

func (ModIndex) Less

func (entry ModIndex) Less(i, j int) bool

func (ModIndex) Swap

func (entry ModIndex) Swap(i, j int)

type Registry

type Registry struct {
	TotalModMap      map[string][]ckan.Ckan
	CompatibleModMap map[string][]ckan.Ckan
	UnsortedModMap   map[string]ckan.Ckan
	SortedModMap     map[string]ckan.Ckan
	ModMapIndex      ModIndex
	InstalledModList map[string]ckan.Ckan
	DB               *database.CkanDB
	SortOptions      SortOptions
	Queue            queue.Queue
	// contains filtered or unexported fields
}

func New

func New() Registry

Initializes database and registry

func (*Registry) AddToQueue

func (r *Registry) AddToQueue(mod ckan.Ckan) error

func (*Registry) BuildQueueIndex

func (r *Registry) BuildQueueIndex()

func (*Registry) BuildSearchIndex

func (r *Registry) BuildSearchIndex(s string) (ModIndex, error)

func (*Registry) CheckDependencies

func (r *Registry) CheckDependencies(mod ckan.Ckan) (map[string]ckan.Ckan, error)

Gather list of mods and dependencies for download

func (*Registry) DownloadMods

func (r *Registry) DownloadMods() error

Download selected mods

func (*Registry) GetEntireModList

func (r *Registry) GetEntireModList() map[string][]ckan.Ckan

Get list of Ckan objects from database

func (*Registry) GetTempDir

func (r *Registry) GetTempDir() string

func (*Registry) InstallMods

func (r *Registry) InstallMods() error

Install mods in the registry install queue

func (*Registry) RemoveMods

func (r *Registry) RemoveMods() error

func (*Registry) SetModIndex

func (r *Registry) SetModIndex(modMap ModIndex)

func (*Registry) SetTempDir

func (r *Registry) SetTempDir(s string)

func (*Registry) SortModList

func (r *Registry) SortModList() error

type SortOptions

type SortOptions struct {
	SortTag   string
	SortOrder string
}

Jump to

Keyboard shortcuts

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