exporter

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2023 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExportAssetsAsCSV

func ExportAssetsAsCSV(w io.Writer, assets []*entities.Asset) error

func ExportAssetsAsJSON

func ExportAssetsAsJSON(w io.Writer, assets []*entities.Asset) error

Types

type Asset

type Asset struct {
	ID              int          `json:"id"`
	ParentAssetID   int          `json:"parentAssetID"`
	Category        string       `json:"category,omitempty"`
	CheckedOutTo    int          `json:"checkedOutTo,omitempty"`
	CreatedAt       time.Time    `json:"createdAt"`
	CreatedBy       int          `json:"createdBy"`
	CustomAttrs     []CustomAttr `json:"customAttrs"`
	ImageURL        string       `json:"imageURL,omitempty"`
	Location        string       `json:"location,omitempty"`
	Manufacturer    string       `json:"manufacturer,omitempty"`
	Model           string       `json:"model,omitempty"`
	ModelNo         string       `json:"modelNo,omitempty"`
	Name            string       `json:"name"`
	Notes           string       `json:"notes,omitempty"`
	PartsTotalCount int          `json:"partsTotalCount,omitempty"`
	PositionCode    string       `json:"positionCode,omitempty"`
	Quantity        int          `json:"quantity,omitempty"`
	QuantityUnit    string       `json:"quantityUnit,omitempty"`
	SerialNo        string       `json:"serialNo,omitempty"`
	Status          string       `json:"status"`
	Tag             string       `json:"tag"`
	ThumbnailURL    string       `json:"thumbnailURL,omitempty"`
	Type            string       `json:"type"`
	UpdatedAt       time.Time    `json:"updatedAt"`
	WarrantyUntil   time.Time    `json:"warrantyUntil,omitempty"`
}

type CustomAttr

type CustomAttr struct {
	Name  string `json:"name"`
	Value any    `json:"value"`
}

Jump to

Keyboard shortcuts

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