Documentation
¶
Index ¶
- Constants
- type PathManager
- func (p *PathManager) CachedSignature(manifestDigest, signatureDigest digest.Digest) string
- func (p *PathManager) CachedSignatureRoot(manifestDigest digest.Digest) string
- func (p *PathManager) CachedSignatureStoreDirPath() string
- func (p *PathManager) Config() string
- func (p *PathManager) Localkey(name string) (keyPath, certPath string)
- func (p *PathManager) SigningKeyConfig() string
- func (p *PathManager) TrustPolicy() string
- func (p *PathManager) X509TrustStore(prefix, namedStore string) string
- type RootedFS
- type UnionDirFS
Constants ¶
const ( // ConfigFile is the name of config file ConfigFile = "config.json" // LocalCertificateExtension defines the extension of the certificate files LocalCertificateExtension = ".crt" // LocalKeyExtension defines the extension of the key files LocalKeyExtension = ".key" // LocalKeysDir is the directory name for local key store LocalKeysDir = "localkeys" // SignatureExtension defines the extension of the signature files SignatureExtension = ".sig" // SignatureStoreDirName is the name of the signature store directory SignatureStoreDirName = "signatures" // SigningKeysFile is the file name of signing key info SigningKeysFile = "signingkeys.json" // TrustPolicyFile is the file name of trust policy info TrustPolicyFile = "trustpolicy.json" // TrustStoreDir is the directory name of trust store TrustStoreDir = "truststore" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PathManager ¶
type PathManager struct {
ConfigFS UnionDirFS
CacheFS UnionDirFS
LibexecFS UnionDirFS
UserConfigFS UnionDirFS
}
PathManager contains the union directory file system and methods to access paths of notation
var ( // Path is a PathManager pointer Path *PathManager )
func (*PathManager) CachedSignature ¶
func (p *PathManager) CachedSignature(manifestDigest, signatureDigest digest.Digest) string
CachedSignature returns the cached signature file path
func (*PathManager) CachedSignatureRoot ¶
func (p *PathManager) CachedSignatureRoot(manifestDigest digest.Digest) string
CachedSignatureRoot returns the cached signature root path
func (*PathManager) CachedSignatureStoreDirPath ¶
func (p *PathManager) CachedSignatureStoreDirPath() string
CachedSignatureStoreDirPath returns the cached signing keys directory
func (*PathManager) Config ¶
func (p *PathManager) Config() string
Config returns the path of config.json
func (*PathManager) Localkey ¶
func (p *PathManager) Localkey(name string) (keyPath, certPath string)
LocalKey returns path of the local private key and it's certificate in the localkeys directory
func (*PathManager) SigningKeyConfig ¶
func (p *PathManager) SigningKeyConfig() string
SigningKeyConfig return the path of signingkeys.json files
func (*PathManager) TrustPolicy ¶
func (p *PathManager) TrustPolicy() string
TrustPolicy returns the path of trustpolicy.json file
func (*PathManager) X509TrustStore ¶
func (p *PathManager) X509TrustStore(prefix, namedStore string) string
X509TrustStore returns the path of x509 trust store certificate
type UnionDirFS ¶
type UnionDirFS interface {
fs.ReadDirFS
// GetPath returns the path of the named file or directory under the FS
GetPath(elem ...string) (string, error)
}
UnionDirFS is a simple union directory file system interface
func NewUnionDirFS ¶
func NewUnionDirFS(rootedFsys ...RootedFS) UnionDirFS
NewUnionDirFS create an unionDirFS by rootedFS
func PluginFS ¶
func PluginFS(dirs ...string) UnionDirFS
PluginFS returns the UnionDirFS for notation plugins if dirs is set, use dirs as the directories for plugins if dirs is not set, use build-in directory structure for plugins