Documentation ¶
Index ¶
- type ApiClient
- type AssetTreeApi
- func (assetTreeApi *AssetTreeApi) Get() (domain.AssetTree, error)
- func (assetTreeApi *AssetTreeApi) GetBranch(id uint32) (domain.Branch, error)
- func (assetTreeApi *AssetTreeApi) GetChildren(id uint32) (domain.AssetTree, error)
- func (assetTreeApi *AssetTreeApi) GetParents(id uint32) (domain.AssetTree, error)
- type AssetsApi
- func (assetsApi *AssetsApi) AddNewTag(asset domain.Asset, tagName string, tagValue string) error
- func (assetsApi *AssetsApi) AddNewTags(asset domain.Asset, tags []domain.Tag) error
- func (assetsApi *AssetsApi) CreateAuditLog(asset domain.Asset, log domain.AuditLog) error
- func (assetsApi *AssetsApi) DeleteTag(asset domain.Asset, tagName string) error
- type Client
- func (client *Client) ApiStatus() (*response.StatusResponse, error)
- func (client *Client) Auth(accessToken, username string) (*response.AuthResponse, error)
- func (client *Client) DeleteEquip(id uint32) (*response.DeleteResponse, error)
- func (client *Client) DeletePoint(id uint32) (*response.DeleteResponse, error)
- func (client *Client) DeleteSite(id uint32) (*response.DeleteResponse, error)
- func (client *Client) Init(host string) *Client
- func (client *Client) Login(un string, pw string) (*response.AuthResponse, error)
- func (client *Client) Search(body Query) (*response.SearchResponse, error)
- type ConnApi
- type EquipApi
- func (equipApi *EquipApi) AddNewTag(equip domain.Equip, name string, value string) error
- func (equipApi *EquipApi) BaseUrl() string
- func (equipApi *EquipApi) CreateOne(ask domain.Equip) (domain.Equip, error)
- func (equipApi *EquipApi) CurVals(equipId uint32, urids []string) (domain.EquipCurVals, error)
- func (equipApi *EquipApi) DeleteTag(equip domain.Equip, tagRef domain.TagRef) error
- func (equipApi *EquipApi) GetAll() (domain.Equips, error)
- func (equipApi *EquipApi) GetAllTags(equip domain.Equip) (domain.TagRefs, error)
- func (equipApi *EquipApi) GetOne(id uint32) (domain.Equip, error)
- func (equipApi *EquipApi) UpdateOne(id uint32, jsonBody []byte) (domain.Equip, error)
- type FormsApi
- func (formsApi *FormsApi) CreateControlOnRef(formControlName string, ref string, value string) (domain.FormControlRef, error)
- func (formsApi *FormsApi) GetAllControls() (domain.FormControlList, error)
- func (formsApi *FormsApi) GetAllControlsForAsset(ref string) (domain.FormControlRefList, error)
- func (formsApi *FormsApi) GetControlByName(name string) (domain.FormControl, error)
- type GeoApi
- type Parameter
- type PointApi
- func (pointApi *PointApi) AddNewTag(point domain.Point, name string, value string) error
- func (pointApi *PointApi) BaseUrl() string
- func (pointApi *PointApi) CreateOne(ask domain.Point) (domain.Point, error)
- func (pointApi *PointApi) CurVal(id uint32) (domain.CurVal, error)
- func (pointApi *PointApi) DeleteTag(point domain.Point, tagRef domain.TagRef) error
- func (pointApi *PointApi) GetAll(limit, offset int) (domain.Points, error)
- func (pointApi *PointApi) GetAllByRef(ref string) (domain.Points, error)
- func (pointApi *PointApi) GetAllPointTypes() (domain.PointTypes, error)
- func (pointApi *PointApi) GetAllTags(point domain.Point) (domain.TagRefs, error)
- func (pointApi *PointApi) GetOne(id uint32) (domain.Point, error)
- func (pointApi *PointApi) HisRead(id uint32, limit uint16, start uint64, end uint64) (domain.HisRead, error)
- func (pointApi *PointApi) ListPointTypeUrl() string
- func (pointApi *PointApi) UpdateOne(id uint32, jsonBody []byte) (domain.Point, error)
- type ProfileApi
- type Query
- type QueryParams
- type SearchApi
- type SiteApi
- func (siteApi *SiteApi) AddNewTag(site domain.Site, name string, value string) error
- func (siteApi *SiteApi) BaseUrl() string
- func (siteApi *SiteApi) CreateOne(ask domain.Site) (domain.Site, error)
- func (siteApi *SiteApi) GetAll() (domain.Sites, error)
- func (siteApi *SiteApi) GetOne(id uint32) (domain.Site, error)
- func (siteApi *SiteApi) UpdateOne(id uint32, jsonBody []byte) (domain.Site, error)
- type StatusApi
- type TagApi
- type UridApi
- func (uridApi *UridApi) AdminUrl() string
- func (uridApi *UridApi) BaseUrl() string
- func (uridApi *UridApi) CreateOne(ask domain.Urid) (domain.Urid, error)
- func (uridApi *UridApi) GetAll() (domain.Urids, error)
- func (uridApi *UridApi) GetOne(id uint32) (domain.Urid, error)
- func (uridApi *UridApi) UpdateOne(id uint32, jsonBody []byte) (domain.Urid, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApiClient ¶ added in v1.1.5743455404
type ApiClient interface { Init(host string) *Client Auth(accessToken, username string) (*response.AuthResponse, error) Login(un string, pw string) (*response.AuthResponse, error) ApiStatus() (*response.StatusResponse, error) Search(body Query) (*response.SearchResponse, error) DeletePoint(id uint32) (*response.DeleteResponse, error) DeleteEquip(id uint32) (*response.DeleteResponse, error) DeleteSite(id uint32) (*response.DeleteResponse, error) // contains filtered or unexported methods }
type AssetTreeApi ¶ added in v1.0.36
type AssetTreeApi struct {
// contains filtered or unexported fields
}
func (*AssetTreeApi) Get ¶ added in v1.0.36
func (assetTreeApi *AssetTreeApi) Get() (domain.AssetTree, error)
func (*AssetTreeApi) GetBranch ¶ added in v1.0.36
func (assetTreeApi *AssetTreeApi) GetBranch(id uint32) (domain.Branch, error)
func (*AssetTreeApi) GetChildren ¶ added in v1.0.36
func (assetTreeApi *AssetTreeApi) GetChildren(id uint32) (domain.AssetTree, error)
func (*AssetTreeApi) GetParents ¶ added in v1.0.36
func (assetTreeApi *AssetTreeApi) GetParents(id uint32) (domain.AssetTree, error)
type AssetsApi ¶ added in v1.1.2974061736
type AssetsApi struct {
// contains filtered or unexported fields
}
func (*AssetsApi) AddNewTags ¶ added in v1.1.3023876239
func (*AssetsApi) CreateAuditLog ¶ added in v1.1.5954711553
type Client ¶
type Client struct { AssetTreeApi AssetTreeApi AssetsApi AssetsApi StatusApi StatusApi SearchApi SearchApi PointApi PointApi EquipApi EquipApi SiteApi SiteApi ProfileApi ProfileApi ConnApi ConnApi GeoApi GeoApi UridApi UridApi TagApi TagApi FormsApi FormsApi // contains filtered or unexported fields }
func (*Client) Auth ¶ added in v1.0.66
func (client *Client) Auth(accessToken, username string) (*response.AuthResponse, error)
Auth
func (*Client) DeleteEquip ¶
func (client *Client) DeleteEquip(id uint32) (*response.DeleteResponse, error)
func (*Client) DeletePoint ¶
func (client *Client) DeletePoint(id uint32) (*response.DeleteResponse, error)
func (*Client) DeleteSite ¶
func (client *Client) DeleteSite(id uint32) (*response.DeleteResponse, error)
type EquipApi ¶
type EquipApi struct {
// contains filtered or unexported fields
}
func (*EquipApi) DeleteTag ¶ added in v1.1.3027747033
DeleteTag deletes a domain.TagRef from the provided domain.Equip
func (*EquipApi) GetAllTags ¶ added in v1.1.3027747033
GetAllTags returns all tags for the provided domain.Point
type FormsApi ¶ added in v1.1.3039586334
type FormsApi struct {
// contains filtered or unexported fields
}
func (*FormsApi) CreateControlOnRef ¶ added in v1.1.5753949227
func (*FormsApi) GetAllControls ¶ added in v1.1.3039586334
func (formsApi *FormsApi) GetAllControls() (domain.FormControlList, error)
func (*FormsApi) GetAllControlsForAsset ¶ added in v1.1.3039586334
func (formsApi *FormsApi) GetAllControlsForAsset(ref string) (domain.FormControlRefList, error)
func (*FormsApi) GetControlByName ¶ added in v1.1.5743455404
func (formsApi *FormsApi) GetControlByName(name string) (domain.FormControl, error)
type GeoApi ¶ added in v1.0.39
type GeoApi struct {
// contains filtered or unexported fields
}
func (*GeoApi) ClimateZone ¶ added in v1.0.39
returns climate zone for a county and state
type PointApi ¶
type PointApi struct {
// contains filtered or unexported fields
}
func (*PointApi) DeleteTag ¶ added in v1.1.3027747033
DeleteTag deletes a domain.TagRef from the provided domain.Point
func (*PointApi) GetAll ¶ added in v1.0.71
GetAll returns all points within the given limit and offset
func (*PointApi) GetAllByRef ¶ added in v1.0.70
func (*PointApi) GetAllPointTypes ¶ added in v1.1.8284267019
func (pointApi *PointApi) GetAllPointTypes() (domain.PointTypes, error)
func (*PointApi) GetAllTags ¶ added in v1.1.3027747033
GetAllTags returns all tags for the provided domain.Point
func (*PointApi) ListPointTypeUrl ¶ added in v1.1.8284267019
type ProfileApi ¶
type ProfileApi struct {
// contains filtered or unexported fields
}
type QueryParams ¶ added in v1.1.2974061736
type QueryParams struct { Id string `json:"id" schema:"id" sqlColumn:"id" sqlType:"bigint"` Ref string `json:"ref" schema:"ref" sqlColumn:"ref" sqlType:"text"` ProfileName string `json:"profileName" schema:"profileName" sqlColumn:"profile_name" sqlType:"text"` SiteId string `json:"siteId" schema:"siteId" sqlColumn:"site_id" sqlType:"bigint"` SiteRef string `json:"siteRef" schema:"siteRef" sqlColumn:"site_ref" sqlType:"text"` SiteName string `json:"siteName" schema:"siteName" sqlColumn:"site_name" sqlType:"text"` ProfileRef string `json:"profileRef" schema:"profileRef" sqlColumn:"profile_ref" sqlType:"text"` EquipId string `json:"equipId" schema:"equipId" sqlColumn:"equip_id" sqlType:"bigint"` EquipRef string `json:"equipRef" schema:"equipRef" sqlColumn:"equip_ref" sqlType:"text"` EquipName string `json:"equipName" schema:"equipName" sqlColumn:"equip_name" sqlType:"text"` RuleName string `json:"ruleName" schema:"ruleName" sqlColumn:"rule_name" sqlType:"text"` RuleId string `json:"ruleId" schema:"ruleId" sqlColumn:"rule_id" sqlType:"bigint"` Severity string `json:"severity" schema:"severity" sqlColumn:"severity" sqlType:"int"` Duration string `json:"dur" schema:"dur" sqlColumn:"dur" sqlType:"bigint"` PersonId string `json:"personId" schema:"personId" sqlColumn:"person_id" sqlType:"bigint"` Ts string `json:"ts" schema:"ts" sqlColumn:"ts" sqlType:"bigint" sqlDecorator:"to_timestamp(%)"` EndTs string `json:"endTs" schema:"endTs" sqlColumn:"end_ts" sqlType:"bigint" sqlDecorator:"to_timestamp(%)"` EventRef string `json:"eventRef" schema:"eventRef" sqlColumn:"event_ref" sqlType:"text"` Name string `json:"name" schema:"name" sqlColumn:"name" sqlType:"text"` GeoCity string `json:"geoCity" schema:"geoCity" sqlColumn:"geo_city" sqlType:"text"` GeoPostalCode string `json:"geoPostalCode" schema:"geoPostalCode" sqlColumn:"geo_postal_code" sqlType:"text"` Lat string `json:"lat" schema:"lat" sqlColumn:"lat" sqlType:"float"` Lon string `json:"lon" schema:"lon" sqlColumn:"lon" sqlType:"float"` Gsf string `json:"gsf" schema:"gsf" sqlColumn:"gsf" sqlType:"int"` GeoAddress2 string `json:"geoAddress2" schema:"geoAddress2" sqlColumn:"geo_address2" sqlType:"text"` GeoAddress1 string `json:"geoAddress1" schema:"geoAddress1" sqlColumn:"geo_address1" sqlType:"text"` GeoStateCode string `json:"geoStateCode" schema:"geoStateCode" sqlColumn:"geo_state_code" sqlType:"text"` Description string `json:"description" schema:"description" sqlColumn:"description" sqlType:"text"` EventId string `json:"eventId" schema:"eventId" sqlColumn:"event_id" sqlType:"bigint"` Limit int `json:"limit" schema:"limit"` Offset int `json:"offset" schema:"offset"` RequestName string `json:"-" schema:"-"` EventType string `json:"eventType" schema:"eventType" sqlColumn:"event_type" sqlType:"text"` DateCreated string `json:"dateCreated" schema:"dateCreated" sqlColumn:"date_created" sqlType:"bigint"` IssueStatus string `json:"issueStatus" schema:"issueStatus" sqlColumn:"issue_status_id" sqlType:"bigint"` TargetRef string `json:"targetRef" schema:"targetRef" sqlColumn:"target_ref" sqlType:"text"` EquipType string `json:"equipType" schema:"equipType" sqlColumn:"equip_type_name" sqlType:"text"` EquipTypeName string `json:"equipTypeName" schema:"equipTypeName" sqlColumn:"equip_type_name" sqlType:"text"` EquipTypeId string `json:"equipTypeId" schema:"equipTypeId" sqlColumn:"equip_type_id" sqlType:"bigint"` EquipTypeConfigName string `json:"equipTypeConfigName" schema:"equipTypeConfigName" sqlColumn:"equip_type_config_name" sqlType:"text"` PointTypeName string `json:"pointTypeName" schema:"pointTypeName" sqlColumn:"point_type_name" sqlType:"text"` PointTypeId string `json:"pointTypeId" schema:"pointTypeId" sqlColumn:"point_type_id" sqlType:"bigint"` PointUridName string `json:"pointUridName" schema:"pointUridName" sqlColumn:"point_urid_name" sqlType:"text"` PointUridId string `json:"pointUridId" schema:"pointUridId" sqlColumn:"point_urid_id" sqlType:"bigint"` Unit string `json:"unit" schema:"unit" sqlColumn:"unit" sqlType:"text"` Category string `json:"category" schema:"category" sqlColumn:"category" sqlType:"text"` Batch string `json:"batch" schema:"batch" sqlColumn:"batch" sqlType:"text"` SortA string `json:"sortA" schema:"sortA"` SortD string `json:"sortD" schema:"sortD"` WebAppMeta string `json:"webAppMeta" schema:"webAppMeta" sqlColumn:"web_app_meta" sqlType:"text"` FirstName string `json:"firstName" schema:"firstName" sqlColumn:"first_name" sqlType:"text"` PhoneNumber string `json:"phoneNumber" schema:"phoneNumber" sqlColumn:"phone_number" sqlType:"text"` Username string `json:"username" schema:"username" sqlColumn:"username" sqlType:"text"` LastName string `json:"lastName" schema:"lastName" sqlColumn:"last_name" sqlType:"text"` Email string `json:"email" schema:"email" sqlColumn:"email" sqlType:"text"` Enabled string `json:"enabled" schema:"enabled" sqlColumn:"enabled" sqlType:"boolean"` Code string `json:"code" schema:"code" sqlColumn:"code" sqlType:"text"` EulaOk string `json:"eulaOk" schema:"eulaOk" sqlColumn:"eula_ok" sqlType:"boolean"` PasswordExpired string `json:"passwordExpired" schema:"passwordExpired" sqlColumn:"password_expired" sqlType:"boolean"` Deleted string `json:"deleted" schema:"deleted" sqlColumn:"deleted" sqlType:"boolean"` AccountExpired string `json:"accountExpired" schema:"accountExpired" sqlColumn:"account_expired" sqlType:"boolean"` AccountLocked string `json:"accountLocked" schema:"accountLocked" sqlColumn:"account_locked" sqlType:"boolean"` }
func (*QueryParams) BuildParameterizedQuery ¶ added in v1.1.2974061736
func (q *QueryParams) BuildParameterizedQuery(sql string) (string, []interface{}, error)
BuildParameterizedQuery appends a parametrized query to the provided sql statement and returns the query with arguments
func (*QueryParams) DecodeParameters ¶ added in v1.1.2974061736
func (q *QueryParams) DecodeParameters() ([]Parameter, error)
func (*QueryParams) HashKey ¶ added in v1.1.2974061736
func (q *QueryParams) HashKey() string
HashKey creates a compounded string of the current QueryParams
func (*QueryParams) Validate ¶ added in v1.1.2974061736
func (q *QueryParams) Validate() bool
type SearchApi ¶
type SearchApi struct {
// contains filtered or unexported fields
}
func (*SearchApi) Search ¶
func (searchApi *SearchApi) Search(query Query) (*response.SearchResponse, error)
* Search using a query
func (*SearchApi) SearchText ¶
func (searchApi *SearchApi) SearchText(query string, page uint16, size uint16) (*response.SearchResponse, error)
convenience func to Search(Query)
type SiteApi ¶
type SiteApi struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.