aboutsummaryrefslogtreecommitdiffstats
path: root/swarm/api/manifest.go
diff options
context:
space:
mode:
authorJavier Peletier <jm@epiclabs.io>2018-09-30 15:43:10 +0800
committerJavier Peletier <jm@epiclabs.io>2018-10-03 15:12:06 +0800
commit83705ef6aa3645a6305a400fa175e44904a929f7 (patch)
tree013c6594b7d275ab5eaa90b3969e77719787483f /swarm/api/manifest.go
parentb35622cf3c758d96874f287d137725946fc6341d (diff)
downloadgo-tangerine-83705ef6aa3645a6305a400fa175e44904a929f7.tar.gz
go-tangerine-83705ef6aa3645a6305a400fa175e44904a929f7.tar.zst
go-tangerine-83705ef6aa3645a6305a400fa175e44904a929f7.zip
swarm/storage/mru: Renamed rest of MRU references
Diffstat (limited to 'swarm/api/manifest.go')
-rw-r--r--swarm/api/manifest.go30
1 files changed, 15 insertions, 15 deletions
diff --git a/swarm/api/manifest.go b/swarm/api/manifest.go
index 9672ca540..f41a823bd 100644
--- a/swarm/api/manifest.go
+++ b/swarm/api/manifest.go
@@ -35,8 +35,8 @@ import (
)
const (
- ManifestType = "application/bzz-manifest+json"
- ResourceContentType = "application/bzz-resource"
+ ManifestType = "application/bzz-manifest+json"
+ FeedContentType = "application/bzz-feed"
manifestSizeLimit = 5 * 1024 * 1024
)
@@ -48,15 +48,15 @@ type Manifest struct {
// ManifestEntry represents an entry in a swarm manifest
type ManifestEntry struct {
- Hash string `json:"hash,omitempty"`
- Path string `json:"path,omitempty"`
- ContentType string `json:"contentType,omitempty"`
- Mode int64 `json:"mode,omitempty"`
- Size int64 `json:"size,omitempty"`
- ModTime time.Time `json:"mod_time,omitempty"`
- Status int `json:"status,omitempty"`
- Access *AccessEntry `json:"access,omitempty"`
- ResourceView *mru.Feed `json:"resourceView,omitempty"`
+ Hash string `json:"hash,omitempty"`
+ Path string `json:"path,omitempty"`
+ ContentType string `json:"contentType,omitempty"`
+ Mode int64 `json:"mode,omitempty"`
+ Size int64 `json:"size,omitempty"`
+ ModTime time.Time `json:"mod_time,omitempty"`
+ Status int `json:"status,omitempty"`
+ Access *AccessEntry `json:"access,omitempty"`
+ Feed *mru.Feed `json:"feed,omitempty"`
}
// ManifestList represents the result of listing files in a manifest
@@ -80,13 +80,13 @@ func (a *API) NewManifest(ctx context.Context, toEncrypt bool) (storage.Address,
return addr, err
}
-// Manifest hack for supporting Mutable Resource Updates from the bzz: scheme
+// Manifest hack for supporting Feeds from the bzz: scheme
// see swarm/api/api.go:API.Get() for more information
-func (a *API) NewResourceManifest(ctx context.Context, view *mru.Feed) (storage.Address, error) {
+func (a *API) NewFeedManifest(ctx context.Context, feed *mru.Feed) (storage.Address, error) {
var manifest Manifest
entry := ManifestEntry{
- ResourceView: view,
- ContentType: ResourceContentType,
+ Feed: feed,
+ ContentType: FeedContentType,
}
manifest.Entries = append(manifest.Entries, entry)
data, err := json.Marshal(&manifest)