apiresponse

package
v0.96.2 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2023 License: GPL-2.0 Imports: 5 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 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 string
	}
}

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 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 AssetsDetailedGET added in v0.74.0

type AssetsDetailedGET struct {
	Response
	Data struct {
		AssetsDetailed []models.AssetDetailed
	}
}

AssetsDetailedGET is the response type for `GET /v1/assets/detailed`

func (AssetsDetailedGET) TabbyPrint added in v0.74.0

func (r AssetsDetailedGET) 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 AssetsRestorePOST added in v0.67.0

type AssetsRestorePOST struct {
	Response
	Data struct {
		AssetIDs []int64
	}
}

AssetsRestorePOST is the response type for `POST /v1/assets/restore`

func (AssetsRestorePOST) TabbyPrint added in v0.67.0

func (r AssetsRestorePOST) TabbyPrint() error

type AttributeAllowEmptyValueGET added in v0.96.0

type AttributeAllowEmptyValueGET struct {
	Response
	Data struct {
		AllowEmptyValue bool
	}
}

func (AttributeAllowEmptyValueGET) TabbyPrint added in v0.96.0

func (r AttributeAllowEmptyValueGET) TabbyPrint() error

type AttributeAllowEmptyValuePUT added in v0.75.0

type AttributeAllowEmptyValuePUT struct {
	AttributeGET
}

AttributeAllowEmptyValuePUT

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 AttributeKeyGET added in v0.95.0

type AttributeKeyGET struct {
	Response
	Data struct {
		Key string
	}
}

func (AttributeKeyGET) TabbyPrint added in v0.95.0

func (r AttributeKeyGET) TabbyPrint() error

type AttributeKeyPUT added in v0.75.0

type AttributeKeyPUT struct {
	AttributeGET
}

AttributeKeyPUT

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 AttributesDELETE added in v0.77.0

type AttributesDELETE struct {
	Response
	Data struct {
		AttributeIDs []int64
	}
}

AttributesDELETE

func (AttributesDELETE) TabbyPrint added in v0.77.0

func (r AttributesDELETE) 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
		APIVersion     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
	Tabby struct {
		Headers []any
		Lines   [][]any
	}
}

func (Response) BetterTabbyPrint added in v0.66.1

func (response Response) BetterTabbyPrint() error

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 SpecGET added in v0.87.0

type SpecGET struct {
	Response
	Data struct {
		RouteStrings []string
	}
}

SpecGET is the response type for `GET /v1/spec`

func (SpecGET) TabbyPrint added in v0.87.0

func (r SpecGET) TabbyPrint() error

type TabbyPrinter added in v0.60.0

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

type TagDELETE added in v0.78.0

type TagDELETE struct {
	Response
	Data struct {
		Tag models.Tag
	}
}

TagDELETE is the response type for `DELETE /v1/tags/{tag_id}`

func (TagDELETE) TabbyPrint added in v0.78.0

func (r TagDELETE) TabbyPrint() error

type TagDetailedGET added in v0.78.0

type TagDetailedGET struct {
	Response
	Data struct {
		TagDetailed models.TagDetailed
	}
}

TagDetailedGET is the response type for `GET /v1/tags/{tag_id}/detailed`

func (TagDetailedGET) TabbyPrint added in v0.78.0

func (r TagDetailedGET) TabbyPrint() error

type TagGET added in v0.78.0

type TagGET struct {
	Response
	Data struct {
		Tag models.Tag
	}
}

TagGET is the response type for `GET /v1/tags/{tag_id}`

func (TagGET) TabbyPrint added in v0.78.0

func (r TagGET) TabbyPrint() error

type TagValueGET added in v0.78.0

type TagValueGET struct {
	Response
	Data struct {
		Value string
	}
}

TagValueGET is the response type for `GET /v1/tags/{tag_id}/value`

func (TagValueGET) TabbyPrint added in v0.78.0

func (r TagValueGET) TabbyPrint() error

type TagValuePUT added in v0.78.0

type TagValuePUT struct {
	Response
	Data struct {
		Tag models.Tag
	}
}

TagValuePUT is the response type for `PUT /v1/tags/{tag_id}/value`

func (TagValuePUT) TabbyPrint added in v0.78.0

func (r TagValuePUT) TabbyPrint() error

type TagsDELETE added in v0.78.0

type TagsDELETE struct {
	Response
	Data struct {
		TagIDs []int64
	}
}

TagsDELETE is the response type for `DELETE /v1/tags`

func (TagsDELETE) TabbyPrint added in v0.78.0

func (r TagsDELETE) TabbyPrint() error

type TagsGET added in v0.78.0

type TagsGET struct {
	Response
	Data struct {
		Tags []models.Tag
	}
}

TagsGET is the response type for `GET /v1/tags`

func (TagsGET) TabbyPrint added in v0.78.0

func (r TagsGET) TabbyPrint() error

type TagsPOST added in v0.78.0

type TagsPOST struct {
	Response
	Data struct {
		Tags []models.TagDetailed
	}
}

TagsPOST is the response type for `POST /v1/tags`

func (TagsPOST) TabbyPrint added in v0.78.0

func (r TagsPOST) TabbyPrint() error

Jump to

Keyboard shortcuts

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