data

package
v3.3.5 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	REPO_RELEASE = "release"
	REPO_TESTING = "testing"
)

Repository types

View Source
const (
	DB_PRIMARY   = "primary"
	DB_OTHER     = "other"
	DB_FILELISTS = "filelists"
)

DB types

View Source
const (
	ARCH_SRC     = "src"
	ARCH_NOARCH  = "noarch"
	ARCH_I386    = "i386"
	ARCH_I586    = "i586"
	ARCH_I686    = "i686"
	ARCH_X64     = "x86_64"
	ARCH_AARCH64 = "aarch64"
	ARCH_PPC64   = "ppc64"
	ARCH_PPC64LE = "ppc64le"
	ARCH_ARM     = "arm"
	ARCH_ARMV7HL = "armv7hl"
)

Arch names

Variables

ArchList is a slice with supported archs

BinArchList is a slice with supported binary archs

DBList is a slice with names of databases

View Source
var SupportedArchs = map[string]ArchInfo{
	ARCH_SRC:     {"SRPMS", "src", ARCH_FLAG_SRC},
	ARCH_NOARCH:  {"", "noarch", ARCH_FLAG_NOARCH},
	ARCH_I386:    {"i386", "x32", ARCH_FLAG_I386},
	ARCH_I586:    {"i586", "i586", ARCH_FLAG_I586},
	ARCH_I686:    {"i686", "i686", ARCH_FLAG_I686},
	ARCH_X64:     {"x86_64", "x64", ARCH_FLAG_X64},
	ARCH_AARCH64: {"aarch64", "aa64", ARCH_FLAG_AARCH64},
	ARCH_PPC64:   {"ppc64", "p64", ARCH_FLAG_PPC64},
	ARCH_PPC64LE: {"ppc64le", "p64l", ARCH_FLAG_PPC64LE},
	ARCH_ARM:     {"arm", "arm", ARCH_FLAG_ARM},
	ARCH_ARMV7HL: {"armv7hl", "arm7", ARCH_FLAG_ARMV7HL},
}

SupportedArchs is a slice with info about supported archs

Functions

This section is empty.

Types

type ArchFlag

type ArchFlag uint16

ArchInfo is arch flag

const (
	ARCH_FLAG_UNKNOWN ArchFlag = 0
	ARCH_FLAG_SRC     ArchFlag = 1 << iota
	ARCH_FLAG_NOARCH
	ARCH_FLAG_I386
	ARCH_FLAG_I586
	ARCH_FLAG_I686
	ARCH_FLAG_X64
	ARCH_FLAG_AARCH64
	ARCH_FLAG_PPC64
	ARCH_FLAG_PPC64LE
	ARCH_FLAG_ARM
	ARCH_FLAG_ARMV7HL
)

Arch flags

func (ArchFlag) Has

func (f ArchFlag) Has(flag ArchFlag) bool

Has returns true if flag contains given arch flag

func (ArchFlag) String

func (f ArchFlag) String() string

String returns string representation of supported archs

type ArchInfo

type ArchInfo struct {
	Dir  string
	Tag  string
	Flag ArchFlag
}

ArchInfo contains info about specific arch

type CompFlag

type CompFlag uint8

CompFlag is comparison flag

const (
	COMP_FLAG_ANY CompFlag = 0
	COMP_FLAG_EQ  CompFlag = 1 // =
	COMP_FLAG_LT  CompFlag = 2 // <
	COMP_FLAG_LE  CompFlag = 3 // <=
	COMP_FLAG_GT  CompFlag = 4 // >
	COMP_FLAG_GE  CompFlag = 5 // >=
)

Comparison flags

func ParseComp

func ParseComp(v string) CompFlag

ParseComp parses text value of flag

func (CompFlag) String

func (f CompFlag) String() string

String returns string representation of comparison flag

type Dependency

type Dependency struct {
	Name    string
	Epoch   string
	Version string
	Release string
	Flag    CompFlag
}

Dependency contains info about dependency

type PkgKeyIndex

type PkgKeyIndex map[string]PkgKeyMap

PkgKeyIndex is map with packages keys for every supported arch

func NewPkgKeyIndex

func NewPkgKeyIndex() PkgKeyIndex

NewPkgKeyIndex creates new index

func (PkgKeyIndex) Drop

func (i PkgKeyIndex) Drop(arch string)

Drop removes all data for given arch from index

func (PkgKeyIndex) HasArch

func (i PkgKeyIndex) HasArch(arch string) bool

HasArch returns true if index contains keys for given arch

func (PkgKeyIndex) HasData

func (i PkgKeyIndex) HasData() bool

HasData returns true if index contains any data

func (PkgKeyIndex) IgnoreArch

func (i PkgKeyIndex) IgnoreArch(arch string) bool

IgnoreArch returns true if given arch was added to index, but then dropped

func (PkgKeyIndex) Intersect

func (i PkgKeyIndex) Intersect(arch string, src PkgKeyMap)

Intersect finds intersection between two maps

func (PkgKeyIndex) List

func (i PkgKeyIndex) List(arch string) string

List converts key map to list with keys

type PkgKeyMap

type PkgKeyMap map[int]bool

PkgKeyMap is map with packages keys

func NewPkgKeyMap

func NewPkgKeyMap() PkgKeyMap

NewPkgKeyMap creates new key map

func (PkgKeyMap) Set

func (m PkgKeyMap) Set(key int)

Set adds key to map

Jump to

Keyboard shortcuts

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