{"modulePath":"github.com/mycontroller-org/server/v2","version":"v2.2.0","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package node\n\n## Types\n\n```go\ntype NodeAPI struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc New(ctx context.Context, logger *zap.Logger, storage storageTY.Plugin, bus busTY.Plugin) *NodeAPI\n```\n\n```go\nfunc (n *NodeAPI) Delete(IDs []string) (int64, error)\n```\nDelete node\n\n```go\nfunc (n *NodeAPI) Get(filters []storageTY.Filter) (nodeTY.Node, error)\n```\nGet returns a Node\n\n```go\nfunc (n *NodeAPI) GetByGatewayAndNodeID(gatewayID, nodeID string) (*nodeTY.Node, error)\n```\nGetByGatewayAndNodeID returns a node details by gatewayID and nodeId of a message\n\n```go\nfunc (n *NodeAPI) GetByID(id string) (*nodeTY.Node, error)\n```\nGetByID returns a node details by id\n\n```go\nfunc (n *NodeAPI) GetByIDs(ids []string) ([]nodeTY.Node, error)\n```\nGetByIDs returns a node details by id\n\n```go\nfunc (n *NodeAPI) GetEntityInterface() interface{}\n```\n\n```go\nfunc (n *NodeAPI) Import(data interface{}) error\n```\n\n```go\nfunc (n *NodeAPI) List(filters []storageTY.Filter, pagination *storageTY.Pagination) (*storageTY.Result, error)\n```\nList by filter and pagination\n\n```go\nfunc (n *NodeAPI) Save(node *nodeTY.Node, publishEvent bool) error\n```\nSave Node config into disk\n\n```go\nfunc (n *NodeAPI) UpdateFirmwareState(id string, data map[string]interface{}) error\n```\nUpdateFirmwareState func\n\n```go\nfunc (n *NodeAPI) VerifyNodeUpStatus(inactiveDuration time.Duration)\n```\nVerifies node up status by checking the last seen timestamp if the last seen greater than x minutes/seconds or specified duration in that node will be marked as down\n\n","path":"github.com/mycontroller-org/server/v2/pkg/api/node","name":"node","synopsis":"","isRedistributable":true}
