Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DevicesCmd = ngsicli.Command{ Name: "devices", Usage: "manage devices for IoT Agent", Category: "IoT Agent", Flags: []ngsicli.Flag{ ngsicli.HostRFlag, ngsicli.OAuthTokenFlag, ngsicli.TenantFlag, ngsicli.ScopeFlag, }, Subcommands: []*ngsicli.Command{ { Name: "list", Usage: "list all devices", ServerList: []string{"iota"}, Flags: []ngsicli.Flag{ devicesLimit, devicesOffset, devicesDetailed, devicesEntity, devicesProtocol, ngsicli.PrettyFlag, }, Action: func(c *ngsicli.Context, ngsi *ngsilib.NGSI, client *ngsilib.Client) error { return idasDevicesList(c, ngsi, client) }, }, { Name: "create", Usage: "create a device", ServerList: []string{"iota"}, Flags: []ngsicli.Flag{ devicesDataRFlag, }, RequiredFlags: []string{"data"}, Action: func(c *ngsicli.Context, ngsi *ngsilib.NGSI, client *ngsilib.Client) error { return idasDevicesCreate(c, ngsi, client) }, }, { Name: "get", Usage: "get a device", ServerList: []string{"iota"}, Flags: []ngsicli.Flag{ devicesIDRFlag, ngsicli.PrettyFlag, }, RequiredFlags: []string{"id"}, Action: func(c *ngsicli.Context, ngsi *ngsilib.NGSI, client *ngsilib.Client) error { return idasDevicesGet(c, ngsi, client) }, }, { Name: "update", Usage: "update a device", ServerList: []string{"iota"}, Flags: []ngsicli.Flag{ devicesIDRFlag, devicesDataRFlag, }, RequiredFlags: []string{"id", "data"}, Action: func(c *ngsicli.Context, ngsi *ngsilib.NGSI, client *ngsilib.Client) error { return idasDevicesUpdate(c, ngsi, client) }, }, { Name: "delete", Usage: "delete a device", ServerList: []string{"iota"}, Flags: []ngsicli.Flag{ devicesIDRFlag, }, RequiredFlags: []string{"id"}, Action: func(c *ngsicli.Context, ngsi *ngsilib.NGSI, client *ngsilib.Client) error { return idasDevicesDelete(c, ngsi, client) }, }, }, }
View Source
var IotagentkApp = &ngsicli.App{ Copyright: ngsicli.Copyright, Version: ngsicli.Version, Usage: "Iot Agent command", Flags: ngsicli.GlobalFlags, Commands: []*ngsicli.Command{ &ServicesCmd, &DevicesCmd, }, }
View Source
var ServicesCmd = ngsicli.Command{ Name: "services", Usage: "manage services for IoT Agent", Category: "IoT Agent", Flags: []ngsicli.Flag{ ngsicli.HostRFlag, ngsicli.TenantFlag, ngsicli.ScopeFlag, }, Subcommands: []*ngsicli.Command{ { Name: "list", Usage: "list configuration group", ServerList: []string{"iota"}, Flags: []ngsicli.Flag{ servicesLimitFlag, servicesOffsetFlag, resourceFlag, ngsicli.PrettyFlag, }, Action: func(c *ngsicli.Context, ngsi *ngsilib.NGSI, client *ngsilib.Client) error { return idasServicesList(c, ngsi, client) }, }, { Name: "create", Usage: "create a configuration group", ServerList: []string{"iota"}, Flags: []ngsicli.Flag{ servicesDataFlag, apikeyFlag, servicesTokenFlag, cbrokerFlag, typeFlag, resourceFlag, }, Action: func(c *ngsicli.Context, ngsi *ngsilib.NGSI, client *ngsilib.Client) error { return idasServicesCreate(c, ngsi, client) }, }, { Name: "update", Usage: "update a configuration group", ServerList: []string{"iota"}, Flags: []ngsicli.Flag{ resourceRFlag, servicesDataFlag, apikeyFlag, servicesTokenFlag, cbrokerFlag, typeFlag, }, RequiredFlags: []string{"resource"}, Action: func(c *ngsicli.Context, ngsi *ngsilib.NGSI, client *ngsilib.Client) error { return idasServicesUpdate(c, ngsi, client) }, }, { Name: "delete", Usage: "remove a configuration group", ServerList: []string{"iota"}, Flags: []ngsicli.Flag{ resourceRFlag, apikeyFlag, servicesDeviceFlag, }, RequiredFlags: []string{"resource"}, Action: func(c *ngsicli.Context, ngsi *ngsilib.NGSI, client *ngsilib.Client) error { return idasServicesDelete(c, ngsi, client) }, }, }, }
Functions ¶
func NewNgsiApp ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.