Documentation
¶
Overview ¶
Package dnas provides a library for the Cisco DNA Spaces API
Index ¶
- Constants
- func Bool(v bool) *bool
- func Int(v int) *int
- func Int64(v int64) *int64
- func String(v string) *string
- type AccessPointStatus
- type AccessPointsCountResponse
- type AccessPointsResponse
- type AccessPointsService
- type ActiveClientsService
- func (s *ActiveClientsService) GetCount(ctx context.Context, opts *ClientParameters) (ClientCountResponse, error)
- func (s *ActiveClientsService) ListClients(ctx context.Context, opts *ClientParameters) (LocationDeviceResults, error)
- func (s *ActiveClientsService) ListFloors(ctx context.Context) (ClientFloorsResponse, error)
- type Client
- type ClientCountResponse
- type ClientFloorsResponse
- type ClientParameters
- type Err
- type HistoryClientsDeviceParameters
- type HistoryClientsDeviceResponse
- type HistoryClientsParameters
- type HistoryClientsResponse
- type HistoryCountParameters
- type HistoryCountResponse
- type HistoryItem
- type HistoryParameters
- type HistoryResponse
- type HistoryService
- func (s *HistoryService) GetClient(ctx context.Context, deviceID string, opts *HistoryClientsParameters) (HistoryClientsDeviceResponse, error)
- func (s *HistoryService) GetCount(ctx context.Context, opts *HistoryCountParameters) (HistoryCountResponse, error)
- func (s *HistoryService) GetHistory(ctx context.Context, opts *HistoryParameters) (HistoryResponse, error)
- func (s *HistoryService) ListClients(ctx context.Context, opts *HistoryClientsParameters) (HistoryClientsResponse, error)
- type LocationDevice
- type LocationDeviceQuery
- type LocationDeviceResults
- type MapElementResponse
- type MapHierarchyResponse
- type MapInclusionExclusionRegionItem
- type MapItem
- type MapItemCorner
- type MapItemDetails
- type MapItemRelationshipData
- type MapResImage
- type MapService
- type NotificationsService
Constants ¶
const ( ErrBadRequest = Err("dnas: bad request") ErrForbidden = Err("dnas: forbidden") ErrInternalError = Err("dnas: internal error") ErrUnknown = Err("dnas: unexpected error occurred") )
Error Constants Cisco documents these as the only error responses they will emit.
Variables ¶
This section is empty.
Functions ¶
func Bool ¶
Bool is a helper routine that allocates a new bool value to store v and returns a pointer to it.
func Int ¶
Int is a helper routine that allocates a new int value to store v and returns a pointer to it.
Types ¶
type AccessPointStatus ¶
type AccessPointStatus string
AccessPointStatus represents the status passed to get the access point count for a given status
const ( All AccessPointStatus = "all" Active AccessPointStatus = "active" Inactive AccessPointStatus = "inactive" Missing AccessPointStatus = "missing" )
Fields for AccessPointStatus
type AccessPointsCountResponse ¶
type AccessPointsCountResponse struct { // Count of access points for a given status Count int64 `json:"count"` }
AccessPointsCountResponse provides the count for the active, inactive, missing or all the access points from GetCount()
type AccessPointsResponse ¶
type AccessPointsResponse []struct { // ap mac ApMac string `json:"apMac,omitempty"` // The message count received. Count int64 `json:"count,omitempty"` // The message rate in 15 min. M15Rate float64 `json:"m15Rate,omitempty"` // The message rate in 1 min. M1Rate float64 `json:"m1Rate,omitempty"` // The message rate in 5 min. M5Rate float64 `json:"m5Rate,omitempty"` }
AccessPointsResponse provides a list of missing access points returned by ListAccessPoints
type AccessPointsService ¶
type AccessPointsService struct {
// contains filtered or unexported fields
}
AccessPointsService represents the Access Points API group
func (*AccessPointsService) GetCount ¶
func (s *AccessPointsService) GetCount(ctx context.Context, status AccessPointStatus) (AccessPointsCountResponse, error)
GetCount retrieves the count of the active, inactive, missing or all the access points. If no parameters are given, the count of all active access points is returned. Status may be missing, active, inactive or all
func (*AccessPointsService) ListAccessPoints ¶
func (s *AccessPointsService) ListAccessPoints(ctx context.Context) (AccessPointsResponse, error)
ListAccessPoints retrieves a list of missing access points. The only valid status is "missing" and is therefore not provided as an option.
type ActiveClientsService ¶
type ActiveClientsService struct {
// contains filtered or unexported fields
}
ActiveClientsService represents the Active Clients API group
func (*ActiveClientsService) GetCount ¶
func (s *ActiveClientsService) GetCount(ctx context.Context, opts *ClientParameters) (ClientCountResponse, error)
GetCount retrieves the active clients count. The API supports searching by a variety of parameters. If no parameters are given, the count of all active clients are returned.
func (*ActiveClientsService) ListClients ¶
func (s *ActiveClientsService) ListClients(ctx context.Context, opts *ClientParameters) (LocationDeviceResults, error)
ListClients returns active clients. If no parameters are given, all active clients are returned with pagination. The default page number is 1, default number of items per page is 1000.
func (*ActiveClientsService) ListFloors ¶
func (s *ActiveClientsService) ListFloors(ctx context.Context) (ClientFloorsResponse, error)
ListFloors provides a list of all the floors unique identifiers which have associated clients.
type Client ¶
type Client struct { // BaseURL for DNA Spaces API. Set to v1 and the relevant region using `dnas.New()`, or set directly. BaseURL string //HTTP Client to use for making requests, allowing the user to supply their own if required. HTTPClient *http.Client //API Key for DNA Spaces. See [the documentation on how to generate one](https://developer.cisco.com/docs/dna-spaces/#!getting-started). APIKey string AccessPointsService *AccessPointsService ActiveClientsService *ActiveClientsService HistoryService *HistoryService NotificationsService *NotificationsService MapService *MapService }
Client represents connectivity to the DNA Spaces API
type ClientCountResponse ¶
type ClientCountResponse struct { Results struct { Total int64 `json:"total"` } `json:"results"` Querystring LocationDeviceQuery `json:"querystring,omitempty"` Success bool `json:"success"` }
ClientCountResponse provides the count for the active devices from GetCount()
type ClientFloorsResponse ¶
type ClientFloorsResponse struct { Results []struct { // The total number of associated devices on this floor Count int64 `json:"count,omitempty"` // The floors unique identifier FloorID string `json:"floorId,omitempty"` } `json:"results"` Success bool `json:"success,omitempty"` }
ClientFloorsResponse holds the results from ListFloors()
type ClientParameters ¶
type ClientParameters struct { // ApMacAddress The mac address of the Access Point (AP). Available for associated clients only. ApMacAddress *string `url:"apMacAddress,omitempty"` // Associated true|false. Whether or not a device has connected to a network. Associated *bool `url:"associated,omitempty"` // BuildingID Unique identifier for a building from the map import process BuildingID *string `url:"buildingID,omitempty"` // CampusID Unique identifier for a campus from the map import process CampusID *string `url:"campusID,omitempty"` // DeviceID The device unique identifier, for example the device macAddress. DeviceID *string `url:"deviceID,omitempty"` // DeviceType CLIENT, TAG, ROGUE_AP, ROGUE_CLIENT or INTERFERER DeviceType *string `url:"deviceType,omitempty"` // FloorID Unique identifier for a floor from the map import process FloorID *string `url:"floorID,omitempty"` // Format Indicate if using geojson, value is "geojson" if so. Format *string `url:"format,omitempty"` // IPAddress IP address of the connected device. Available for associated clients only. IPAddress *string `url:"iPAddress,omitempty"` // Limit The maximum number of items that may be returned for a single request. For active client, the default value is 1000; For client location history, the default value is 2000. Sorry it's a string, but that's what we got! Limit *string `url:"limit,omitempty"` // Manufacturer Manufacturer of the device. Manufacturer *string `url:"manufacturer,omitempty"` // MapElementID Indicate the map element unique identifier. MapElementID *string `url:"mapElementID,omitempty"` // MapElementLevel Indicate the map element level, valid value is "campus", "building" and "floor". MapElementLevel *string `url:"mapElementLevel,omitempty"` // Page The page number requests for. Start from 1 and default value is 1. Sorry it's a string, but that's what we got! Page *string `url:"page,omitempty"` // RogueApClients When using deviceType=ROGUE_AP, this will return rogue APs that have connected clients. RogueApClients *bool `url:"rogueApClients,omitempty"` // Ssid Wifi service set identifier (SSID). Available for associated clients only. Ssid *string `url:"ssid,omitempty"` // Username The user name of the connected user. Available for associated clients only. Username *string `url:"username,omitempty"` }
ClientParameters represent the options for ListClients and GetCount
type HistoryClientsDeviceParameters ¶
type HistoryClientsDeviceParameters struct { // ApMacAddress The mac address of the Access Point (AP). Available for associated clients only. ApMacAddress *string `url:"apMacAddress,omitempty"` // BuildingID Unique identifier for a building from the map import process BuildingID *string `url:"buildingId,omitempty"` // CampusID Unique identifier for a campus from the map import process CampusID *string `url:"campusId,omitempty"` // The end time(in epoc time format based on milisecond) of the range of the time zone the request is initiated. EndTime *string `url:"endTime,omitempty"` // FloorID Unique identifier for a floor from the map import process FloorID *string `url:"floorId,omitempty"` // Format Indicate if using geojson, value is "geojson" if so. Format *string `url:"format,omitempty"` // The radius, it should go with x and y. Radius *float64 `url:"radius,omitempty"` // Ssid Wifi service set identifier (SSID). Available for associated clients only. Ssid *string `url:"ssid,omitempty"` // The start time(in epoc time format based on milisecond) of the range of the time zone the request is initiated. StartTime *string `url:"startTime,omitempty"` // The time zone the request is initiated, default is time zone 0(UTC time). TimeZone *int64 `url:"timeZone,omitempty"` // Username The user name of the connected user. Available for associated clients only. Username *string `url:"username,omitempty"` // The x coordinate of the radius center. X *float64 `url:"x,omitempty"` // The y coordinate of the radius center. Y *float64 `url:"y,omitempty"` }
HistoryClientsDeviceParameters represent the options for GetClient()
type HistoryClientsDeviceResponse ¶
type HistoryClientsDeviceResponse []struct { FloorID string `json:"floorId"` SourceTimestamp int64 `json:"sourceTimestamp"` Coordinates []float64 `json:"coordinates"` Associated bool `json:"associated"` AssociatedApmac string `json:"associatedApmac"` }
HistoryClientsDeviceResponse contains the response from GetClient()
type HistoryClientsParameters ¶
type HistoryClientsParameters struct { // ApMacAddress The mac address of the Access Point (AP). Available for associated clients only. ApMacAddress *string `url:"apMacAddress,omitempty"` // BuildingID Unique identifier for a building from the map import process BuildingID *string `url:"buildingId,omitempty"` // CampusID Unique identifier for a campus from the map import process CampusID *string `url:"campusId,omitempty"` // The end time(in epoc time format based on milisecond) of the range of the time zone the request is initiated. EndTime *string `url:"endTime,omitempty"` // FloorID Unique identifier for a floor from the map import process FloorID *string `url:"floorId,omitempty"` // The radius, it should go with x and y. Radius *float64 `url:"radius,omitempty"` // Ssid Wifi service set identifier (SSID). Available for associated clients only. Ssid *string `url:"ssid,omitempty"` // The start time(in epoc time format based on milisecond) of the range of the time zone the request is initiated. StartTime *string `url:"startTime,omitempty"` // The time zone the request is initiated, default is time zone 0(UTC time). TimeZone *int64 `url:"timeZone,omitempty"` // The x coordinate of the radius center. X *float64 `url:"x,omitempty"` // The y coordinate of the radius center. Y *float64 `url:"y,omitempty"` }
HistoryClientsParameters represent the options for GetClientsHistory()
type HistoryClientsResponse ¶
type HistoryClientsResponse []struct { MacAddress string `json:"macAddress,omitempty"` }
HistoryClientsResponse contains the response from ListClients which consists of an array of Mac Addresses
type HistoryCountParameters ¶
type HistoryCountParameters struct { // BuildingID Unique identifier for a building from the map import process BuildingID *string `url:"buildingId,omitempty"` // CampusID Unique identifier for a campus from the map import process CampusID *string `url:"campusId,omitempty"` // The end time(in epoc time format based on milisecond) of the range of the time zone the request is initiated. EndTime *string `url:"endTime,omitempty"` // FloorID Unique identifier for a floor from the map import process FloorID *string `url:"floorId,omitempty"` // The start time(in epoc time format based on milisecond) of the range of the time zone the request is initiated. StartTime *string `url:"startTime,omitempty"` // The time zone the request is initiated, default is time zone 0(UTC time). TimeZone *int64 `url:"timeZone,omitempty"` }
HistoryCountParameters represent the options for GetCount()
type HistoryCountResponse ¶
type HistoryCountResponse struct { // Count of clients given filter Count string `json:"count"` }
HistoryCountResponse provides the count for the active, inactive, missing or all the access points from GetCount()
type HistoryItem ¶
type HistoryItem struct { TenantID string `json:"tenantid"` MacAddress string `json:"macaddress"` DeviceType string `json:"devicetype"` CampusID string `json:"campusid"` BuildingID string `json:"buildingid"` FloorID string `json:"floorid"` FloorHierarchy string `json:"floorhierarchy"` CoordinateX string `json:"coordinatex"` CoordinateY string `json:"coordinatey"` SourceTimestamp string `json:"sourcetimestamp"` MaxDetectedApMac string `json:"maxdetectedapmac"` MaxDetectedBand string `json:"maxdetectedband"` DetectingControllers string `json:"detectingcontrollers"` FirstActiveAt string `json:"firstactiveat"` LocatedSinceActiveCount string `json:"locatedsinceactivecount"` ChangedOn string `json:"changedon"` Manufacturer string `json:"manufacturer"` Associated string `json:"associated"` MaxDetectedRssi string `json:"maxdetectedrssi"` Ssid string `json:"ssid"` Username string `json:"username"` AssociatedApMac string `json:"associatedapmac"` AssociatedApRssi string `json:"associatedaprssi"` MaxDetectedSlot string `json:"maxdetectedslot"` IPAddress string `json:"ipaddress"` StaticDevice string `json:"staticdevic"` RecordType string `json:"recordtype"` ComputeType string `json:"computetype"` Source string `json:"source"` MacHashed string `json:"machashed"` }
HistoryItem represents a single item in the HistoryResponse from the CSV output of GetHistory() Note that all results are returned as string since they're coming from CSV. This provides flexibility for conversion.
type HistoryParameters ¶
type HistoryParameters struct { // ApMacAddress The mac address of the Access Point (AP). Available for associated clients only. ApMacAddress *string `url:"apMacAddress,omitempty"` // BuildingID Unique identifier for a building from the map import process BuildingID *string `url:"buildingId,omitempty"` // CampusID Unique identifier for a campus from the map import process CampusID *string `url:"campusId,omitempty"` // DeviceID The device unique identifier, for example the device macAddress. DeviceID *string `url:"deviceId,omitempty"` // The end time(in epoc time format based on milisecond) of the range of the time zone the request is initiated. EndTime *string `url:"endTime,omitempty"` // FloorID Unique identifier for a floor from the map import process FloorID *string `url:"floorId,omitempty"` // Format Indicate if using geojson, value is "geojson" if so. Format *string `url:"format,omitempty"` // Ssid Wifi service set identifier (SSID). Available for associated clients only. Ssid *string `url:"ssid,omitempty"` // The start time(in epoc time format based on milisecond) of the range of the time zone the request is initiated. StartTime *string `url:"startTime,omitempty"` // The time zone the request is initiated, default is time zone 0(UTC time). TimeZone *int64 `url:"timeZone,omitempty"` // Username The user name of the connected user. Available for associated clients only. Username *string `url:"username,omitempty"` }
HistoryParameters represent the options for GetHistory()
type HistoryResponse ¶
type HistoryResponse struct {
Results []HistoryItem `json:"results"`
}
HistoryResponse represents the CSV response from GetHistory()
type HistoryService ¶
type HistoryService struct {
// contains filtered or unexported fields
}
HistoryService represents the Clients History API group
func (*HistoryService) GetClient ¶
func (s *HistoryService) GetClient(ctx context.Context, deviceID string, opts *HistoryClientsParameters) (HistoryClientsDeviceResponse, error)
GetClient retrieves the given client history details by using filters. Pagination is provided. The startTime and endTime time peroid is at most 1 day, if not being given, then the last 1 day's history of the client is returned. Default page is 1, 20k items per page (Note - 20k is requested by UI, pending to adjust to smaller page size based on test result).
func (*HistoryService) GetCount ¶
func (s *HistoryService) GetCount(ctx context.Context, opts *HistoryCountParameters) (HistoryCountResponse, error)
GetCount retrieves the clients history records amount in given time range. If startTime and endTime is not being given, the time range is last 24 hours.
func (*HistoryService) GetHistory ¶
func (s *HistoryService) GetHistory(ctx context.Context, opts *HistoryParameters) (HistoryResponse, error)
GetHistory retrieves a small amount of clients history to csv format. If startTime and endTime is not given, the time period is last 24 hours. If records amount is more than 50K, the user receives error response and indicates the time range needs to be reduced.
func (*HistoryService) ListClients ¶
func (s *HistoryService) ListClients(ctx context.Context, opts *HistoryClientsParameters) (HistoryClientsResponse, error)
ListClients retrieves the clients mac address list by using filters. If startTime and endTime are not given, all the clients' mac addresses in the last 1 day are being returned.
type LocationDevice ¶
type LocationDevice struct { // The list of APs. ApList []struct { ApMacAddress string `json:"apMacAddress,omitempty"` Bands []string `json:"bands,omitempty"` Rssi int64 `json:"rssi,omitempty"` } `json:"apList"` // AP Mac Address ApMacAddress string `json:"apMacAddress,omitempty"` // true|false. Whether or not a device has connected to a network. Associated bool `json:"associated,omitempty"` // Band Band string `json:"band,omitempty"` // unique identifier for a building from the map import process BuildingID string `json:"buildingId,omitempty"` // unique identifier for a campus from the map import process CampusID string `json:"campusId,omitempty"` // The UTC time the device state changed. // ChangedOn string `json:"changedOn,omitempty"` ChangedOn int64 `json:"changedOn,omitempty"` // The compute type, possible values are RSSI and AOA. ComputeType string `json:"computeType,omitempty"` // confidence factor ConfidenceFactor int64 `json:"confidenceFactor,omitempty"` // The controller IP. // Format: ipv4 Controller string `json:"controller,omitempty"` // x and y coordinates of a device. Coordinates []float64 `json:"coordinates"` // CLIENT, TAG, ROGUE_AP, or ROGUE_CLIENT DeviceType string `json:"deviceType,omitempty"` // The first time of the device location being detected. FirstLocatedAt string `json:"firstLocatedAt,omitempty"` // unique identifier for a floor from the map import process\ FloorID string `json:"floorId,omitempty"` // The Geo coordinates of a device. GeoCoordinates []float64 `json:"geoCoordinates"` // Site hierarchy Hierarchy string `json:"hierarchy,omitempty"` // IP Address IPAddress string `json:"ipAddress,omitempty"` // Is MAC Hashed IsMacHashed bool `json:"isMacHashed,omitempty"` // The last time of the location being detected. // Format: date-time LastLocationAt string `json:"lastLocationAt,omitempty"` // macaddress of the device. MacAddress string `json:"macAddress,omitempty"` // Manufacturer of the device. Manufacturer string `json:"manufacturer,omitempty"` // max detected rssi MaxDetectedRssi struct { ApMacAddress string `json:"apMacAddress,omitempty"` Band string `json:"band,omitempty"` Slot int64 `json:"slot,omitempty"` Rssi int64 `json:"rssi,omitempty"` AntennaIndex int64 `json:"antennaIndex,omitempty"` LastHeard int64 `json:"lastHeard,omitempty"` } `json:"maxDetectedRssi,omitempty"` // The number of detecting APs. NumDetectingAps int64 `json:"numDetectingAps,omitempty"` // The raw x and y coordinates of a device. RawCoordinates []float64 `json:"rawCoordinates"` // Source Source string `json:"source,omitempty"` // SSID SSID string `json:"ssid,omitempty"` // the tenant unique identifier TenantID string `json:"tenantId,omitempty"` // Username Username string `json:"userName,omitempty"` }
LocationDevice represents device location data for a single device
type LocationDeviceQuery ¶
type LocationDeviceQuery struct { ApMacAddress string `url:"apMacAddress,omitempty"` Associated string `url:"associated,omitempty"` BuildingID string `url:"buildingID,omitempty"` CampusID string `url:"campusID,omitempty"` DeviceID string `url:"deviceID,omitempty"` DeviceType string `url:"deviceType,omitempty"` FloorID string `url:"floorID,omitempty"` Format string `url:"format,omitempty"` IPAddress string `url:"iPAddress,omitempty"` Limit string `url:"limit,omitempty"` Manufacturer string `url:"manufacturer,omitempty"` MapElementID string `url:"mapElementID,omitempty"` MapElementLevel string `url:"mapElementLevel,omitempty"` Page string `url:"page,omitempty"` RogueApClients string `url:"rogueApClients,omitempty"` Ssid string `url:"ssid,omitempty"` Username string `url:"username,omitempty"` }
LocationDeviceQuery represents the QueryString values used. It's the same as ClientParameters, but the types are different, typically string for everything. Empty strings are returned for values that are missing.
type LocationDeviceResults ¶
type LocationDeviceResults struct { // True to inidcate there is next page, false otherwise MorePage bool `json:"morePage,omitempty"` Querystring LocationDeviceQuery `json:"querystring,omitempty"` // The list of device location data, include associated AP devices location data as the first item // and each device's mac address and coordinates as following items in the list. Results []LocationDevice `json:"results"` // True in a successful response. Success bool `json:"success,omitempty"` }
LocationDeviceResults provides device location data
type MapElementResponse ¶
MapElementResponse is the top level response for GetMapElement
type MapHierarchyResponse ¶
type MapHierarchyResponse struct { // Top level item for Map Items Map []MapItem `json:"map"` }
MapHierarchyResponse is the top level response for GetHierarchy
type MapInclusionExclusionRegionItem ¶
type MapInclusionExclusionRegionItem struct { // Indicate how to handle the vertices on map. Type string `json:"type,omitempty"` // The number of vertices. Vertices int64 `json:"vertices,omitempty"` }
MapInclusionExclusionRegionItem is supposed to represent an InclusionExclusionRegionItem. This is not currently used, but you could use it to extract InclusionExclusionRegionItems to.
type MapItem ¶
type MapItem struct { Address string `json:"address,omitempty"` // The date and time of the level being created. // Format: date-time CreatedOn string `json:"createdOn,omitempty"` // details Details MapItemDetails `json:"details,omitempty"` // Campus unique identifier. ID string `json:"id,omitempty"` // imported Id ImportedID string `json:"importedId,omitempty"` // The level in the hireachy. Level string `json:"level,omitempty"` // Campus name. Name string `json:"name,omitempty"` // relationship data RelationshipData MapItemRelationshipData `json:"relationshipData,omitempty"` SourceType string `json:"sourceType,omitempty"` }
MapItem represents an individual map element
type MapItemCorner ¶
type MapItemCorner struct { // x X float64 `json:"x,omitempty"` // y Y float64 `json:"y,omitempty"` // z Z float64 `json:"z,omitempty"` // Unit Unit string `json:"unit,omitempty"` }
MapItemCorner is supposed to represent part of an InclusionExclusionRegionItem. This is not currently used, but you could use it to extract InclusionExclusionRegionItems to.
type MapItemDetails ¶
type MapItemDetails struct { CalibrationModelRef string `json:"calibrationModelRef,omitempty"` FloorNumber int64 `json:"floorNumber,omitempty"` GpsMarkers []string `json:"GpsMarkers,omitempty"` // The level's map height. Height float64 `json:"height,omitempty"` // image Image MapResImage `json:"image,omitempty"` InclusionExclusionRegion []map[string]interface{} `json:"inclusionExclusionRegion,omitempty"` Latitude float64 `json:"latitude,omitempty"` // The level's map length. Length float64 `json:"length,omitempty"` Longitude float64 `json:"longitude,omitempty"` Obstacles []string `json:"obstacles,omitempty"` OffsetX float64 `json:"offsetX,omitempty"` OffsetY float64 `json:"offsetY,omitempty"` // The level's map width. Width float64 `json:"width,omitempty"` }
MapItemDetails contains additional detail for a MapItem
type MapItemRelationshipData ¶
type MapItemRelationshipData struct { // ancestor ids AncestorIds []string `json:"ancestorIds"` // ancestors Ancestors []string `json:"ancestors"` // children Children []MapItem `json:"children"` // parent Parent interface{} `json:"parent,omitempty"` }
MapItemRelationshipData contains the relationships with other map items
type MapResImage ¶
type MapResImage struct { Cksum string `json:"cksum,omitempty"` // color depth ColorDepth int64 `json:"colorDepth,omitempty"` // height Height int64 `json:"height,omitempty"` // Indicate if the source image is compressed(true) or not(false). ImageCompressed bool `json:"imageCompressed,omitempty"` // The image for the map. ImageName string `json:"imageName,omitempty"` // max resolution MaxResolution int64 `json:"maxResolution,omitempty"` // size Size int64 `json:"size,omitempty"` // source file SourceFile string `json:"sourceFile,omitempty"` // Indicate if the source image is valid(true) or not(false). ValidImageSupplied bool `json:"validImageSupplied,omitempty"` // width Width int64 `json:"width,omitempty"` // zoom level ZoomLevel int64 `json:"zoomLevel,omitempty"` }
MapResImage represents a map item image.
type MapService ¶
type MapService struct {
// contains filtered or unexported fields
}
MapService represents the Map API group
func (*MapService) GetHierarchy ¶
func (s *MapService) GetHierarchy(ctx context.Context) (MapHierarchyResponse, error)
GetHierarchy returns the Map hierarchy and includes campus, buildings and floors.
func (*MapService) GetMapElement ¶
func (s *MapService) GetMapElement(ctx context.Context, id string) (MapElementResponse, error)
GetMapElement retrieves a map element using it's identifier. The elements are campus, buildings and floors.
type NotificationsService ¶
type NotificationsService struct {
// contains filtered or unexported fields
}
NotificationsService represents the Notifications API group
Source Files
¶
Directories
¶
Path | Synopsis |
---|---|
examples
|
|
clients
Example: clients/main.go This example shows how to initialise the library and retrieve a list of devices.
|
Example: clients/main.go This example shows how to initialise the library and retrieve a list of devices. |
count
Example: count/main.go This example shows how to initialise the library and retrieve a count of devices.
|
Example: count/main.go This example shows how to initialise the library and retrieve a count of devices. |
floors
Example: floors/main.go This example shows how to initialise the library and retrieve a list of floors.
|
Example: floors/main.go This example shows how to initialise the library and retrieve a list of floors. |
history
Example: history/main.go This example shows how to initialise the library and retrieve a history of devices over the last two hours.
|
Example: history/main.go This example shows how to initialise the library and retrieve a history of devices over the last two hours. |