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) CallResponder(method, route string, requestBody io.Reader, useKey bool, ...) error
- func (a *ApiClient) DeleteAsset(assetID int64) (response responses.DeleteAssetResponse, err error)
- func (a *ApiClient) DeleteAssetAttribute(assetAttributeID int64) (response responses.DeleteAssetAttributeResponse, err error)
- func (a *ApiClient) DeleteAssetTarget(assetID int64) (response responses.DeleteAssetTargetResponse, err error)
- func (a *ApiClient) DeleteAssets(assetIDs []int64) (response responses.DeleteAssetsResponse, err error)
- func (a *ApiClient) GetAsset(assetID int64) (response responses.GetAssetResponse, err error)
- func (a *ApiClient) GetAssetAttributes(assetID int64) (response responses.GetAssetAttributesResponse, err error)
- func (a *ApiClient) GetAssetDescription(assetID int64) (response responses.GetAssetDescriptionResponse, err error)
- func (a *ApiClient) GetAssetStatus(assetID int64) (response responses.GetAssetStatusResponse, err error)
- func (a *ApiClient) GetAssetTarget(assetID int64) (response responses.GetAssetTargetResponse, err error)
- func (a *ApiClient) GetAssetWithAttributes(assetID int64) (responses.GetAssetWithAttributesResponse, error)
- func (a *ApiClient) GetAssets(deleted bool) (response responses.GetAssetsResponse, err error)
- func (a *ApiClient) GetAssetsAttributes() (response responses.GetAssetsAttributesResponse, err error)
- func (a *ApiClient) GetAssetsWithAttributes(deleted bool) (responses.GetAssetsWithAttributesResponse, error)
- func (a *ApiClient) GetAttribute(attributeID int64) (response responses.GetAttributeResponse, err error)
- func (a *ApiClient) GetAttributeAssets(attributeID int64) (response responses.GetAttributeAssetsResponse, err error)
- func (a *ApiClient) GetAttributes() (response responses.GetAttributesResponse, err error)
- func (a *ApiClient) GetEvents() (response responses.GetEventsResponse, err error)
- func (a *ApiClient) GetHealth() (response responses.GetHealthcheckResponse, err error)
- func (a *ApiClient) InsertAssetAttributes(assetAttributes []models.AssetAttribute) (response responses.PostAssetAttributesResponse, err error)
- func (a *ApiClient) InsertAssets(assets []models.Asset) (response responses.PostAssetsResponse, err error)
- func (a *ApiClient) InsertAttributes(attributes []models.Attribute) (response responses.PostAttributesResponse, err error)
- func (a *ApiClient) RestoreAsset(assetID int64) (response responses.RestoreAssetResponse, err error)
- func (a *ApiClient) Seed() (response responses.PostSeedResponse, err error)
- func (a *ApiClient) UpdateAssetDescription(assetID int64, description string) (response responses.PutAssetDescriptionResponse, err error)
- func (a *ApiClient) UpdateAssetStatus(assetID int64, status string) (response responses.PutAssetStatusResponse, err error)
- func (a *ApiClient) UpdateAssetTarget(assetID, target int64) (response responses.PutAssetTargetResponse, err 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) CallResponder ¶ added in v0.48.3
func (a *ApiClient) CallResponder(method, route string, requestBody io.Reader, useKey bool, responder responses.Responder) error
Makes ApiClient.Call() returning only an error. The Call data is put into the responder parameter's reference
func (*ApiClient) DeleteAsset ¶ added in v0.31.0
func (a *ApiClient) DeleteAsset(assetID int64) (response responses.DeleteAssetResponse, err error)
func (*ApiClient) DeleteAssetAttribute ¶ added in v0.52.0
func (a *ApiClient) DeleteAssetAttribute(assetAttributeID int64) (response responses.DeleteAssetAttributeResponse, err error)
func (*ApiClient) DeleteAssetTarget ¶ added in v0.40.2
func (a *ApiClient) DeleteAssetTarget(assetID int64) (response responses.DeleteAssetTargetResponse, err error)
func (*ApiClient) DeleteAssets ¶ added in v0.50.0
func (a *ApiClient) DeleteAssets(assetIDs []int64) (response responses.DeleteAssetsResponse, err error)
func (*ApiClient) GetAsset ¶ added in v0.44.0
func (a *ApiClient) GetAsset(assetID int64) (response responses.GetAssetResponse, err error)
func (*ApiClient) GetAssetAttributes ¶ added in v0.33.0
func (a *ApiClient) GetAssetAttributes(assetID int64) (response responses.GetAssetAttributesResponse, err error)
func (*ApiClient) GetAssetDescription ¶ added in v0.31.0
func (a *ApiClient) GetAssetDescription(assetID int64) (response responses.GetAssetDescriptionResponse, err error)
func (*ApiClient) GetAssetStatus ¶ added in v0.31.0
func (a *ApiClient) GetAssetStatus(assetID int64) (response responses.GetAssetStatusResponse, err error)
func (*ApiClient) GetAssetTarget ¶ added in v0.31.0
func (a *ApiClient) GetAssetTarget(assetID int64) (response responses.GetAssetTargetResponse, err error)
func (*ApiClient) GetAssetWithAttributes ¶ added in v0.44.0
func (a *ApiClient) GetAssetWithAttributes(assetID int64) (responses.GetAssetWithAttributesResponse, error)
func (*ApiClient) GetAssets ¶ added in v0.31.0
func (a *ApiClient) GetAssets(deleted bool) (response responses.GetAssetsResponse, err error)
func (*ApiClient) GetAssetsAttributes ¶ added in v0.33.0
func (a *ApiClient) GetAssetsAttributes() (response responses.GetAssetsAttributesResponse, err error)
func (*ApiClient) GetAssetsWithAttributes ¶ added in v0.44.0
func (a *ApiClient) GetAssetsWithAttributes(deleted bool) (responses.GetAssetsWithAttributesResponse, error)
func (*ApiClient) GetAttribute ¶ added in v0.45.0
func (a *ApiClient) GetAttribute(attributeID int64) (response responses.GetAttributeResponse, err error)
func (*ApiClient) GetAttributeAssets ¶ added in v0.47.0
func (a *ApiClient) GetAttributeAssets(attributeID int64) (response responses.GetAttributeAssetsResponse, err error)
func (*ApiClient) GetAttributes ¶ added in v0.33.0
func (a *ApiClient) GetAttributes() (response responses.GetAttributesResponse, err error)
func (*ApiClient) GetEvents ¶ added in v0.31.0
func (a *ApiClient) GetEvents() (response responses.GetEventsResponse, err error)
func (*ApiClient) GetHealth ¶ added in v0.31.0
func (a *ApiClient) GetHealth() (response responses.GetHealthcheckResponse, err error)
GetHealth allows checking for API server health
func (*ApiClient) InsertAssetAttributes ¶ added in v0.33.0
func (a *ApiClient) InsertAssetAttributes(assetAttributes []models.AssetAttribute) (response responses.PostAssetAttributesResponse, err 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) (response responses.RestoreAssetResponse, err error)
func (*ApiClient) Seed ¶ added in v0.31.0
func (a *ApiClient) Seed() (response responses.PostSeedResponse, err 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) (response responses.PutAssetTargetResponse, err error)
Click to show internal directories.
Click to hide internal directories.