~rogpeppe/juju-core/themue-058-debug-log-api

« back to all changes in this revision

Viewing changes to environs/simplestreams/simplestreams.go

  • Committer: Frank Mueller
  • Date: 2014-01-23 14:14:49 UTC
  • mfrom: (2152.1.95 juju-core)
  • Revision ID: frank.mueller@canonical.com-20140123141449-b30l57y7gs3wjkpw
debugger: merged trunk and fixed permission and interface problems

Show diffs side-by-side

added added

removed removed

Lines of Context:
394
394
}
395
395
 
396
396
const (
 
397
        StreamsDir       = "streams/v1"
397
398
        UnsignedIndex    = "streams/v1/index.json"
398
399
        DefaultIndexPath = "streams/v1/index"
399
400
        UnsignedMirror   = "streams/v1/mirrors.json"
400
401
        mirrorsPath      = "streams/v1/mirrors"
401
402
        signedSuffix     = ".sjson"
402
 
        unsignedSuffix   = ".json"
 
403
        UnsignedSuffix   = ".json"
403
404
)
404
405
 
405
406
type appendMatchingFunc func(DataSource, []interface{}, map[string]interface{}, LookupConstraint) []interface{}
441
442
 
442
443
// getMaybeSignedMetadata returns metadata records matching the specified constraint.
443
444
func getMaybeSignedMetadata(source DataSource, baseIndexPath string, cons LookupConstraint, signed bool, params ValueParams) ([]interface{}, error) {
444
 
        indexPath := baseIndexPath + unsignedSuffix
 
445
        indexPath := baseIndexPath + UnsignedSuffix
445
446
        if signed {
446
447
                indexPath = baseIndexPath + signedSuffix
447
448
        }
546
547
func getMirrorRefs(source DataSource, baseMirrorsPath string, requireSigned bool,
547
548
        params ValueParams) (MirrorRefs, string, error) {
548
549
 
549
 
        mirrorsPath := baseMirrorsPath + unsignedSuffix
 
550
        mirrorsPath := baseMirrorsPath + UnsignedSuffix
550
551
        if requireSigned {
551
552
                mirrorsPath = baseMirrorsPath + signedSuffix
552
553
        }