api

package
v0.71.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 30, 2023 License: GPL-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package api provides an API client sdk for making requests to a haul API server

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApiClient deprecated added in v0.31.0

type ApiClient struct {
	Key      string
	Host     string
	Port     int
	Protocol string
}

Deprecated: Use apiclient.APIClient instead

func NewApiClient deprecated added in v0.31.0

func NewApiClient(key, host, protocol string, port int) *ApiClient

Deprecated: Use apiclient.New instead

func NewApiClientFromViper deprecated added in v0.31.0

func NewApiClientFromViper() (*ApiClient, error)

Deprecated: Use apiclient.NewFromViper instead

func (*ApiClient) Call deprecated added in v0.31.0

func (a *ApiClient) Call(method, route string, requestBody io.Reader, useKey bool) (*http.Response, error)

Deprecated: Use (*apiclient.APIClient).Voki.Call instead

func (*ApiClient) CallResponder deprecated added in v0.48.3

func (a *ApiClient) CallResponder(method, route string, requestBody io.Reader, useKey bool, responder responses.Responder) error

Deprecated: Use (*apiclient.APIClient).Voki.Unmarshal instead

Makes ApiClient.Call() returning only an error. The Call data is put into the responder parameter's reference

func (*ApiClient) DeleteAsset deprecated added in v0.31.0

func (a *ApiClient) DeleteAsset(assetID int64) (response responses.DeleteAssetResponse, err error)

Deprecated: Use (*apiclient.APIClient) variant instead of (*ApiClient)

func (*ApiClient) DeleteAssetAttribute deprecated added in v0.52.0

func (a *ApiClient) DeleteAssetAttribute(assetAttributeID int64) (response responses.DeleteAssetAttributeResponse, err error)

Deprecated: Use (*apiclient.APIClient) variant instead of (*ApiClient)

func (*ApiClient) DeleteAssetTarget deprecated added in v0.40.2

func (a *ApiClient) DeleteAssetTarget(assetID int64) (response responses.DeleteAssetTargetResponse, err error)

Deprecated: Use (*apiclient.APIClient) variant instead of (*ApiClient)

func (*ApiClient) DeleteAssets deprecated added in v0.50.0

func (a *ApiClient) DeleteAssets(assetIDs []int64) (response responses.DeleteAssetsResponse, err error)

Deprecated: Use (*apiclient.APIClient) variant instead of (*ApiClient)

func (*ApiClient) DeleteAttribute deprecated added in v0.57.0

func (a *ApiClient) DeleteAttribute(attributeID int64) (response responses.DeleteAttributeResponse, err error)

Deprecated: Use (*apiclient.APIClient) variant instead of (*ApiClient)

func (*ApiClient) GetAllAssets deprecated added in v0.55.0

func (a *ApiClient) GetAllAssets(options options.GetAllAssetsOptions) (response responses.GetAllAssetsResponse, err error)

Deprecated: Use (*apiclient.APIClient) variant instead of (*ApiClient)

func (*ApiClient) GetAsset deprecated added in v0.44.0

func (a *ApiClient) GetAsset(assetID int64) (response responses.GetAssetResponse, err error)

Deprecated: Use (*apiclient.APIClient) variant instead of (*ApiClient)

func (*ApiClient) GetAssetAttributes deprecated added in v0.33.0

func (a *ApiClient) GetAssetAttributes(assetID int64) (response responses.GetAssetAttributesResponse, err error)

Deprecated: Use (*apiclient.APIClient) variant instead of (*ApiClient)

func (*ApiClient) GetAssetDescription deprecated added in v0.31.0

func (a *ApiClient) GetAssetDescription(assetID int64) (response responses.GetAssetDescriptionResponse, err error)

Deprecated: Use (*apiclient.APIClient) variant instead of (*ApiClient)

func (*ApiClient) GetAssetStatus deprecated added in v0.31.0

func (a *ApiClient) GetAssetStatus(assetID int64) (response responses.GetAssetStatusResponse, err error)

Deprecated: Use (*apiclient.APIClient) variant instead of (*ApiClient)

func (*ApiClient) GetAssetTarget deprecated added in v0.31.0

func (a *ApiClient) GetAssetTarget(assetID int64) (response responses.GetAssetTargetResponse, err error)

Deprecated: Use (*apiclient.APIClient) variant instead of (*ApiClient)

func (*ApiClient) GetAssetWithAttributes deprecated added in v0.44.0

func (a *ApiClient) GetAssetWithAttributes(assetID int64) (responses.GetAssetWithAttributesResponse, error)

Deprecated: Use (*apiclient.APIClient) variant instead of (*ApiClient)

func (*ApiClient) GetAssets deprecated added in v0.31.0

func (a *ApiClient) GetAssets(options options.GetAssetsOptions) (response responses.GetAssetsResponse, err error)

Deprecated: Use (*apiclient.APIClient) variant instead of (*ApiClient)

func (*ApiClient) GetAssetsAttributes deprecated added in v0.33.0

func (a *ApiClient) GetAssetsAttributes() (response responses.GetAssetsAttributesResponse, err error)

Deprecated: Use (*apiclient.APIClient) variant instead of (*ApiClient)

func (*ApiClient) GetAssetsWithAttributes deprecated added in v0.44.0

func (a *ApiClient) GetAssetsWithAttributes(deleted bool, pageSize, page int) (responses.GetAssetsWithAttributesResponse, error)

Deprecated: Use (*apiclient.APIClient) variant instead of (*ApiClient)

func (*ApiClient) GetAttribute deprecated added in v0.45.0

func (a *ApiClient) GetAttribute(attributeID int64) (response responses.GetAttributeResponse, err error)

Deprecated: Use (*apiclient.APIClient) variant instead of (*ApiClient)

func (*ApiClient) GetAttributeAssets deprecated added in v0.47.0

func (a *ApiClient) GetAttributeAssets(attributeID int64) (response responses.GetAttributeAssetsResponse, err error)

Deprecated: Use (*apiclient.APIClient) variant instead of (*ApiClient)

func (*ApiClient) GetAttributes deprecated added in v0.33.0

func (a *ApiClient) GetAttributes() (response responses.GetAttributesResponse, err error)

Deprecated: Use (*apiclient.APIClient) variant instead of (*ApiClient)

func (*ApiClient) GetEvents deprecated added in v0.31.0

func (a *ApiClient) GetEvents() (response responses.GetEventsResponse, err error)

Deprecated: Use (*apiclient.APIClient) variant instead of (*ApiClient)

func (*ApiClient) GetHealth deprecated added in v0.31.0

func (a *ApiClient) GetHealth() (response responses.GetHealthcheckResponse, err error)

Deprecated: Use (*apiclient.APIClient) variant instead of (*ApiClient)

GetHealth allows checking for API server health

func (*ApiClient) InsertAssetAttributes deprecated added in v0.33.0

func (a *ApiClient) InsertAssetAttributes(assetAttributes []models.AssetAttribute) (response responses.PostAssetAttributesResponse, err error)

Deprecated: Use (*apiclient.APIClient) variant instead of (*ApiClient)

func (*ApiClient) InsertAssets deprecated added in v0.31.0

func (a *ApiClient) InsertAssets(assets []models.Asset) (response responses.PostAssetsResponse, err error)

Deprecated: Use (*apiclient.APIClient) variant instead of (*ApiClient)

func (*ApiClient) InsertAttributes deprecated added in v0.33.0

func (a *ApiClient) InsertAttributes(attributes []models.Attribute) (response responses.PostAttributesResponse, err error)

Deprecated: Use (*apiclient.APIClient) variant instead of (*ApiClient)

func (*ApiClient) RestoreAsset deprecated added in v0.31.0

func (a *ApiClient) RestoreAsset(assetID int64) (response responses.RestoreAssetResponse, err error)

Deprecated: Use (*apiclient.APIClient) variant instead of (*ApiClient)

func (*ApiClient) RestoreAttribute deprecated added in v0.57.0

func (a *ApiClient) RestoreAttribute(attributeID int64) (response responses.RestoreAttributeResponse, err error)

Deprecated: Use (*apiclient.APIClient) variant instead of (*ApiClient)

func (*ApiClient) Seed deprecated added in v0.31.0

func (a *ApiClient) Seed() (response responses.PostSeedResponse, err error)

Deprecated: Use (*apiclient.APIClient) variant instead of (*ApiClient)

Seed allows creating the required tables in the database

func (*ApiClient) UpdateAssetDescription deprecated added in v0.31.0

func (a *ApiClient) UpdateAssetDescription(assetID int64, description string) (response responses.PutAssetDescriptionResponse, err error)

Deprecated: Use (*apiclient.APIClient) variant instead of (*ApiClient)

func (*ApiClient) UpdateAssetStatus deprecated added in v0.31.0

func (a *ApiClient) UpdateAssetStatus(assetID int64, status string) (response responses.PutAssetStatusResponse, err error)

Deprecated: Use (*apiclient.APIClient) variant instead of (*ApiClient)

func (*ApiClient) UpdateAssetTarget deprecated added in v0.31.0

func (a *ApiClient) UpdateAssetTarget(assetID, target int64) (response responses.PutAssetTargetResponse, err error)

Deprecated: Use (*apiclient.APIClient) variant instead of (*ApiClient)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL