Documentation ¶
Overview ¶
Package api provides an API client sdk for making requests to a haul API server
Index ¶
- type ApiClient
- func (a *ApiClient) Call(method, route string, requestBody io.Reader, useKey bool) (*http.Response, error)
- func (a *ApiClient) ClearAssetTarget(assetID int64) (responses.DeleteAssetTargetResponse, error)
- func (a *ApiClient) DeleteAsset(assetID int64) (responses.DeleteAssetResponse, error)
- func (a *ApiClient) GetAssetAttributes(assetID int64) (responses.GetAssetAttributesResponse, error)
- func (a *ApiClient) GetAssetDescription(assetID int64) (responses.GetAssetDescriptionResponse, error)
- func (a *ApiClient) GetAssetStatus(assetID int64) (responses.GetAssetStatusResponse, error)
- func (a *ApiClient) GetAssetTarget(assetID int64) (responses.GetAssetTargetResponse, error)
- func (a *ApiClient) GetAssets(deleted bool) (responses.GetAssetsResponse, error)
- func (a *ApiClient) GetAssetsAttributes() (responses.GetAssetsAttributesResponse, error)
- func (a *ApiClient) GetAttributes() (responses.GetAttributesResponse, error)
- func (a *ApiClient) GetEvents() (responses.GetEventsResponse, error)
- func (a *ApiClient) GetHealth() (responses.GetHealthcheckResponse, error)
- func (a *ApiClient) InsertAssetAttributes(assetAttributes []models.AssetAttribute) (responses.PostAssetAttributesResponse, error)
- func (a *ApiClient) InsertAssets(assets []models.Asset) (responses.PostAssetsResponse, error)
- func (a *ApiClient) InsertAttributes(attributes []models.Attribute) (responses.PostAttributesResponse, error)
- func (a *ApiClient) RestoreAsset(assetID int64) (responses.RestoreAssetResponse, error)
- func (a *ApiClient) Seed() (responses.PostSeedResponse, error)
- func (a *ApiClient) UpdateAssetDescription(assetID int64, description string) (responses.PutAssetDescriptionResponse, error)
- func (a *ApiClient) UpdateAssetStatus(assetID int64, status string) (responses.PutAssetStatusResponse, error)
- func (a *ApiClient) UpdateAssetTarget(assetID, target int64) (responses.PutAssetTargetResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApiClient ¶ added in v0.31.0
func NewApiClient ¶ added in v0.31.0
func NewApiClientFromViper ¶ added in v0.31.0
func (*ApiClient) ClearAssetTarget ¶ added in v0.31.0
func (a *ApiClient) ClearAssetTarget(assetID int64) (responses.DeleteAssetTargetResponse, error)
func (*ApiClient) DeleteAsset ¶ added in v0.31.0
func (a *ApiClient) DeleteAsset(assetID int64) (responses.DeleteAssetResponse, error)
func (*ApiClient) GetAssetAttributes ¶ added in v0.33.0
func (a *ApiClient) GetAssetAttributes(assetID int64) (responses.GetAssetAttributesResponse, error)
func (*ApiClient) GetAssetDescription ¶ added in v0.31.0
func (a *ApiClient) GetAssetDescription(assetID int64) (responses.GetAssetDescriptionResponse, error)
func (*ApiClient) GetAssetStatus ¶ added in v0.31.0
func (a *ApiClient) GetAssetStatus(assetID int64) (responses.GetAssetStatusResponse, error)
func (*ApiClient) GetAssetTarget ¶ added in v0.31.0
func (a *ApiClient) GetAssetTarget(assetID int64) (responses.GetAssetTargetResponse, error)
func (*ApiClient) GetAssets ¶ added in v0.31.0
func (a *ApiClient) GetAssets(deleted bool) (responses.GetAssetsResponse, error)
func (*ApiClient) GetAssetsAttributes ¶ added in v0.33.0
func (a *ApiClient) GetAssetsAttributes() (responses.GetAssetsAttributesResponse, error)
func (*ApiClient) GetAttributes ¶ added in v0.33.0
func (a *ApiClient) GetAttributes() (responses.GetAttributesResponse, error)
func (*ApiClient) GetEvents ¶ added in v0.31.0
func (a *ApiClient) GetEvents() (responses.GetEventsResponse, error)
func (*ApiClient) GetHealth ¶ added in v0.31.0
func (a *ApiClient) GetHealth() (responses.GetHealthcheckResponse, error)
GetHealth allows checking for API server health
func (*ApiClient) InsertAssetAttributes ¶ added in v0.33.0
func (a *ApiClient) InsertAssetAttributes(assetAttributes []models.AssetAttribute) (responses.PostAssetAttributesResponse, error)
func (*ApiClient) InsertAssets ¶ added in v0.31.0
func (*ApiClient) InsertAttributes ¶ added in v0.33.0
func (*ApiClient) RestoreAsset ¶ added in v0.31.0
func (a *ApiClient) RestoreAsset(assetID int64) (responses.RestoreAssetResponse, error)
func (*ApiClient) Seed ¶ added in v0.31.0
func (a *ApiClient) Seed() (responses.PostSeedResponse, error)
Seed allows creating the required tables in the database
func (*ApiClient) UpdateAssetDescription ¶ added in v0.31.0
func (*ApiClient) UpdateAssetStatus ¶ added in v0.31.0
func (*ApiClient) UpdateAssetTarget ¶ added in v0.31.0
func (a *ApiClient) UpdateAssetTarget(assetID, target int64) (responses.PutAssetTargetResponse, error)
Click to show internal directories.
Click to hide internal directories.