model

package
v0.0.12 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 6, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ConfigMediaType = "application/vnd.io.solo.wasm.config.v1+json"
	CodeMediaType   = "application/vnd.io.solo.wasm.code.v1+wasm"
)

media types stored in a Wasm Module image

View Source
const (
	ConfigFilename = "config.json"
	CodeFilename   = "filter.wasm"
)

default filenames stored in a Wasm Module Image

Variables

This section is empty.

Functions

func FullRef

func FullRef(ref string) string

expand the ref to contain :latest suffix if no tag provided

func GetDescriptor

func GetDescriptor(filter Filter) (ocispec.Descriptor, error)

helper function to get the descriptor for a wasm binary

Types

type Filter

type Filter io.Reader

a reader with access to the filter code

type Image

type Image interface {
	// ref to the image
	Ref() string

	// get the image (Filter) descriptor
	Descriptor() (ocispec.Descriptor, error)

	// get the filter .wasm file from the image
	FetchFilter(ctx context.Context) (Filter, error)

	// get the filter config from the image
	FetchConfig(ctx context.Context) (*config.Config, error)
}

represents the descriptors for an image, as well as accessors to the image contents

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL