package boltutil

import "github.com/containerd/containerd/metadata/boltutil"

Index

Functions

func ReadLabels

func ReadLabels(bkt *bolt.Bucket) (map[string]string, error)

ReadLabels reads the labels key from the bucket Uses the key "labels"

func ReadTimestamps

func ReadTimestamps(bkt *bolt.Bucket, created, updated *time.Time) error

ReadTimestamps reads created and updated timestamps from a bucket. Uses keys "createdat" and "updatedat"

func WriteLabels

func WriteLabels(bkt *bolt.Bucket, labels map[string]string) error

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

func WriteTimestamps(bkt *bolt.Bucket, created, updated time.Time) error

WriteTimestamps writes created and updated timestamps to a bucket. Uses keys "createdat" and "updatedat"

Source Files

helpers.go

Version
v1.2.0-rc.2
Published
Oct 16, 2018
Platform
js/wasm
Imports
3 packages
Last checked
45 minutes ago

Tools for package owners.