1package license
2
3import (
4	"github.com/cloudfoundry/bosh-cli/crypto"
5	. "github.com/cloudfoundry/bosh-cli/release/resource"
6	crypto2 "github.com/cloudfoundry/bosh-utils/crypto"
7)
8
9type License struct {
10	resource Resource
11}
12
13func NewLicense(resource Resource) *License {
14	return &License{resource: resource}
15}
16
17func (l License) Name() string        { return l.resource.Name() }
18func (l License) Fingerprint() string { return l.resource.Fingerprint() }
19
20func (l *License) ArchivePath() string   { return l.resource.ArchivePath() }
21func (l *License) ArchiveDigest() string { return l.resource.ArchiveDigest() }
22
23func (l *License) Build(dev, final ArchiveIndex) error { return l.resource.Build(dev, final) }
24func (l *License) Finalize(final ArchiveIndex) error   { return l.resource.Finalize(final) }
25
26func (l *License) RehashWithCalculator(calculator crypto.DigestCalculator, archiveFileReader crypto2.ArchiveDigestFilePathReader) (*License, error) {
27	newLicenseResource, err := l.resource.RehashWithCalculator(calculator, archiveFileReader)
28	return &License{newLicenseResource}, err
29}
30