production

package
v0.24.2 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2023 License: BSD-2-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const Namespace = "http://schemas.microsoft.com/3dmanufacturing/production/2015/06"

Namespace is the canonical name of this extension.

Variables

View Source
var (
	ErrUUID             = errors.New("UUID MUST be any of the four UUID variants described in IETF RFC 4122")
	ErrProdRefInNonRoot = errors.New("non-root model file components MUST only reference objects in the same model file")
)
View Source
var DefaultExtension = go3mf.Extension{
	Namespace:  Namespace,
	LocalName:  "p",
	IsRequired: true,
}

Functions

func SetMissingUUIDs

func SetMissingUUIDs(m *go3mf.Model)

SetMissingUUIDs traverse all the model tree setting all missing UUID attributes.

Types

type BuildAttr

type BuildAttr struct {
	UUID string
}

BuildAttr provides a UUID in the root model file build element to ensure that a 3MF package can be tracked across uses by various consumers.

func GetBuildAttr

func GetBuildAttr(build *go3mf.Build) *BuildAttr

func (*BuildAttr) Marshal3MF added in v0.24.0

func (u *BuildAttr) Marshal3MF(_ spec.Encoder, start *xml.StartElement) error

Marshal3MF encodes the resource attributes.

func (BuildAttr) Namespace added in v0.24.0

func (BuildAttr) Namespace() string

func (*BuildAttr) Unmarshal3MFAttr added in v0.24.0

func (u *BuildAttr) Unmarshal3MFAttr(a spec.XMLAttr) error

type ComponentAttr

type ComponentAttr struct {
	UUID string
	Path string
}

ObjectAttr provides a UUID in the component element for traceability across 3MF packages.

func GetComponentAttr

func GetComponentAttr(comp *go3mf.Component) *ComponentAttr

func (*ComponentAttr) Marshal3MF added in v0.24.0

func (u *ComponentAttr) Marshal3MF(_ spec.Encoder, start *xml.StartElement) error

Marshal3MF encodes the resource attributes.

func (ComponentAttr) Namespace added in v0.24.0

func (ComponentAttr) Namespace() string

func (*ComponentAttr) ObjectPath

func (p *ComponentAttr) ObjectPath() string

ObjectPath returns the Path extension attribute.

func (*ComponentAttr) Unmarshal3MFAttr added in v0.24.0

func (u *ComponentAttr) Unmarshal3MFAttr(a spec.XMLAttr) error

type ItemAttr

type ItemAttr struct {
	UUID string
	Path string
}

ItemAttr provides a UUID in the item element to ensure that each object can be reliably tracked.

func GetItemAttr

func GetItemAttr(item *go3mf.Item) *ItemAttr

func (*ItemAttr) Marshal3MF added in v0.24.0

func (u *ItemAttr) Marshal3MF(_ spec.Encoder, start *xml.StartElement) error

Marshal3MF encodes the resource attributes.

func (ItemAttr) Namespace added in v0.24.0

func (ItemAttr) Namespace() string

func (*ItemAttr) ObjectPath

func (p *ItemAttr) ObjectPath() string

ObjectPath returns the Path extension attribute.

func (*ItemAttr) Unmarshal3MFAttr added in v0.24.0

func (u *ItemAttr) Unmarshal3MFAttr(a spec.XMLAttr) error

type ObjectAttr

type ObjectAttr struct {
	UUID string
}

ObjectAttr provides a UUID in the item element for traceability across 3MF packages.

func GetObjectAttr

func GetObjectAttr(obj *go3mf.Object) *ObjectAttr

func (*ObjectAttr) Marshal3MF added in v0.24.0

func (u *ObjectAttr) Marshal3MF(_ spec.Encoder, start *xml.StartElement) error

Marshal3MF encodes the resource attributes.

func (ObjectAttr) Namespace added in v0.24.0

func (ObjectAttr) Namespace() string

func (*ObjectAttr) Unmarshal3MFAttr added in v0.24.0

func (u *ObjectAttr) Unmarshal3MFAttr(a spec.XMLAttr) error

type Spec

type Spec struct{}

func (Spec) NewAttrGroup added in v0.24.0

func (Spec) NewAttrGroup(parent xml.Name) spec.AttrGroup

func (Spec) NewElementDecoder added in v0.24.0

func (Spec) NewElementDecoder(xml.Name) spec.GetterElementDecoder

func (Spec) Validate

func (Spec) Validate(model interface{}, path string, e interface{}) error

Jump to

Keyboard shortcuts

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