NFSSVC-27 Add CID to Bucket struct

This is done in order to cache the list of containers in the future
remotes/KirillovDenis/bugfix/681-fix_acl_parsing
Evgeniy Kulikov 2020-07-28 11:43:42 +03:00
parent 504ef4da91
commit 1db70efd7b
1 changed files with 2 additions and 0 deletions

View File

@ -25,6 +25,7 @@ type (
// Bucket container for bucket metadata
Bucket struct {
CID refs.CID `xml:"-"` // ignored by response
Name string
CreationDate string // time string of format "2006-01-02T15:04:05.000Z"
}
@ -72,6 +73,7 @@ func (h *handler) getContainerInfo(ctx context.Context, p cnrInfoParams) (*Bucke
_ = res
return &Bucket{
CID: p.cid,
Name: p.cid.String(),
CreationDate: new(time.Time).Format(time.RFC3339),
}, nil