Documentation
¶
Index ¶
Constants ¶
View Source
const ( CHECKSUM_MD5 = "md5" CHECKSUM_SHA1 = "sha1" CHECKSUM_SHA224 = "sha224" CHECKSUM_SHA256 = "sha256" CHECKSUM_SHA384 = "sha384" CHECKSUM_SHA512 = "sha512" )
View Source
const ( MDF_SIMPLE = "simple" MDF_UNIQUE = "unique" )
View Source
const ( COMPRESSION_GZ = "gz" COMPRESSION_BZ2 = "bz2" COMPRESSION_XZ = "xz" COMPRESSION_ZSTD = "zstd" )
View Source
const ( PERMS_DIR os.FileMode = 0755 // Default permissions for directories PERMS_FILE os.FileMode = 0644 // Default permissions for files )
Variables ¶
View Source
var CheckSumMethods = []string{ CHECKSUM_MD5, CHECKSUM_SHA1, CHECKSUM_SHA224, CHECKSUM_SHA256, CHECKSUM_SHA384, CHECKSUM_SHA512, }
CheckSumMethods contains all supported checksum methods
View Source
var CompressionMethods = []string{ COMPRESSION_GZ, COMPRESSION_BZ2, COMPRESSION_XZ, COMPRESSION_ZSTD, }
Contains all supported compression methods
View Source
var DefaultOptions = &Options{ Update: true, MDFilenames: MDF_SIMPLE, CompressType: COMPRESSION_BZ2, }
DefaultOptions is default options
View Source
var MDFilenames = []string{ MDF_SIMPLE, MDF_UNIQUE, }
MDFilenames contains all supported types of supported metadata names generation methods
Functions ¶
func IsCreaterepoInstalled ¶
func IsCreaterepoInstalled() bool
IsCreaterepoInstalled returns true if createrepo_c utility is installed on the system
Types ¶
type Options ¶
type Options struct { User string // Repository data directory owner username Group string // Repository data directory owner group DirPerms os.FileMode // Permissions for directories FilePerms os.FileMode // Permissions for files GroupFile string // Path to groupfile to include in metadata CheckSum string // Checksum used in repomd.xml and for packages in the metadata (default: sha256) MDFilenames string // Include the file's checksum in the filename,helps with proxies (unique/simple) CompressType string // Which compression type to use (default: bz2) Distro string // Distro tag and optional CPE ID Content string // Tags for the content in the repository Revision string // User-specified revision for repository NumDeltas int // The number of older versions to make deltas against ChangelogLimit int // Only import the last N changelog entries Workers int // Number of workers to spawn to read rpms Pretty bool // Make sure all xml generated is formatted Update bool // Use the existing repodata to speed up creation of new repository Split bool // Generate split meta SkipSymlinks bool // Ignore symlinks of packages Deltas bool // Create delta rpms and metadata Zchunk bool // Generate zchunk files as well as the standard repodata }
Options contains options used for generating repository index
func (*Options) GetDirPerms ¶
GetDirPerms returns permissions for directories
func (*Options) GetFilePerms ¶
GetFilePerms returns permissions for files
Click to show internal directories.
Click to hide internal directories.