blob: f0405e38488e9a98ef41a830d2f77891537b2ab1 [file] [log] [blame]
// Copyright 2018 The LUCI Authors.
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// See the License for the specific language governing permissions and
// limitations under the License.
package cipd
// Alias some types from various CIPD packages to make public facing API look
// more uniform. We can't put all types directly into 'cipd' package due to
// dependency cycles.
import (
// ParanoidMode specifies how paranoid EnsurePackages should be.
type ParanoidMode = deployer.ParanoidMode
const (
// NotParanoid indicates that EnsurePackages should trust its metadata
// directory: if a package is marked as installed there, it should be
// considered correctly installed in the site root too.
NotParanoid = deployer.NotParanoid
// CheckPresence indicates that CheckDeployed should verify all files
// that are supposed to be installed into the site root are indeed present
// there, and reinstall ones that are missing.
// Note that it will not check file's content or file mode. Only its presence.
CheckPresence = deployer.CheckPresence
// CheckIntegrity indicates that CIPD client should verify all files installed
// in the site root have correct content (based on their hashes).
// CIPD will use information from 'stat' to skip rechecking hashes all the
// time. Only files modified (based on 'stat') since they were installed are
// checked.
CheckIntegrity = deployer.CheckIntegrity
// ManifestMode is used to indicate presence of absence of manifest when calling
// various functions.
// Just to improve code readability, since Func(..., WithManifest) is less
// cryptic than Func(..., true).
type ManifestMode = pkg.ManifestMode
const (
// WithoutManifest indicates the function should skip manifest.
WithoutManifest = pkg.WithoutManifest
// WithManifest indicates the function should handle manifest.
WithManifest = pkg.WithManifest