forked from cloudfoundry/bosh-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
/
license.go
29 lines (22 loc) · 1.05 KB
/
license.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
package license
import (
"github.com/cloudfoundry/bosh-cli/crypto"
. "github.com/cloudfoundry/bosh-cli/release/resource"
crypto2 "github.com/cloudfoundry/bosh-utils/crypto"
)
type License struct {
resource Resource
}
func NewLicense(resource Resource) *License {
return &License{resource: resource}
}
func (l License) Name() string { return l.resource.Name() }
func (l License) Fingerprint() string { return l.resource.Fingerprint() }
func (l *License) ArchivePath() string { return l.resource.ArchivePath() }
func (l *License) ArchiveSHA1() string { return l.resource.ArchiveSHA1() }
func (l *License) Build(dev, final ArchiveIndex) error { return l.resource.Build(dev, final) }
func (l *License) Finalize(final ArchiveIndex) error { return l.resource.Finalize(final) }
func (l *License) RehashWithCalculator(calculator crypto.DigestCalculator, archiveFileReader crypto2.ArchiveDigestFilePathReader) (*License, error) {
newLicenseResource, err := l.resource.RehashWithCalculator(calculator, archiveFileReader)
return &License{newLicenseResource}, err
}