attributeset

package
v0.1.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotFound = errors.New("no document found")

Functions

This section is empty.

Types

type AttributeSet

type AttributeSet struct {
	AttributeSetID      int         `json:"attribute_set_id,omitempty"`
	AttributeSetName    string      `json:"attribute_set_name"`
	SortOrder           int         `json:"sort_order"`
	EntityTypeID        int         `json:"entity_type_id,omitempty"`
	ExtensionAttributes interface{} `json:"extension_attributes,omitempty"`
}

type Group

type Group struct {
	AttributeGroupID    string `json:"attribute_group_id,omitempty"`
	AttributeGroupName  string `json:"attribute_group_name"`
	AttributeSetID      int    `json:"attribute_set_id"`
	ExtensionAttributes struct {
		AttributeGroupCode string `json:"attribute_group_code,omitempty"`
		SortOrder          string `json:"sort_order,omitempty"`
	} `json:"extension_attributes,omitempty"`
}

type MAttributeSet

type MAttributeSet struct {
	Route                  string
	AttributeSet           *AttributeSet
	AttributeSetGroups     []Group
	AttributeSetAttributes *[]attribute.Attribute
	APIClient              *api.Client
}

func CreateAttributeSet

func CreateAttributeSet(a AttributeSet, skeletonID int, apiClient *api.Client) (*MAttributeSet, error)

func GetAttributeSetByName

func GetAttributeSetByName(name string, apiClient *api.Client) (*MAttributeSet, error)

func (*MAttributeSet) AssignAttribute

func (mas *MAttributeSet) AssignAttribute(attributeGroupID, sortOrder int, attributeCode string) error

func (*MAttributeSet) CreateGroup

func (mas *MAttributeSet) CreateGroup(groupName string) error

func (*MAttributeSet) UpdateAttributeSetFromRemote

func (mas *MAttributeSet) UpdateAttributeSetFromRemote() error

func (*MAttributeSet) UpdateAttributeSetOnRemote

func (mas *MAttributeSet) UpdateAttributeSetOnRemote() error

Jump to

Keyboard shortcuts

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