package boltutil
import "github.com/containerd/containerd/metadata/boltutil"
Index ¶
- func ReadAnnotations(bkt *bolt.Bucket) (map[string]string, error)
- func ReadAny(bkt *bolt.Bucket, name []byte) (*types.Any, error)
- func ReadExtensions(bkt *bolt.Bucket) (map[string]types.Any, error)
- func ReadLabels(bkt *bolt.Bucket) (map[string]string, error)
- func ReadTimestamps(bkt *bolt.Bucket, created, updated *time.Time) error
- func WriteAnnotations(bkt *bolt.Bucket, labels map[string]string) error
- func WriteAny(bkt *bolt.Bucket, name []byte, any *types.Any) error
- func WriteExtensions(bkt *bolt.Bucket, extensions map[string]types.Any) error
- func WriteLabels(bkt *bolt.Bucket, labels map[string]string) error
- func WriteTimestamps(bkt *bolt.Bucket, created, updated time.Time) error
Functions ¶
func ReadAnnotations ¶
ReadAnnotations reads the OCI Descriptor Annotations key from the bucket Uses the key "annotations"
func ReadAny ¶
ReadAny reads back protobuf's Any type from the bucket
func ReadExtensions ¶
ReadExtensions will read back a map of extensions from the given bucket, previously written by WriteExtensions
func ReadLabels ¶
ReadLabels reads the labels key from the bucket Uses the key "labels"
func ReadTimestamps ¶
ReadTimestamps reads created and updated timestamps from a bucket. Uses keys "createdat" and "updatedat"
func WriteAnnotations ¶
WriteAnnotations writes the OCI Descriptor Annotations
func WriteAny ¶
WriteAny write a protobuf's Any type to the bucket
func WriteExtensions ¶
WriteExtensions will write a KV map to the given bucket, where `K` is a string key and `V` is a protobuf's Any type that represents a generic extension.
func WriteLabels ¶
WriteLabels will write a new labels bucket to the provided bucket at key bucketKeyLabels, replacing the contents of the bucket with the provided map.
The provide map labels will be modified to have the final contents of the bucket. Typically, this removes zero-value entries. Uses the key "labels"
func WriteTimestamps ¶
WriteTimestamps writes created and updated timestamps to a bucket. Uses keys "createdat" and "updatedat"
Source Files ¶
- Version
- v1.5.6
- Published
- Sep 29, 2021
- Platform
- js/wasm
- Imports
- 5 packages
- Last checked
- 17 minutes ago –
Tools for package owners.