Documentation ¶
Index ¶
- Constants
- func FilterPackagesByArch(osarch *zps.OsArch, zpkgs map[string]*zps.Pkg) ([]string, []*zps.Pkg)
- func MergeTemplateConfig(pkgTpls []*action.Template, cfgTpls []*config.TplConfig) []*action.Template
- func PublisherFromUri(uri *url.URL) string
- func SafeURI(uri *url.URL) string
- func ValidateFileSignature(security Security, contentPath string, signaturePath string) error
- func ValidateZpkg(emitter *emission.Emitter, security Security, path string, quiet bool) error
- type ABSFetcher
- type ABSPublisher
- type Cache
- func (c *Cache) Clean() error
- func (c *Cache) Clear() error
- func (c *Cache) Exists(name string) bool
- func (c *Cache) GetConfig(uri string) string
- func (c *Cache) GetConfigSig(uri string) string
- func (c *Cache) GetFile(name string) string
- func (c *Cache) GetMeta(osarch string, uri string) string
- func (c *Cache) GetMetaSig(osarch string, uri string) string
- func (c *Cache) HasMeta(uri string) bool
- type CertEntry
- type Config
- type ConfigEntry
- type DynamoLocker
- type Fetcher
- type FileFetcher
- type FileLocker
- type FilePublisher
- type FrozenEntry
- type FsEntry
- type GCSFetcher
- type GCSPublisher
- type HttpsFetcher
- type KeyPairEntry
- type LocalFetcher
- type Locker
- type Manager
- func (m *Manager) CacheClean() error
- func (m *Manager) CacheClear() error
- func (m *Manager) Channel(repo string, pkg string, channel string) error
- func (m *Manager) Configure(packages []string, profile string) error
- func (m *Manager) Contents(pkgName string) ([]string, error)
- func (m *Manager) EmptyImage(imagePath string) error
- func (m *Manager) Fetch(args []string) error
- func (m *Manager) Freeze(args []string) error
- func (m *Manager) ImageCurrent(image string) error
- func (m *Manager) ImageDelete(image string) error
- func (m *Manager) ImageInit(imageFilePath string, name string, imageOs string, arch string, ...) error
- func (m *Manager) ImageList() error
- func (m *Manager) Info(pkgName string) ([]string, error)
- func (m *Manager) Install(args []string, request *zps.Request) error
- func (m *Manager) IsEmptyImage(imagePath string) (bool, error)
- func (m *Manager) IsImage(imagePath string) bool
- func (m *Manager) List() ([]string, error)
- func (m *Manager) PkiKeyPairImport(certPath string, keyPath string) error
- func (m *Manager) PkiKeyPairList() ([]string, error)
- func (m *Manager) PkiKeyPairRemove(fingerprint string) error
- func (m *Manager) PkiTrustFetch(uriString string) error
- func (m *Manager) PkiTrustImport(certPath string, typ string) error
- func (m *Manager) PkiTrustList() ([]string, error)
- func (m *Manager) PkiTrustRemove(fingerprint string) error
- func (m *Manager) Plan(action string, args []string) (*zps.Solution, error)
- func (m *Manager) Publish(repo string, pkgs ...string) error
- func (m *Manager) Refresh() error
- func (m *Manager) Remove(args []string) error
- func (m *Manager) RepoContents(name string) ([]string, error)
- func (m *Manager) RepoInit(name string) error
- func (m *Manager) RepoList() ([]string, error)
- func (m *Manager) RepoUnlock(name string, removeEtag bool) error
- func (m *Manager) RepoUpdate(name string) error
- func (m *Manager) Status(query string) (string, []string, error)
- func (m *Manager) Thaw(args []string) error
- func (m *Manager) Tpl(tplPath string, profile string) error
- func (m *Manager) TransActionList() ([]string, error)
- func (m *Manager) Update(reqs []string) error
- func (m *Manager) ZpkgBuild(zpfPath string, targetPath string, workPath string, outputPath string, ...) error
- func (m *Manager) ZpkgContents(path string) ([]string, error)
- func (m *Manager) ZpkgExtract(filepath string, target string) error
- func (m *Manager) ZpkgInfo(path string) (string, error)
- func (m *Manager) ZpkgManifest(path string) (string, error)
- func (m *Manager) ZpkgSign(path string, workPath string) error
- func (m *Manager) ZpkgValidate(path string) error
- type Metadata
- type MetadataChannels
- type MetadataPackages
- type MetadataUpdates
- type NoneLocker
- type PkgEntry
- type Pki
- type PkiCertificates
- func (p *PkiCertificates) All() ([]*CertEntry, error)
- func (p *PkiCertificates) Del(fingerprint string) error
- func (p *PkiCertificates) Get(fingerprint string) (*CertEntry, error)
- func (p *PkiCertificates) GetByPublisher(publisher string) ([]*CertEntry, error)
- func (p *PkiCertificates) GetBySubject(subject string) ([]*CertEntry, error)
- func (p *PkiCertificates) GetByType(typ string) ([]*CertEntry, error)
- func (p *PkiCertificates) Put(fingerprint string, subject string, publisher string, typ string, cert []byte) error
- type PkiKeyPairs
- func (p *PkiKeyPairs) All() ([]*KeyPairEntry, error)
- func (p *PkiKeyPairs) Del(fingerprint string) error
- func (p *PkiKeyPairs) Get(fingerprint string) (*KeyPairEntry, error)
- func (p *PkiKeyPairs) GetByPublisher(publisher string) ([]*KeyPairEntry, error)
- func (p *PkiKeyPairs) GetBySubject(subject string) ([]*KeyPairEntry, error)
- func (p *PkiKeyPairs) Put(fingerprint string, subject string, publisher string, cert []byte, key []byte) error
- type Publisher
- type S3Fetcher
- type S3Publisher
- type Security
- type SecurityNone
- type SecurityOffline
- func (s *SecurityOffline) KeyPair(publisher string) (*KeyPairEntry, error)
- func (s *SecurityOffline) Mode() string
- func (s *SecurityOffline) Trust(content *[]byte, typ string) (string, string, error)
- func (s *SecurityOffline) Verify(content *[]byte, signatures []*action.Signature) (*action.Signature, error)
- type State
- type StateFrozen
- type StateObjects
- type StatePackages
- type StateTemplates
- type StateTransactions
- type TemplateEntry
- type Transaction
- type TransactionEntry
Constants ¶
View Source
const ( PKICertCA = "ca" PKICertIntermediate = "intermediate" PKICertUser = "user" PKICertCRL = "crl" )
View Source
const (
SecurityModeNone = "none"
)
View Source
const (
SecurityModeOffline = "offline"
)
Variables ¶
This section is empty.
Functions ¶
func FilterPackagesByArch ¶
func MergeTemplateConfig ¶
func PublisherFromUri ¶
func ValidateFileSignature ¶
Types ¶
type ABSFetcher ¶
type ABSFetcher struct {
// contains filtered or unexported fields
}
func NewABSFetcher ¶
func NewABSFetcher(uri *url.URL, cache *Cache, security Security) *ABSFetcher
func (*ABSFetcher) Keys ¶
func (a *ABSFetcher) Keys() ([][]string, error)
func (*ABSFetcher) Refresh ¶
func (a *ABSFetcher) Refresh() error
type ABSPublisher ¶
func NewABSPublisher ¶
func (*ABSPublisher) Init ¶
func (a *ABSPublisher) Init() error
func (*ABSPublisher) Publish ¶
func (a *ABSPublisher) Publish(pkgs ...string) error
func (*ABSPublisher) Update ¶
func (a *ABSPublisher) Update() error
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
func (*Cache) GetConfigSig ¶
type CertEntry ¶
type ConfigEntry ¶
type DynamoLocker ¶
type DynamoLocker struct {
// contains filtered or unexported fields
}
func NewDynamoLocker ¶
func NewDynamoLocker(uri *url.URL) *DynamoLocker
func (*DynamoLocker) Lock ¶
func (d *DynamoLocker) Lock() error
func (*DynamoLocker) LockWithEtag ¶
func (d *DynamoLocker) LockWithEtag() (string, error)
func (*DynamoLocker) Unlock ¶
func (d *DynamoLocker) Unlock() error
Unlock is used when we need to unlock repo but metadata wasn't changed
func (*DynamoLocker) UnlockWithEtag ¶
func (d *DynamoLocker) UnlockWithEtag(eTag *string) error
type FileFetcher ¶
type FileFetcher struct {
// contains filtered or unexported fields
}
func NewFileFetcher ¶
func NewFileFetcher(uri *url.URL, cache *Cache, security Security) *FileFetcher
func (*FileFetcher) Keys ¶
func (f *FileFetcher) Keys() ([][]string, error)
func (*FileFetcher) Refresh ¶
func (f *FileFetcher) Refresh() error
type FileLocker ¶
type FileLocker struct {
// contains filtered or unexported fields
}
func NewFileLocker ¶
func NewFileLocker(uri *url.URL) *FileLocker
func (*FileLocker) Lock ¶
func (f *FileLocker) Lock() error
func (*FileLocker) LockWithEtag ¶
func (f *FileLocker) LockWithEtag() (string, error)
func (*FileLocker) Unlock ¶
func (f *FileLocker) Unlock() error
func (*FileLocker) UnlockWithEtag ¶
func (f *FileLocker) UnlockWithEtag(eTag *string) error
type FilePublisher ¶
func NewFilePublisher ¶
func (*FilePublisher) Init ¶
func (f *FilePublisher) Init() error
func (*FilePublisher) Publish ¶
func (f *FilePublisher) Publish(pkgs ...string) error
func (*FilePublisher) Update ¶
func (f *FilePublisher) Update() error
type FrozenEntry ¶
type FrozenEntry struct {
PkgId string `storm:"id"`
}
type FsEntry ¶
type GCSFetcher ¶
type GCSFetcher struct {
// contains filtered or unexported fields
}
func NewGCSFetcher ¶
func NewGCSFetcher(uri *url.URL, cache *Cache, security Security) *GCSFetcher
func (*GCSFetcher) Keys ¶
func (g *GCSFetcher) Keys() ([][]string, error)
func (*GCSFetcher) Refresh ¶
func (g *GCSFetcher) Refresh() error
type GCSPublisher ¶
func NewGCSPublisher ¶
func (*GCSPublisher) Init ¶
func (g *GCSPublisher) Init() error
func (*GCSPublisher) Publish ¶
func (g *GCSPublisher) Publish(pkgs ...string) error
func (*GCSPublisher) Update ¶
func (g *GCSPublisher) Update() error
type HttpsFetcher ¶
type HttpsFetcher struct {
// contains filtered or unexported fields
}
func NewHttpsFetcher ¶
func NewHttpsFetcher(uri *url.URL, cache *Cache, security Security) *HttpsFetcher
func (*HttpsFetcher) Keys ¶
func (h *HttpsFetcher) Keys() ([][]string, error)
func (*HttpsFetcher) Refresh ¶
func (h *HttpsFetcher) Refresh() error
type KeyPairEntry ¶
type KeyPairEntry struct { Fingerprint string `storm:"id"` Subject string `storm:"index"` Publisher string `storm:"index"` Cert []byte Key []byte }
func (*KeyPairEntry) RSAKey ¶
func (k *KeyPairEntry) RSAKey() (*rsa.PrivateKey, error)
type LocalFetcher ¶
type LocalFetcher struct {
// contains filtered or unexported fields
}
func NewLocalFetcher ¶
func NewLocalFetcher(uri *url.URL, cache *Cache, security Security) *LocalFetcher
func (*LocalFetcher) Keys ¶
func (f *LocalFetcher) Keys() ([][]string, error)
func (*LocalFetcher) Refresh ¶
func (f *LocalFetcher) Refresh() error
type Locker ¶
type Manager ¶
func NewManager ¶
func (*Manager) CacheClean ¶
func (*Manager) CacheClear ¶
func (*Manager) EmptyImage ¶
func (*Manager) ImageCurrent ¶
func (*Manager) ImageDelete ¶
func (*Manager) ImageInit ¶
func (m *Manager) ImageInit(imageFilePath string, name string, imageOs string, arch string, imagePath string, profile string, configure bool, force bool, helper bool) error
TODO this is trash, refactor it after Imagefile support is added
func (*Manager) PkiKeyPairImport ¶
func (*Manager) PkiKeyPairList ¶
func (*Manager) PkiKeyPairRemove ¶
func (*Manager) PkiTrustFetch ¶
func (*Manager) PkiTrustImport ¶
func (*Manager) PkiTrustList ¶
func (*Manager) PkiTrustRemove ¶
func (*Manager) RepoUpdate ¶
func (*Manager) TransActionList ¶
func (*Manager) ZpkgContents ¶
TODO consider merging with Contents command via file path sniffing
func (*Manager) ZpkgManifest ¶
TODO consider reworking into Manifest command utilizing file path sniffing
func (*Manager) ZpkgValidate ¶
TODO also verify file digests
type Metadata ¶
type Metadata struct { Path string Packages *MetadataPackages Channels *MetadataChannels Updates *MetadataUpdates }
func NewMetadata ¶
type MetadataChannels ¶
type MetadataChannels struct {
// contains filtered or unexported fields
}
func (*MetadataChannels) List ¶
func (m *MetadataChannels) List() ([]string, error)
type MetadataPackages ¶
type MetadataPackages struct {
// contains filtered or unexported fields
}
type MetadataUpdates ¶
type MetadataUpdates struct {
// contains filtered or unexported fields
}
type NoneLocker ¶
type NoneLocker struct {
// contains filtered or unexported fields
}
func NewNoneLocker ¶
func NewNoneLocker(uri *url.URL) *NoneLocker
func (*NoneLocker) Lock ¶
func (n *NoneLocker) Lock() error
func (*NoneLocker) LockWithEtag ¶
func (n *NoneLocker) LockWithEtag() (string, error)
func (*NoneLocker) Unlock ¶
func (n *NoneLocker) Unlock() error
func (*NoneLocker) UnlockWithEtag ¶
func (n *NoneLocker) UnlockWithEtag(etag *string) error
type Pki ¶
type Pki struct { Path string Certificates *PkiCertificates KeyPairs *PkiKeyPairs }
type PkiCertificates ¶
type PkiCertificates struct {
// contains filtered or unexported fields
}
func (*PkiCertificates) All ¶
func (p *PkiCertificates) All() ([]*CertEntry, error)
func (*PkiCertificates) Del ¶
func (p *PkiCertificates) Del(fingerprint string) error
func (*PkiCertificates) GetByPublisher ¶
func (p *PkiCertificates) GetByPublisher(publisher string) ([]*CertEntry, error)
func (*PkiCertificates) GetBySubject ¶
func (p *PkiCertificates) GetBySubject(subject string) ([]*CertEntry, error)
type PkiKeyPairs ¶
type PkiKeyPairs struct {
// contains filtered or unexported fields
}
func (*PkiKeyPairs) All ¶
func (p *PkiKeyPairs) All() ([]*KeyPairEntry, error)
func (*PkiKeyPairs) Del ¶
func (p *PkiKeyPairs) Del(fingerprint string) error
func (*PkiKeyPairs) Get ¶
func (p *PkiKeyPairs) Get(fingerprint string) (*KeyPairEntry, error)
func (*PkiKeyPairs) GetByPublisher ¶
func (p *PkiKeyPairs) GetByPublisher(publisher string) ([]*KeyPairEntry, error)
func (*PkiKeyPairs) GetBySubject ¶
func (p *PkiKeyPairs) GetBySubject(subject string) ([]*KeyPairEntry, error)
type Publisher ¶
type S3Publisher ¶
func NewS3Publisher ¶
func (*S3Publisher) Init ¶
func (s *S3Publisher) Init() error
func (*S3Publisher) Publish ¶
func (s *S3Publisher) Publish(pkgs ...string) error
func (*S3Publisher) Update ¶
func (s *S3Publisher) Update() error
type Security ¶
type SecurityNone ¶
type SecurityNone struct{}
func (*SecurityNone) KeyPair ¶
func (s *SecurityNone) KeyPair(publisher string) (*KeyPairEntry, error)
func (*SecurityNone) Mode ¶
func (s *SecurityNone) Mode() string
type SecurityOffline ¶
type SecurityOffline struct {
// contains filtered or unexported fields
}
func (*SecurityOffline) KeyPair ¶
func (s *SecurityOffline) KeyPair(publisher string) (*KeyPairEntry, error)
func (*SecurityOffline) Mode ¶
func (s *SecurityOffline) Mode() string
type State ¶
type State struct { Path string Frozen *StateFrozen Packages *StatePackages Objects *StateObjects Templates *StateTemplates Transactions *StateTransactions }
type StateFrozen ¶
type StateFrozen struct {
// contains filtered or unexported fields
}
func (*StateFrozen) All ¶
func (s *StateFrozen) All() ([]*FrozenEntry, error)
func (*StateFrozen) Del ¶
func (s *StateFrozen) Del(pkgId string) error
func (*StateFrozen) Put ¶
func (s *StateFrozen) Put(pkgId string) error
type StateObjects ¶
type StateObjects struct {
// contains filtered or unexported fields
}
func (*StateObjects) All ¶
func (s *StateObjects) All() ([]*FsEntry, error)
func (*StateObjects) Del ¶
func (s *StateObjects) Del(pkg string) error
type StatePackages ¶
type StatePackages struct {
// contains filtered or unexported fields
}
func (*StatePackages) Del ¶
func (s *StatePackages) Del(name string) error
type StateTemplates ¶
type StateTemplates struct {
// contains filtered or unexported fields
}
func (*StateTemplates) All ¶
func (s *StateTemplates) All() ([]*TemplateEntry, error)
func (*StateTemplates) Del ¶
func (s *StateTemplates) Del(pkg string) error
type StateTransactions ¶
type StateTransactions struct {
// contains filtered or unexported fields
}
func (*StateTransactions) All ¶
func (s *StateTransactions) All() ([]*TransactionEntry, error)
func (*StateTransactions) Get ¶
func (s *StateTransactions) Get(id string) ([]*TransactionEntry, error)
type TemplateEntry ¶
type Transaction ¶
func NewTransaction ¶
Source Files ¶
- cache.go
- common.go
- config.go
- fetcher_abs.go
- fetcher_common.go
- fetcher_file.go
- fetcher_gcs.go
- fetcher_https.go
- fetcher_local.go
- fetcher_s3.go
- lock_common.go
- lock_dynamo.go
- lock_file.go
- lock_none.go
- manager.go
- metadata.go
- pki.go
- publisher_abs.go
- publisher_common.go
- publisher_file.go
- publisher_gcs.go
- publisher_s3.go
- security_common.go
- security_none.go
- security_offline.go
- state.go
- transaction.go
Click to show internal directories.
Click to hide internal directories.