apiresponse

package
v0.64.0 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2023 License: GPL-2.0 Imports: 4 Imported by: 1

Documentation

Overview

Package apiresponse defines haul's API response types

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AssetAttributeDELETE added in v0.63.0

type AssetAttributeDELETE struct {
	Response
	Data struct {
		AssetAttribute models.AssetAttribute
	}
}

AssetAttributeDELETE is the response type for `DELETE /v1/asset-attributes/{asset_attribute_id}`

func (AssetAttributeDELETE) TabbyPrint added in v0.63.0

func (r AssetAttributeDELETE) TabbyPrint() error

type AssetAttributeGET added in v0.64.0

type AssetAttributeGET struct {
	Response
	Data struct {
		AssetAttribute models.AssetAttribute
	}
}

AssetAttributeGET is the response type for `DGET /v1/asset-attributes/{asset_attribute_id}`

func (AssetAttributeGET) TabbyPrint added in v0.64.0

func (r AssetAttributeGET) TabbyPrint() error

type AssetAttributesGET added in v0.63.0

type AssetAttributesGET struct {
	Response
	Data struct {
		Asset     models.Asset
		KeyValues []models.KeyValue
	}
}

AssetAttributesGET is the response type for `GET /v1/assets/{asset_id}/attributes`

func (AssetAttributesGET) TabbyPrint added in v0.63.0

func (r AssetAttributesGET) TabbyPrint() error

type AssetDELETE added in v0.63.0

type AssetDELETE struct {
	Response
	Data struct {
		AssetID     int64
		AffectedIDs []int64
	}
}

AssetDELETE is the response type for `DELETE /v1/assets/{asset_id}`

func (AssetDELETE) TabbyPrint added in v0.63.0

func (r AssetDELETE) TabbyPrint() error

type AssetDescriptionGET added in v0.63.0

type AssetDescriptionGET struct {
	Response
	Data struct {
		AssetID     int64
		Description string
	}
}

AssetDescriptionGET is the response type for `GET /v1/assets/{asset_id}/description`

func (AssetDescriptionGET) TabbyPrint added in v0.63.0

func (r AssetDescriptionGET) TabbyPrint() error

type AssetDescriptionPUT added in v0.63.0

type AssetDescriptionPUT struct {
	Response
	Data struct {
		AssetID     int64
		Description string
	}
}

AssetDescriptionPUT is the response type for `PUT /v1/assets/{asset_id}/description`

func (AssetDescriptionPUT) TabbyPrint added in v0.63.0

func (r AssetDescriptionPUT) TabbyPrint() error

type AssetGET added in v0.63.0

type AssetGET struct {
	Response
	Data struct {
		Asset models.Asset
	}
}

AssetGET is the response type for `GET /v1/assets/{asset_id}`

func (AssetGET) TabbyPrint added in v0.63.0

func (r AssetGET) TabbyPrint() error

type AssetRestorePOST added in v0.63.0

type AssetRestorePOST struct {
	Response
	Data struct {
		AssetID int64
	}
}

AssetRestorePOST is the response type for `POST /v1/assets/{asset_id}/restore`

func (AssetRestorePOST) TabbyPrint added in v0.63.0

func (r AssetRestorePOST) TabbyPrint() error

type AssetStatusDELETE added in v0.63.0

type AssetStatusDELETE struct {
	Response
	Data struct {
		AssetID   int64
		OldStatus int64
	}
}

AssetStatusDELETE is the response type for `DELETE /v1/assets/{asset_id}/status`

func (AssetStatusDELETE) TabbyPrint added in v0.63.0

func (r AssetStatusDELETE) TabbyPrint() error

type AssetStatusGET added in v0.63.0

type AssetStatusGET struct {
	Response
	Data struct {
		AssetID int64
		Status  string
	}
}

AssetStatusGET is the response type for `GET /v1/assets/{asset_id}/status`

func (AssetStatusGET) TabbyPrint added in v0.63.0

func (r AssetStatusGET) TabbyPrint() error

type AssetStatusPUT added in v0.63.0

type AssetStatusPUT struct {
	Response
	Data struct {
		AssetID int64
		Status  string
	}
}

AssetStatusPUT is the response type for `PUT /v1/assets/{asset_id}/status`

func (AssetStatusPUT) TabbyPrint added in v0.63.0

func (r AssetStatusPUT) TabbyPrint() error

type AssetTargetDELETE added in v0.63.0

type AssetTargetDELETE struct {
	Response
	Data struct {
		AssetID   int64
		OldTarget int64
	}
}

AssetTargetDELETE is the response type for `DELETE /v1/assets/{asset_id}/target`

func (AssetTargetDELETE) TabbyPrint added in v0.63.0

func (r AssetTargetDELETE) TabbyPrint() error

type AssetTargetGET added in v0.63.0

type AssetTargetGET struct {
	Response
	Data struct {
		AssetID int64
		Target  int64
	}
}

AssetTargetGET is the response type for `GET /v1/assets/{asset_id}/target`

func (AssetTargetGET) TabbyPrint added in v0.63.0

func (r AssetTargetGET) TabbyPrint() error

type AssetTargetPUT added in v0.63.0

type AssetTargetPUT struct {
	Response
	Data struct {
		AssetID int64
		Target  int64
	}
}

AssetTargetPUT is the response type for `PUT /v1/assets/{asset_id}/target`

func (AssetTargetPUT) TabbyPrint added in v0.63.0

func (r AssetTargetPUT) TabbyPrint() error

type AssetsAllGET added in v0.60.0

type AssetsAllGET struct {
	Response
	Data struct {
		Assets []models.Asset
	}
}

AssetsAllGET is the response type for `GET /v1/assets/all`

func (AssetsAllGET) TabbyPrint added in v0.60.0

func (r AssetsAllGET) TabbyPrint() error

type AssetsAttributesGET added in v0.63.0

type AssetsAttributesGET struct {
	Response
	Data struct {
		AssetAttributes []models.AssetAttribute
	}
}

AssetsAttributesGET is the response type for `GET /v1/asset-attributes`

func (AssetsAttributesGET) TabbyPrint added in v0.63.0

func (r AssetsAttributesGET) TabbyPrint() error

type AssetsAttributesPOST added in v0.63.1

type AssetsAttributesPOST struct {
	Response
	Data struct {
		AssetAttributes []models.AssetAttribute
	}
}

AssetsAttributesPOST is the response type for `POST /v1/asset-attributes`

func (AssetsAttributesPOST) TabbyPrint added in v0.63.1

func (r AssetsAttributesPOST) TabbyPrint() error

type AssetsDELETE added in v0.63.0

type AssetsDELETE struct {
	Response
	Data struct {
		AssetIDs    []int64
		AffectedIDs []int64
	}
}

AssetsDELETE is the response type for `DELETE /v1/assets`

func (AssetsDELETE) TabbyPrint added in v0.63.0

func (r AssetsDELETE) TabbyPrint() error

type AssetsGET added in v0.63.0

type AssetsGET struct {
	Response
	Data struct {
		Assets []models.Asset
	}
}

AssetsGET is the response type for `GET /v1/assets`

func (AssetsGET) TabbyPrint added in v0.63.0

func (r AssetsGET) TabbyPrint() error

type AssetsPOST added in v0.63.0

type AssetsPOST struct {
	Response
	Data struct {
		Assets []models.Asset
	}
}

AssetsPOST is the response type for `POST /v1/assets`

func (AssetsPOST) TabbyPrint added in v0.63.0

func (r AssetsPOST) TabbyPrint() error

type AttributeAssetsGET added in v0.63.0

type AttributeAssetsGET struct {
	Response
	Data struct {
		AssetsWithAttributes []models.AssetWithAttributes
	}
}

AttributeAssetsGET is the response type for `GET /v1/attributes/{attribute_id}/assets`

func (AttributeAssetsGET) TabbyPrint added in v0.63.0

func (r AttributeAssetsGET) TabbyPrint() error

type AttributeDELETE added in v0.63.0

type AttributeDELETE struct {
	Response
	Data struct {
		Attribute models.Attribute
	}
}

AttributeDELETE is the response type for `DELETE /v1/attributes/{attribute_id}`

func (AttributeDELETE) TabbyPrint added in v0.63.0

func (r AttributeDELETE) TabbyPrint() error

type AttributeGET added in v0.63.0

type AttributeGET struct {
	Response
	Data struct {
		Attribute models.Attribute
	}
}

AttributeGET is the response type for `GET /v1/attributes/{attribute_id}`

func (AttributeGET) TabbyPrint added in v0.63.0

func (r AttributeGET) TabbyPrint() error

type AttributeRestorePOST added in v0.63.0

type AttributeRestorePOST struct {
	Response
	Data struct {
		Attribute models.Attribute
	}
}

AttributeRestorePOST is the response type for `POST /v1/attributes/{attribute_id}/restore`

func (AttributeRestorePOST) TabbyPrint added in v0.63.0

func (r AttributeRestorePOST) TabbyPrint() error

type AttributesGET added in v0.63.0

type AttributesGET struct {
	Response
	Data struct {
		Attributes []models.Attribute
	}
}

AttributesGET is the response type for `GET /v1/attributes`

func (AttributesGET) TabbyPrint added in v0.63.0

func (r AttributesGET) TabbyPrint() error

type AttributesPOST added in v0.63.0

type AttributesPOST struct {
	Response
	Data struct {
		Attributes []models.Attribute
	}
}

AttributesPOST is the response type for `POST /v1/attributes`

func (AttributesPOST) TabbyPrint added in v0.63.0

func (r AttributesPOST) TabbyPrint() error

type EventsGET added in v0.62.0

type EventsGET struct {
	Response
	Data struct {
		Events []models.Event
	}
}

EventsGET is the response type for `GET /v1/events`

func (EventsGET) TabbyPrint added in v0.62.0

func (r EventsGET) TabbyPrint() error

type HealthGET

type HealthGET struct {
	Response
	Data struct {
		DatabaseStatus string
	}
}

HealthGET is the response type for `GET /v1/health`

func (HealthGET) TabbyPrint added in v0.60.0

func (r HealthGET) TabbyPrint() error

type Response added in v0.60.0

type Response struct {
	response.Response
}

func (Response) TabbyPrint added in v0.61.0

func (r Response) TabbyPrint() error

func (Response) TabbyPrintInfo added in v0.60.0

func (r Response) TabbyPrintInfo() error

type SeedPOST added in v0.61.0

type SeedPOST struct {
	Response
}

SeedPOST is the response type for `POST /v1/seed`

type TabbyPrinter added in v0.60.0

type TabbyPrinter interface {
	response.Responder
	TabbyPrint() error
	TabbyPrintInfo() error
}

Jump to

Keyboard shortcuts

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