timeseries

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var HDeleteCmd = ngsicli.Command{
	Name:     "hdelete",
	Usage:    "delete historical raw and aggregated time series context information",
	Category: "TIME SERIES",
	Flags: []ngsicli.Flag{
		ngsicli.HostRFlag,
		ngsicli.OAuthTokenFlag,
		ngsicli.TenantFlag,
		ngsicli.ScopeFlag,
	},
	Subcommands: []*ngsicli.Command{
		{
			Name:       "attr",
			Usage:      "delete all the data associated to certain attribute of certain entity",
			ServerList: []string{"comet"},
			Flags: []ngsicli.Flag{
				idFlag,
				typeFlag,
				attrFlag,
				ngsicli.RunFlag,
			},
			Action: func(c *ngsicli.Context, ngsi *ngsilib.NGSI, client *ngsilib.Client) error {
				return cometAttrDelete(c, ngsi, client)
			},
		},
		{
			Name:       "entity",
			Usage:      "delete historical data of a certain entity",
			ServerList: []string{"comet", "quantumleap"},
			Flags: []ngsicli.Flag{
				idFlag,
				typeFlag,
				fromDateFlag,
				toDateFlag,
				ngsicli.RunFlag,
			},
			Action: func(c *ngsicli.Context, ngsi *ngsilib.NGSI, client *ngsilib.Client) error {
				return tsEntityDelete(c, ngsi, client)
			},
		},
		{
			Name:       "entities",
			Usage:      "delete historical data of all entities of a certain type",
			ServerList: []string{"comet", "quantumleap"},
			Flags: []ngsicli.Flag{
				idFlag,
				typeFlag,
				dropTableFlag,
				fromDateFlag,
				toDateFlag,
				ngsicli.RunFlag,
			},
			Action: func(c *ngsicli.Context, ngsi *ngsilib.NGSI, client *ngsilib.Client) error {
				return tsEntitiesDelete(c, ngsi, client)
			},
		},
	},
}
View Source
var HGetCmd = ngsicli.Command{
	Name:     "hget",
	Usage:    "get historical raw and aggregated time series context information",
	Category: "TIME SERIES",
	Flags: []ngsicli.Flag{
		ngsicli.HostRFlag,
		ngsicli.OAuthTokenFlag,
		ngsicli.TenantFlag,
		ngsicli.ScopeFlag,
	},
	Subcommands: []*ngsicli.Command{
		{
			Name:       "attr",
			Usage:      "history of an attribute",
			ServerList: []string{"comet", "quantumleap"},
			Flags: []ngsicli.Flag{
				typeFlag,
				idFlag,
				attrFlag,
				sameTypeFlag,
				nTypesFlag,
				aggrMethodFlag,
				aggrPeriodFlag,
				fromDateFlag,
				toDateFlag,
				lastNFlag,
				hLimitFlag,
				hOffsetFlag,
				georelFlag,
				geometryFlag,
				coordsFlag,
				valueFlag,
				ngsicli.PrettyFlag,
				ngsicli.SafeStringFlag,
			},
			Action: func(c *ngsicli.Context, ngsi *ngsilib.NGSI, client *ngsilib.Client) error {
				return tsAttrRead(c, ngsi, client)
			},
		},
		{
			Name:       "attrs",
			Usage:      "history of attributes",
			ServerList: []string{"quantumleap"},
			Flags: []ngsicli.Flag{
				typeFlag,
				idFlag,
				attrsFlag,
				sameTypeFlag,
				nTypesFlag,
				aggrMethodFlag,
				aggrPeriodFlag,
				fromDateFlag,
				toDateFlag,
				lastNFlag,
				hLimitFlag,
				hOffsetFlag,
				georelFlag,
				geometryFlag,
				coordsFlag,
				valueFlag,
				ngsicli.PrettyFlag,
				ngsicli.SafeStringFlag,
			},
			Action: func(c *ngsicli.Context, ngsi *ngsilib.NGSI, client *ngsilib.Client) error {
				return qlAttrsRead(c, ngsi, client)
			},
		},
		{
			Name:       "entities",
			Usage:      "list of all the entity id",
			ServerList: []string{"quantumleap"},
			Flags: []ngsicli.Flag{
				typeFlag,
				fromDateFlag,
				toDateFlag,
				hLimitFlag,
				hOffsetFlag,
				ngsicli.PrettyFlag,
				ngsicli.SafeStringFlag,
			},
			Action: func(c *ngsicli.Context, ngsi *ngsilib.NGSI, client *ngsilib.Client) error {
				return qlEntitiesRead(c, ngsi, client)
			},
		},
	},
}
View Source
var TimeseriesApp = &ngsicli.App{
	Copyright: ngsicli.Copyright,
	Version:   ngsicli.Version,
	Usage:     "Time series command",
	Flags:     ngsicli.GlobalFlags,
	Commands: []*ngsicli.Command{
		&HGetCmd,
		&HDeleteCmd,
	},
}

Functions

func NewNgsiApp

func NewNgsiApp() *ngsicli.App

Types

This section is empty.

Jump to

Keyboard shortcuts

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