package create

import "github.com/containernetworking/cni/pkg/types/create"

Index

Functions

func Create

func Create(version string, bytes []byte) (types.Result, error)

Create creates a CNI Result using the given JSON with the expected version, or an error if the creation could not be performed

func CreateFromBytes

func CreateFromBytes(bytes []byte) (types.Result, error)

CreateFromBytes creates a CNI Result from the given JSON, automatically detecting the CNI spec version of the result. An error is returned if the operation could not be performed.

func DecodeVersion

func DecodeVersion(jsonBytes []byte) (string, error)

DecodeVersion returns the CNI version from CNI configuration or result JSON, or an error if the operation could not be performed.

Source Files

create.go

Version
v1.3.0 (latest)
Published
Apr 7, 2025
Platform
linux/amd64
Imports
7 packages
Last checked
2 days ago

Tools for package owners.