Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // path that houses config, lockfile, etc ConfigPath = "/etc/pakket" // Path to main pakket config ConfigFile = path.Join(ConfigPath, "config.toml") // Path to lockfile w/ currently installed packages LockfilePath = path.Join(ConfigPath, "lockfile.toml") // Path to local database LocalPath = path.Join(ConfigPath, "local") )
Functions ¶
func GetLockfile ¶
func GetLockfile() (err error)
func WriteConfig ¶
func WriteConfig() (err error)
Types ¶
type ConfigStruct ¶
type ConfigStruct struct { Mirrors []Mirror `toml:"mirrors"` Community bool `toml:"community"` Paths Paths `toml:"paths"` }
var ( // Config C ConfigStruct )
type LockfileMetadata ¶
type LockfileMetadata struct { Name string `toml:"name"` Version string `toml:"version"` Checksum string `toml:"checksum"` Repository string `toml:"repository"` }
func NewMetadata ¶
func NewMetadata(name, version, checksum, repository string) LockfileMetadata
type LockfileStruct ¶
type LockfileStruct struct {
Packages map[string]LockfileMetadata `toml:"packages" mapstructure:"packages"`
}
var (
Lockfile LockfileStruct
)
func (*LockfileStruct) Add ¶
func (lock *LockfileStruct) Add(metadata LockfileMetadata, files []string) (err error)
Add package information to lockfile
func (*LockfileStruct) Exists ¶
func (lock *LockfileStruct) Exists(pkgName string) bool
func (*LockfileStruct) Remove ¶
func (lock *LockfileStruct) Remove(name string) (lockfileData *LockfileMetadata, files []string, err error)
Remove package information from lockfile
Click to show internal directories.
Click to hide internal directories.