go.charczuk.com@v0.0.0-20240327042549-bc490516bd1a/projects/nodes/pkg/types/node_metadata.go (about)

     1  /*
     2  
     3  Copyright (c) 2023 - Present. Will Charczuk. All rights reserved.
     4  Use of this source code is governed by a MIT license that can be found in the LICENSE file at the root of the repository.
     5  
     6  */
     7  
     8  package types
     9  
    10  // NodeMetadata is strictly the data that's held on
    11  // the INode.Metadata() field.
    12  type NodeMetadata struct {
    13  	Collapsed        bool     `json:"collapsed"`
    14  	Watched          bool     `json:"watched"`
    15  	WatchedCollapsed bool     `json:"watched_collapsed"`
    16  	PositionX        float64  `json:"position_x"`
    17  	PositionY        float64  `json:"position_y"`
    18  	Height           *float64 `json:"height"`
    19  	Width            *float64 `json:"width"`
    20  	NodeType         string   `json:"node_type"`
    21  	InputType        string   `json:"input_type,omitempty"`
    22  	OutputType       string   `json:"output_type,omitempty"`
    23  	Expression       string   `json:"expression,omitempty"`
    24  }