Documentation
¶
Overview ¶
Package apiv1 provides primitives to interact with the openapi HTTP API.
Code generated by github.com/deepmap/oapi-codegen version v1.12.5-0.20230118012357-f4cf8f9a5703 DO NOT EDIT.
Index ¶
- func Handler(si ServerInterface) http.Handler
- func HandlerFromMux(si ServerInterface, r chi.Router) http.Handler
- func HandlerFromMuxWithBaseURL(si ServerInterface, r chi.Router, baseURL string) http.Handler
- func HandlerWithOptions(si ServerInterface, options ChiServerOptions) http.Handler
- type Asset
- type AssetCtrl
- type AssetFile
- type AssetListPage
- type AssetPart
- type AssetStatus
- type Category
- type CategoryCtrl
- type CategoryListPage
- type ChiServerOptions
- type CreateAsset201JSONResponse
- type CreateAsset400JSONResponse
- type CreateAsset401JSONResponse
- type CreateAssetJSONBody
- type CreateAssetJSONRequestBody
- type CreateAssetRequest
- type CreateAssetRequestObject
- type CreateAssetResponseObject
- type CustomAttr
- type CustomAttrCtrl
- type CustomAttrListPage
- type DeleteAsset204Response
- type DeleteAsset401JSONResponse
- type DeleteAsset404JSONResponse
- type DeleteAssetRequestObject
- type DeleteAssetResponseObject
- type Error
- type GetAsset200JSONResponse
- type GetAsset401JSONResponse
- type GetAsset404JSONResponse
- type GetAssetParams
- type GetAssetRequestObject
- type GetAssetResponseObject
- type InvalidParamFormatError
- type ListAssets200JSONResponse
- type ListAssetsParams
- type ListAssetsRequestObject
- type ListAssetsResponseObject
- type ListCategories200JSONResponse
- type ListCategoriesParams
- type ListCategoriesRequestObject
- type ListCategoriesResponseObject
- type ListCustomAttrs200JSONResponse
- type ListCustomAttrsParams
- type ListCustomAttrsRequestObject
- type ListCustomAttrsResponseObject
- type ListLocations200JSONResponse
- type ListLocationsParams
- type ListLocationsRequestObject
- type ListLocationsResponseObject
- type ListManufacturers200JSONResponse
- type ListManufacturersParams
- type ListManufacturersRequestObject
- type ListManufacturersResponseObject
- type ListModels200JSONResponse
- type ListModelsParams
- type ListModelsRequestObject
- type ListModelsResponseObject
- type ListPositionCodes200JSONResponse
- type ListPositionCodesParams
- type ListPositionCodesRequestObject
- type ListPositionCodesResponseObject
- type ListSuppliers200JSONResponse
- type ListSuppliersParams
- type ListSuppliersRequestObject
- type ListSuppliersResponseObject
- type ListTags200JSONResponse
- type ListTagsParams
- type ListTagsRequestObject
- type ListTagsResponseObject
- type ListUsers200JSONResponse
- type ListUsersParams
- type ListUsersRequestObject
- type ListUsersResponseObject
- type Location
- type LocationCtrl
- type LocationListPage
- type Manufacturer
- type ManufacturerCtrl
- type ManufacturerListPage
- type MiddlewareFunc
- type Model
- type ModelCtrl
- type ModelListPage
- type PositionCode
- type PositionCodeListPage
- type Purchase
- type RequiredHeaderError
- type RequiredParamError
- type Router
- func (r *Router) CreateAsset(ctx context.Context, req CreateAssetRequestObject) (CreateAssetResponseObject, error)
- func (r *Router) DeleteAsset(ctx context.Context, req DeleteAssetRequestObject) (DeleteAssetResponseObject, error)
- func (r *Router) GetAsset(ctx context.Context, req GetAssetRequestObject) (GetAssetResponseObject, error)
- func (r *Router) ListAssets(ctx context.Context, req ListAssetsRequestObject) (ListAssetsResponseObject, error)
- func (r *Router) ListCategories(ctx context.Context, req ListCategoriesRequestObject) (ListCategoriesResponseObject, error)
- func (r *Router) ListCustomAttrs(ctx context.Context, req ListCustomAttrsRequestObject) (ListCustomAttrsResponseObject, error)
- func (r *Router) ListLocations(ctx context.Context, req ListLocationsRequestObject) (ListLocationsResponseObject, error)
- func (r *Router) ListManufacturers(ctx context.Context, req ListManufacturersRequestObject) (ListManufacturersResponseObject, error)
- func (r *Router) ListModels(ctx context.Context, req ListModelsRequestObject) (ListModelsResponseObject, error)
- func (r *Router) ListPositionCodes(ctx context.Context, req ListPositionCodesRequestObject) (ListPositionCodesResponseObject, error)
- func (r *Router) ListSuppliers(ctx context.Context, req ListSuppliersRequestObject) (ListSuppliersResponseObject, error)
- func (r *Router) ListTags(ctx context.Context, req ListTagsRequestObject) (ListTagsResponseObject, error)
- func (r *Router) ListUsers(ctx context.Context, req ListUsersRequestObject) (ListUsersResponseObject, error)
- func (r *Router) UpdateAsset(ctx context.Context, req UpdateAssetRequestObject) (UpdateAssetResponseObject, error)
- type ServerInterface
- type ServerInterfaceWrapper
- func (siw *ServerInterfaceWrapper) CreateAsset(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) DeleteAsset(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetAsset(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ListAssets(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ListCategories(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ListCustomAttrs(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ListLocations(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ListManufacturers(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ListModels(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ListPositionCodes(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ListSuppliers(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ListTags(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ListUsers(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) UpdateAsset(w http.ResponseWriter, r *http.Request)
- type StrictHTTPServerOptions
- type StrictHandlerFunc
- type StrictMiddlewareFunc
- type StrictServerInterface
- type Supplier
- type SupplierCtrl
- type SupplierListPage
- type Tag
- type TagCtrl
- type TagListPage
- type TooManyValuesForParamError
- type UnescapedCookieParamError
- type UnmarshallingParamError
- type UpdateAsset200JSONResponse
- type UpdateAsset400JSONResponse
- type UpdateAsset401JSONResponse
- type UpdateAsset404JSONResponse
- type UpdateAssetJSONBody
- type UpdateAssetJSONRequestBody
- type UpdateAssetRequest
- type UpdateAssetRequestObject
- type UpdateAssetResponseObject
- type User
- type UserCtrl
- type UserListPage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Handler ¶
func Handler(si ServerInterface) http.Handler
Handler creates http.Handler with routing matching OpenAPI spec.
func HandlerFromMux ¶
func HandlerFromMux(si ServerInterface, r chi.Router) http.Handler
HandlerFromMux creates http.Handler with routing matching OpenAPI spec based on the provided mux.
func HandlerFromMuxWithBaseURL ¶
func HandlerFromMuxWithBaseURL(si ServerInterface, r chi.Router, baseURL string) http.Handler
func HandlerWithOptions ¶
func HandlerWithOptions(si ServerInterface, options ChiServerOptions) http.Handler
HandlerWithOptions creates http.Handler with additional options
Types ¶
type Asset ¶
type Asset struct { Category *string `json:"category,omitempty"` CheckedOutTo *int `json:"checkedOutTo,omitempty"` Children *[]Asset `json:"children,omitempty"` CreatedAt openapi_types.Date `json:"createdAt"` CreatedBy int `json:"createdBy"` CustomAttrs []CustomAttr `json:"customAttrs"` Files []AssetFile `json:"files"` Id int `json:"id"` 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"` ParentAssetID *int `json:"parentAssetID,omitempty"` Parts []AssetPart `json:"parts"` PartsTotalCount *int `json:"partsTotalCount,omitempty"` PositionCode *string `json:"positionCode,omitempty"` Purchases []Purchase `json:"purchases"` Quantity *int `json:"quantity,omitempty"` QuantityUnit *string `json:"quantityUnit,omitempty"` SerialNo *string `json:"serialNo,omitempty"` Status AssetStatus `json:"status"` Tag string `json:"tag"` ThumbnailURL *string `json:"thumbnailURL,omitempty"` Type string `json:"type"` UpdatedAt openapi_types.Date `json:"updatedAt"` WarrantyUntil *openapi_types.Date `json:"warrantyUntil,omitempty"` }
Asset defines model for Asset.
type AssetCtrl ¶
type AssetCtrl interface { Get(ctx context.Context, query control.GetAssetQuery) (*entities.Asset, error) List(ctx context.Context, query control.ListAssetsQuery) (*entities.ListPage[*entities.Asset], error) Create(ctx context.Context, cmd control.CreateAssetCmd) (*entities.Asset, error) Update(ctx context.Context, cmd control.UpdateAssetCmd) (*entities.Asset, error) Delete(ctx context.Context, asset *entities.Asset) error }
type AssetFile ¶
type AssetFile struct { AssetID int `json:"assetID"` CreatedAt openapi_types.Date `json:"createdAt"` CreatedBy int `json:"createdBy"` Filetype string `json:"filetype"` Id int `json:"id"` Name string `json:"name"` PublicPath string `json:"publicPath"` Sha256 string `json:"sha256"` SizeBytes int `json:"sizeBytes"` UpdatedAt openapi_types.Date `json:"updatedAt"` }
AssetFile defines model for AssetFile.
type AssetListPage ¶
type AssetListPage struct { Assets []Asset `json:"assets"` NumPages int `json:"numPages"` Page int `json:"page"` PageSize int `json:"pageSize"` Total int `json:"total"` }
AssetListPage defines model for AssetListPage.
type AssetPart ¶
type AssetPart struct { AssetID int `json:"assetID"` CreatedAt openapi_types.Date `json:"createdAt"` CreatedBy int `json:"createdBy"` Id int `json:"id"` Location *string `json:"location,omitempty"` Name string `json:"name"` Notes *string `json:"notes,omitempty"` PositionCode *string `json:"positionCode,omitempty"` Tag string `json:"tag"` UpdatedAt openapi_types.Date `json:"updatedAt"` }
AssetPart defines model for AssetPart.
type AssetStatus ¶
type AssetStatus string
AssetStatus defines model for Asset.Status.
const ( ARCHIVED AssetStatus = "ARCHIVED" INSTORAGE AssetStatus = "IN_STORAGE" INUSE AssetStatus = "IN_USE" )
Defines values for AssetStatus.
type Category ¶
type Category struct {
Name string `json:"name"`
}
Category defines model for Category.
type CategoryCtrl ¶
type CategoryListPage ¶
type CategoryListPage struct { Categories []Category `json:"categories"` NumPages int `json:"numPages"` Page int `json:"page"` PageSize int `json:"pageSize"` Total int `json:"total"` }
CategoryListPage defines model for CategoryListPage.
type ChiServerOptions ¶
type ChiServerOptions struct { BaseURL string BaseRouter chi.Router Middlewares []MiddlewareFunc ErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error) }
type CreateAsset201JSONResponse ¶
type CreateAsset201JSONResponse Asset
func (CreateAsset201JSONResponse) VisitCreateAssetResponse ¶
func (response CreateAsset201JSONResponse) VisitCreateAssetResponse(w http.ResponseWriter) error
type CreateAsset400JSONResponse ¶
type CreateAsset400JSONResponse Error
func (CreateAsset400JSONResponse) VisitCreateAssetResponse ¶
func (response CreateAsset400JSONResponse) VisitCreateAssetResponse(w http.ResponseWriter) error
type CreateAsset401JSONResponse ¶
type CreateAsset401JSONResponse Error
func (CreateAsset401JSONResponse) VisitCreateAssetResponse ¶
func (response CreateAsset401JSONResponse) VisitCreateAssetResponse(w http.ResponseWriter) error
type CreateAssetJSONBody ¶
type CreateAssetJSONBody struct { Category *string `json:"category,omitempty"` CheckedOutTo *int `json:"checkedOutTo,omitempty"` CustomAttrs []CustomAttr `json:"customAttrs"` 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"` ParentAssetID *int `json:"parentAssetID,omitempty"` Parts []AssetPart `json:"parts"` PartsTotalCount *int `json:"partsTotalCount,omitempty"` PositionCode *string `json:"positionCode,omitempty"` Purchases []Purchase `json:"purchases"` Quantity *int `json:"quantity,omitempty"` QuantityUnit *string `json:"quantityUnit,omitempty"` SerialNo *string `json:"serialNo,omitempty"` Status AssetStatus `json:"status"` Tag *string `json:"tag,omitempty"` Type string `json:"type"` WarrantyUntil *openapi_types.Date `json:"warrantyUntil,omitempty"` }
CreateAssetJSONBody defines parameters for CreateAsset.
type CreateAssetJSONRequestBody ¶
type CreateAssetJSONRequestBody CreateAssetJSONBody
CreateAssetJSONRequestBody defines body for CreateAsset for application/json ContentType.
type CreateAssetRequest ¶
type CreateAssetRequest struct { Category *string `json:"category,omitempty"` CheckedOutTo *int `json:"checkedOutTo,omitempty"` CustomAttrs []CustomAttr `json:"customAttrs"` 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"` ParentAssetID *int `json:"parentAssetID,omitempty"` Parts []AssetPart `json:"parts"` PartsTotalCount *int `json:"partsTotalCount,omitempty"` PositionCode *string `json:"positionCode,omitempty"` Purchases []Purchase `json:"purchases"` Quantity *int `json:"quantity,omitempty"` QuantityUnit *string `json:"quantityUnit,omitempty"` SerialNo *string `json:"serialNo,omitempty"` Status AssetStatus `json:"status"` Tag *string `json:"tag,omitempty"` Type string `json:"type"` WarrantyUntil *openapi_types.Date `json:"warrantyUntil,omitempty"` }
CreateAssetRequest defines model for CreateAssetRequest.
type CreateAssetRequestObject ¶
type CreateAssetRequestObject struct {
Body *CreateAssetJSONRequestBody
}
type CreateAssetResponseObject ¶
type CreateAssetResponseObject interface {
VisitCreateAssetResponse(w http.ResponseWriter) error
}
type CustomAttr ¶
CustomAttr defines model for CustomAttr.
type CustomAttrCtrl ¶
type CustomAttrCtrl interface {
List(ctx context.Context, query control.ListCustomAttrsQuery) (*entities.ListPage[*entities.CustomAttr], error)
}
type CustomAttrListPage ¶
type CustomAttrListPage struct { CustomAttrs []CustomAttr `json:"customAttrs"` NumPages int `json:"numPages"` Page int `json:"page"` PageSize int `json:"pageSize"` Total int `json:"total"` }
CustomAttrListPage defines model for CustomAttrListPage.
type DeleteAsset204Response ¶
type DeleteAsset204Response struct { }
func (DeleteAsset204Response) VisitDeleteAssetResponse ¶
func (response DeleteAsset204Response) VisitDeleteAssetResponse(w http.ResponseWriter) error
type DeleteAsset401JSONResponse ¶
type DeleteAsset401JSONResponse Error
func (DeleteAsset401JSONResponse) VisitDeleteAssetResponse ¶
func (response DeleteAsset401JSONResponse) VisitDeleteAssetResponse(w http.ResponseWriter) error
type DeleteAsset404JSONResponse ¶
type DeleteAsset404JSONResponse Error
func (DeleteAsset404JSONResponse) VisitDeleteAssetResponse ¶
func (response DeleteAsset404JSONResponse) VisitDeleteAssetResponse(w http.ResponseWriter) error
type DeleteAssetRequestObject ¶
type DeleteAssetRequestObject struct {
TagOrID string `json:"tagOrID"`
}
type DeleteAssetResponseObject ¶
type DeleteAssetResponseObject interface {
VisitDeleteAssetResponse(w http.ResponseWriter) error
}
type Error ¶
type Error struct { Code int `json:"code"` Detail string `json:"detail"` Title string `json:"title"` Type string `json:"type"` }
Error API error object that follow RFC7807 (https://datatracker.ietf.org/doc/html/rfc7807).
type GetAsset200JSONResponse ¶
type GetAsset200JSONResponse Asset
func (GetAsset200JSONResponse) VisitGetAssetResponse ¶
func (response GetAsset200JSONResponse) VisitGetAssetResponse(w http.ResponseWriter) error
type GetAsset401JSONResponse ¶
type GetAsset401JSONResponse Error
func (GetAsset401JSONResponse) VisitGetAssetResponse ¶
func (response GetAsset401JSONResponse) VisitGetAssetResponse(w http.ResponseWriter) error
type GetAsset404JSONResponse ¶
type GetAsset404JSONResponse Error
func (GetAsset404JSONResponse) VisitGetAssetResponse ¶
func (response GetAsset404JSONResponse) VisitGetAssetResponse(w http.ResponseWriter) error
type GetAssetParams ¶
type GetAssetParams struct {
IncludeChildren *bool `form:"include_children,omitempty" json:"include_children,omitempty"`
}
GetAssetParams defines parameters for GetAsset.
type GetAssetRequestObject ¶
type GetAssetRequestObject struct { TagOrID string `json:"tagOrID"` Params GetAssetParams }
type GetAssetResponseObject ¶
type GetAssetResponseObject interface {
VisitGetAssetResponse(w http.ResponseWriter) error
}
type InvalidParamFormatError ¶
func (*InvalidParamFormatError) Error ¶
func (e *InvalidParamFormatError) Error() string
func (*InvalidParamFormatError) Unwrap ¶
func (e *InvalidParamFormatError) Unwrap() error
type ListAssets200JSONResponse ¶
type ListAssets200JSONResponse AssetListPage
func (ListAssets200JSONResponse) VisitListAssetsResponse ¶
func (response ListAssets200JSONResponse) VisitListAssetsResponse(w http.ResponseWriter) error
type ListAssetsParams ¶
type ListAssetsParams struct { PageSize *int `form:"page_size,omitempty" json:"page_size,omitempty"` Page *int `form:"page,omitempty" json:"page,omitempty"` Type *string `form:"type,omitempty" json:"type,omitempty"` OrderBy *string `form:"order_by,omitempty" json:"order_by,omitempty"` OrderDir *string `form:"order_dir,omitempty" json:"order_dir,omitempty"` Query *string `form:"query,omitempty" json:"query,omitempty"` }
ListAssetsParams defines parameters for ListAssets.
type ListAssetsRequestObject ¶
type ListAssetsRequestObject struct {
Params ListAssetsParams
}
type ListAssetsResponseObject ¶
type ListAssetsResponseObject interface {
VisitListAssetsResponse(w http.ResponseWriter) error
}
type ListCategories200JSONResponse ¶
type ListCategories200JSONResponse CategoryListPage
func (ListCategories200JSONResponse) VisitListCategoriesResponse ¶
func (response ListCategories200JSONResponse) VisitListCategoriesResponse(w http.ResponseWriter) error
type ListCategoriesParams ¶
type ListCategoriesParams struct { PageSize *int `form:"page_size,omitempty" json:"page_size,omitempty"` Page *int `form:"page,omitempty" json:"page,omitempty"` Query *string `form:"query,omitempty" json:"query,omitempty"` }
ListCategoriesParams defines parameters for ListCategories.
type ListCategoriesRequestObject ¶
type ListCategoriesRequestObject struct {
Params ListCategoriesParams
}
type ListCategoriesResponseObject ¶
type ListCategoriesResponseObject interface {
VisitListCategoriesResponse(w http.ResponseWriter) error
}
type ListCustomAttrs200JSONResponse ¶
type ListCustomAttrs200JSONResponse CustomAttrListPage
func (ListCustomAttrs200JSONResponse) VisitListCustomAttrsResponse ¶
func (response ListCustomAttrs200JSONResponse) VisitListCustomAttrsResponse(w http.ResponseWriter) error
type ListCustomAttrsParams ¶
type ListCustomAttrsParams struct { PageSize *int `form:"page_size,omitempty" json:"page_size,omitempty"` Page *int `form:"page,omitempty" json:"page,omitempty"` Query *string `form:"query,omitempty" json:"query,omitempty"` }
ListCustomAttrsParams defines parameters for ListCustomAttrs.
type ListCustomAttrsRequestObject ¶
type ListCustomAttrsRequestObject struct {
Params ListCustomAttrsParams
}
type ListCustomAttrsResponseObject ¶
type ListCustomAttrsResponseObject interface {
VisitListCustomAttrsResponse(w http.ResponseWriter) error
}
type ListLocations200JSONResponse ¶
type ListLocations200JSONResponse LocationListPage
func (ListLocations200JSONResponse) VisitListLocationsResponse ¶
func (response ListLocations200JSONResponse) VisitListLocationsResponse(w http.ResponseWriter) error
type ListLocationsParams ¶
type ListLocationsParams struct { PageSize *int `form:"page_size,omitempty" json:"page_size,omitempty"` Page *int `form:"page,omitempty" json:"page,omitempty"` Query *string `form:"query,omitempty" json:"query,omitempty"` }
ListLocationsParams defines parameters for ListLocations.
type ListLocationsRequestObject ¶
type ListLocationsRequestObject struct {
Params ListLocationsParams
}
type ListLocationsResponseObject ¶
type ListLocationsResponseObject interface {
VisitListLocationsResponse(w http.ResponseWriter) error
}
type ListManufacturers200JSONResponse ¶
type ListManufacturers200JSONResponse ManufacturerListPage
func (ListManufacturers200JSONResponse) VisitListManufacturersResponse ¶
func (response ListManufacturers200JSONResponse) VisitListManufacturersResponse(w http.ResponseWriter) error
type ListManufacturersParams ¶
type ListManufacturersParams struct { PageSize *int `form:"page_size,omitempty" json:"page_size,omitempty"` Page *int `form:"page,omitempty" json:"page,omitempty"` Query *string `form:"query,omitempty" json:"query,omitempty"` }
ListManufacturersParams defines parameters for ListManufacturers.
type ListManufacturersRequestObject ¶
type ListManufacturersRequestObject struct {
Params ListManufacturersParams
}
type ListManufacturersResponseObject ¶
type ListManufacturersResponseObject interface {
VisitListManufacturersResponse(w http.ResponseWriter) error
}
type ListModels200JSONResponse ¶
type ListModels200JSONResponse ModelListPage
func (ListModels200JSONResponse) VisitListModelsResponse ¶
func (response ListModels200JSONResponse) VisitListModelsResponse(w http.ResponseWriter) error
type ListModelsParams ¶
type ListModelsParams struct { PageSize *int `form:"page_size,omitempty" json:"page_size,omitempty"` Page *int `form:"page,omitempty" json:"page,omitempty"` Query *string `form:"query,omitempty" json:"query,omitempty"` }
ListModelsParams defines parameters for ListModels.
type ListModelsRequestObject ¶
type ListModelsRequestObject struct {
Params ListModelsParams
}
type ListModelsResponseObject ¶
type ListModelsResponseObject interface {
VisitListModelsResponse(w http.ResponseWriter) error
}
type ListPositionCodes200JSONResponse ¶
type ListPositionCodes200JSONResponse PositionCodeListPage
func (ListPositionCodes200JSONResponse) VisitListPositionCodesResponse ¶
func (response ListPositionCodes200JSONResponse) VisitListPositionCodesResponse(w http.ResponseWriter) error
type ListPositionCodesParams ¶
type ListPositionCodesParams struct { PageSize *int `form:"page_size,omitempty" json:"page_size,omitempty"` Page *int `form:"page,omitempty" json:"page,omitempty"` Query *string `form:"query,omitempty" json:"query,omitempty"` }
ListPositionCodesParams defines parameters for ListPositionCodes.
type ListPositionCodesRequestObject ¶
type ListPositionCodesRequestObject struct {
Params ListPositionCodesParams
}
type ListPositionCodesResponseObject ¶
type ListPositionCodesResponseObject interface {
VisitListPositionCodesResponse(w http.ResponseWriter) error
}
type ListSuppliers200JSONResponse ¶
type ListSuppliers200JSONResponse SupplierListPage
func (ListSuppliers200JSONResponse) VisitListSuppliersResponse ¶
func (response ListSuppliers200JSONResponse) VisitListSuppliersResponse(w http.ResponseWriter) error
type ListSuppliersParams ¶
type ListSuppliersParams struct { PageSize *int `form:"page_size,omitempty" json:"page_size,omitempty"` Page *int `form:"page,omitempty" json:"page,omitempty"` Query *string `form:"query,omitempty" json:"query,omitempty"` }
ListSuppliersParams defines parameters for ListSuppliers.
type ListSuppliersRequestObject ¶
type ListSuppliersRequestObject struct {
Params ListSuppliersParams
}
type ListSuppliersResponseObject ¶
type ListSuppliersResponseObject interface {
VisitListSuppliersResponse(w http.ResponseWriter) error
}
type ListTags200JSONResponse ¶
type ListTags200JSONResponse TagListPage
func (ListTags200JSONResponse) VisitListTagsResponse ¶
func (response ListTags200JSONResponse) VisitListTagsResponse(w http.ResponseWriter) error
type ListTagsParams ¶
type ListTagsParams struct { PageSize *int `form:"page_size,omitempty" json:"page_size,omitempty"` Page *int `form:"page,omitempty" json:"page,omitempty"` Query *string `form:"query,omitempty" json:"query,omitempty"` }
ListTagsParams defines parameters for ListTags.
type ListTagsRequestObject ¶
type ListTagsRequestObject struct {
Params ListTagsParams
}
type ListTagsResponseObject ¶
type ListTagsResponseObject interface {
VisitListTagsResponse(w http.ResponseWriter) error
}
type ListUsers200JSONResponse ¶
type ListUsers200JSONResponse UserListPage
func (ListUsers200JSONResponse) VisitListUsersResponse ¶
func (response ListUsers200JSONResponse) VisitListUsersResponse(w http.ResponseWriter) error
type ListUsersParams ¶
type ListUsersParams struct { PageSize *int `form:"page_size,omitempty" json:"page_size,omitempty"` Page *int `form:"page,omitempty" json:"page,omitempty"` Type *string `form:"type,omitempty" json:"type,omitempty"` OrderBy *string `form:"order_by,omitempty" json:"order_by,omitempty"` OrderDir *string `form:"order_dir,omitempty" json:"order_dir,omitempty"` Query *string `form:"query,omitempty" json:"query,omitempty"` }
ListUsersParams defines parameters for ListUsers.
type ListUsersRequestObject ¶
type ListUsersRequestObject struct {
Params ListUsersParams
}
type ListUsersResponseObject ¶
type ListUsersResponseObject interface {
VisitListUsersResponse(w http.ResponseWriter) error
}
type Location ¶
type Location struct {
Name string `json:"name"`
}
Location defines model for Location.
type LocationCtrl ¶
type LocationListPage ¶
type LocationListPage struct { Locations []Location `json:"locations"` NumPages int `json:"numPages"` Page int `json:"page"` PageSize int `json:"pageSize"` Total int `json:"total"` }
LocationListPage defines model for LocationListPage.
type Manufacturer ¶
Manufacturer defines model for Manufacturer.
type ManufacturerCtrl ¶
type ManufacturerCtrl interface {
List(ctx context.Context, query control.ListManufacturersQuery) (*entities.ListPage[*entities.Manufacturer], error)
}
type ManufacturerListPage ¶
type ManufacturerListPage struct { Manufacturers []Manufacturer `json:"manufacturers"` NumPages int `json:"numPages"` Page int `json:"page"` PageSize int `json:"pageSize"` Total int `json:"total"` }
ManufacturerListPage defines model for ManufacturerListPage.
type ModelListPage ¶
type ModelListPage struct { Models []Model `json:"models"` NumPages int `json:"numPages"` Page int `json:"page"` PageSize int `json:"pageSize"` Total int `json:"total"` }
ModelListPage defines model for ModelListPage.
type PositionCode ¶
type PositionCode struct {
Code string `json:"code"`
}
PositionCode defines model for PositionCode.
type PositionCodeListPage ¶
type PositionCodeListPage struct { NumPages int `json:"numPages"` Page int `json:"page"` PageSize int `json:"pageSize"` PositionCodes []PositionCode `json:"positionCodes"` Total int `json:"total"` }
PositionCodeListPage defines model for PositionCodeListPage.
type Purchase ¶
type Purchase struct { Amount *int `json:"amount,omitempty"` Currency *string `json:"currency,omitempty"` Date *openapi_types.Date `json:"date,omitempty"` OrderNo *string `json:"orderNo,omitempty"` Supplier *string `json:"supplier,omitempty"` }
Purchase defines model for Purchase.
type RequiredHeaderError ¶
func (*RequiredHeaderError) Error ¶
func (e *RequiredHeaderError) Error() string
func (*RequiredHeaderError) Unwrap ¶
func (e *RequiredHeaderError) Unwrap() error
type RequiredParamError ¶
type RequiredParamError struct {
ParamName string
}
func (*RequiredParamError) Error ¶
func (e *RequiredParamError) Error() string
type Router ¶
type Router struct {
// contains filtered or unexported fields
}
func NewRouter ¶
func NewRouter( mux chi.Router, assets AssetCtrl, categories CategoryCtrl, customAttrs CustomAttrCtrl, suppliers SupplierCtrl, locations LocationCtrl, models ModelCtrl, manufacturers ManufacturerCtrl, tags TagCtrl, users UserCtrl, ) *Router
func (*Router) CreateAsset ¶
func (r *Router) CreateAsset(ctx context.Context, req CreateAssetRequestObject) (CreateAssetResponseObject, error)
(POST /v1/assets)
func (*Router) DeleteAsset ¶
func (r *Router) DeleteAsset(ctx context.Context, req DeleteAssetRequestObject) (DeleteAssetResponseObject, error)
(DELETE /v1/assets/{tagOrID})
func (*Router) GetAsset ¶
func (r *Router) GetAsset(ctx context.Context, req GetAssetRequestObject) (GetAssetResponseObject, error)
(GET /v1/assets/{tagOrID})
func (*Router) ListAssets ¶
func (r *Router) ListAssets(ctx context.Context, req ListAssetsRequestObject) (ListAssetsResponseObject, error)
(GET /v1/assets)
func (*Router) ListCategories ¶
func (r *Router) ListCategories(ctx context.Context, req ListCategoriesRequestObject) (ListCategoriesResponseObject, error)
(GET /v1/categories)
func (*Router) ListCustomAttrs ¶
func (r *Router) ListCustomAttrs(ctx context.Context, req ListCustomAttrsRequestObject) (ListCustomAttrsResponseObject, error)
(GET /v1/custom_attrs)
func (*Router) ListLocations ¶
func (r *Router) ListLocations(ctx context.Context, req ListLocationsRequestObject) (ListLocationsResponseObject, error)
(GET /v1/locations)
func (*Router) ListManufacturers ¶
func (r *Router) ListManufacturers(ctx context.Context, req ListManufacturersRequestObject) (ListManufacturersResponseObject, error)
(GET /v1/manufacturers)
func (*Router) ListModels ¶
func (r *Router) ListModels(ctx context.Context, req ListModelsRequestObject) (ListModelsResponseObject, error)
(GET /v1/models)
func (*Router) ListPositionCodes ¶
func (r *Router) ListPositionCodes(ctx context.Context, req ListPositionCodesRequestObject) (ListPositionCodesResponseObject, error)
(GET /v1/locations/position_codes)
func (*Router) ListSuppliers ¶
func (r *Router) ListSuppliers(ctx context.Context, req ListSuppliersRequestObject) (ListSuppliersResponseObject, error)
(GET /v1/suppliers)
func (*Router) ListTags ¶
func (r *Router) ListTags(ctx context.Context, req ListTagsRequestObject) (ListTagsResponseObject, error)
(GET /v1/tags)
func (*Router) ListUsers ¶
func (r *Router) ListUsers(ctx context.Context, req ListUsersRequestObject) (ListUsersResponseObject, error)
(GET /v1/users)
func (*Router) UpdateAsset ¶
func (r *Router) UpdateAsset(ctx context.Context, req UpdateAssetRequestObject) (UpdateAssetResponseObject, error)
(PUT /v1/assets/{tagOrID})
type ServerInterface ¶
type ServerInterface interface { // (GET /v1/assets) ListAssets(w http.ResponseWriter, r *http.Request, params ListAssetsParams) // (POST /v1/assets) CreateAsset(w http.ResponseWriter, r *http.Request) // (DELETE /v1/assets/{tagOrID}) DeleteAsset(w http.ResponseWriter, r *http.Request, tagOrID string) // (GET /v1/assets/{tagOrID}) GetAsset(w http.ResponseWriter, r *http.Request, tagOrID string, params GetAssetParams) // (PUT /v1/assets/{tagOrID}) UpdateAsset(w http.ResponseWriter, r *http.Request, tagOrID string) // (GET /v1/categories) ListCategories(w http.ResponseWriter, r *http.Request, params ListCategoriesParams) // (GET /v1/custom_attrs) ListCustomAttrs(w http.ResponseWriter, r *http.Request, params ListCustomAttrsParams) // (GET /v1/locations) ListLocations(w http.ResponseWriter, r *http.Request, params ListLocationsParams) // (GET /v1/locations/position_codes) ListPositionCodes(w http.ResponseWriter, r *http.Request, params ListPositionCodesParams) // (GET /v1/manufacturers) ListManufacturers(w http.ResponseWriter, r *http.Request, params ListManufacturersParams) // (GET /v1/models) ListModels(w http.ResponseWriter, r *http.Request, params ListModelsParams) // (GET /v1/suppliers) ListSuppliers(w http.ResponseWriter, r *http.Request, params ListSuppliersParams) // (GET /v1/tags) ListTags(w http.ResponseWriter, r *http.Request, params ListTagsParams) // (GET /v1/users) ListUsers(w http.ResponseWriter, r *http.Request, params ListUsersParams) }
ServerInterface represents all server handlers.
func NewStrictHandler ¶
func NewStrictHandler(ssi StrictServerInterface, middlewares []StrictMiddlewareFunc) ServerInterface
func NewStrictHandlerWithOptions ¶
func NewStrictHandlerWithOptions(ssi StrictServerInterface, middlewares []StrictMiddlewareFunc, options StrictHTTPServerOptions) ServerInterface
type ServerInterfaceWrapper ¶
type ServerInterfaceWrapper struct { Handler ServerInterface HandlerMiddlewares []MiddlewareFunc ErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error) }
ServerInterfaceWrapper converts contexts to parameters.
func (*ServerInterfaceWrapper) CreateAsset ¶
func (siw *ServerInterfaceWrapper) CreateAsset(w http.ResponseWriter, r *http.Request)
CreateAsset operation middleware
func (*ServerInterfaceWrapper) DeleteAsset ¶
func (siw *ServerInterfaceWrapper) DeleteAsset(w http.ResponseWriter, r *http.Request)
DeleteAsset operation middleware
func (*ServerInterfaceWrapper) GetAsset ¶
func (siw *ServerInterfaceWrapper) GetAsset(w http.ResponseWriter, r *http.Request)
GetAsset operation middleware
func (*ServerInterfaceWrapper) ListAssets ¶
func (siw *ServerInterfaceWrapper) ListAssets(w http.ResponseWriter, r *http.Request)
ListAssets operation middleware
func (*ServerInterfaceWrapper) ListCategories ¶
func (siw *ServerInterfaceWrapper) ListCategories(w http.ResponseWriter, r *http.Request)
ListCategories operation middleware
func (*ServerInterfaceWrapper) ListCustomAttrs ¶
func (siw *ServerInterfaceWrapper) ListCustomAttrs(w http.ResponseWriter, r *http.Request)
ListCustomAttrs operation middleware
func (*ServerInterfaceWrapper) ListLocations ¶
func (siw *ServerInterfaceWrapper) ListLocations(w http.ResponseWriter, r *http.Request)
ListLocations operation middleware
func (*ServerInterfaceWrapper) ListManufacturers ¶
func (siw *ServerInterfaceWrapper) ListManufacturers(w http.ResponseWriter, r *http.Request)
ListManufacturers operation middleware
func (*ServerInterfaceWrapper) ListModels ¶
func (siw *ServerInterfaceWrapper) ListModels(w http.ResponseWriter, r *http.Request)
ListModels operation middleware
func (*ServerInterfaceWrapper) ListPositionCodes ¶
func (siw *ServerInterfaceWrapper) ListPositionCodes(w http.ResponseWriter, r *http.Request)
ListPositionCodes operation middleware
func (*ServerInterfaceWrapper) ListSuppliers ¶
func (siw *ServerInterfaceWrapper) ListSuppliers(w http.ResponseWriter, r *http.Request)
ListSuppliers operation middleware
func (*ServerInterfaceWrapper) ListTags ¶
func (siw *ServerInterfaceWrapper) ListTags(w http.ResponseWriter, r *http.Request)
ListTags operation middleware
func (*ServerInterfaceWrapper) ListUsers ¶
func (siw *ServerInterfaceWrapper) ListUsers(w http.ResponseWriter, r *http.Request)
ListUsers operation middleware
func (*ServerInterfaceWrapper) UpdateAsset ¶
func (siw *ServerInterfaceWrapper) UpdateAsset(w http.ResponseWriter, r *http.Request)
UpdateAsset operation middleware
type StrictHTTPServerOptions ¶
type StrictHTTPServerOptions struct { RequestErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error) ResponseErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error) }
type StrictHandlerFunc ¶
type StrictMiddlewareFunc ¶
type StrictMiddlewareFunc func(f StrictHandlerFunc, operationID string) StrictHandlerFunc
type StrictServerInterface ¶
type StrictServerInterface interface { // (GET /v1/assets) ListAssets(ctx context.Context, request ListAssetsRequestObject) (ListAssetsResponseObject, error) // (POST /v1/assets) CreateAsset(ctx context.Context, request CreateAssetRequestObject) (CreateAssetResponseObject, error) // (DELETE /v1/assets/{tagOrID}) DeleteAsset(ctx context.Context, request DeleteAssetRequestObject) (DeleteAssetResponseObject, error) // (GET /v1/assets/{tagOrID}) GetAsset(ctx context.Context, request GetAssetRequestObject) (GetAssetResponseObject, error) // (PUT /v1/assets/{tagOrID}) UpdateAsset(ctx context.Context, request UpdateAssetRequestObject) (UpdateAssetResponseObject, error) // (GET /v1/categories) ListCategories(ctx context.Context, request ListCategoriesRequestObject) (ListCategoriesResponseObject, error) // (GET /v1/custom_attrs) ListCustomAttrs(ctx context.Context, request ListCustomAttrsRequestObject) (ListCustomAttrsResponseObject, error) // (GET /v1/locations) ListLocations(ctx context.Context, request ListLocationsRequestObject) (ListLocationsResponseObject, error) // (GET /v1/locations/position_codes) ListPositionCodes(ctx context.Context, request ListPositionCodesRequestObject) (ListPositionCodesResponseObject, error) // (GET /v1/manufacturers) ListManufacturers(ctx context.Context, request ListManufacturersRequestObject) (ListManufacturersResponseObject, error) // (GET /v1/models) ListModels(ctx context.Context, request ListModelsRequestObject) (ListModelsResponseObject, error) // (GET /v1/suppliers) ListSuppliers(ctx context.Context, request ListSuppliersRequestObject) (ListSuppliersResponseObject, error) // (GET /v1/tags) ListTags(ctx context.Context, request ListTagsRequestObject) (ListTagsResponseObject, error) // (GET /v1/users) ListUsers(ctx context.Context, request ListUsersRequestObject) (ListUsersResponseObject, error) }
StrictServerInterface represents all server handlers.
type SupplierCtrl ¶
type SupplierListPage ¶
type SupplierListPage struct { NumPages int `json:"numPages"` Page int `json:"page"` PageSize int `json:"pageSize"` Suppliers []Supplier `json:"suppliers"` Total int `json:"total"` }
SupplierListPage defines model for SupplierListPage.
type Tag ¶
type Tag struct { CreatedAt openapi_types.Date `json:"createdAt"` Id int `json:"id"` InUse bool `json:"inUse"` Tag string `json:"tag"` UpdatedAt openapi_types.Date `json:"updatedAt"` }
Tag defines model for Tag.
type TagListPage ¶
type TagListPage struct { NumPages int `json:"numPages"` Page int `json:"page"` PageSize int `json:"pageSize"` Tags []Tag `json:"tags"` Total int `json:"total"` }
TagListPage defines model for TagListPage.
type TooManyValuesForParamError ¶
func (*TooManyValuesForParamError) Error ¶
func (e *TooManyValuesForParamError) Error() string
type UnescapedCookieParamError ¶
func (*UnescapedCookieParamError) Error ¶
func (e *UnescapedCookieParamError) Error() string
func (*UnescapedCookieParamError) Unwrap ¶
func (e *UnescapedCookieParamError) Unwrap() error
type UnmarshallingParamError ¶
func (*UnmarshallingParamError) Error ¶
func (e *UnmarshallingParamError) Error() string
func (*UnmarshallingParamError) Unwrap ¶
func (e *UnmarshallingParamError) Unwrap() error
type UpdateAsset200JSONResponse ¶
type UpdateAsset200JSONResponse Asset
func (UpdateAsset200JSONResponse) VisitUpdateAssetResponse ¶
func (response UpdateAsset200JSONResponse) VisitUpdateAssetResponse(w http.ResponseWriter) error
type UpdateAsset400JSONResponse ¶
type UpdateAsset400JSONResponse Error
func (UpdateAsset400JSONResponse) VisitUpdateAssetResponse ¶
func (response UpdateAsset400JSONResponse) VisitUpdateAssetResponse(w http.ResponseWriter) error
type UpdateAsset401JSONResponse ¶
type UpdateAsset401JSONResponse Error
func (UpdateAsset401JSONResponse) VisitUpdateAssetResponse ¶
func (response UpdateAsset401JSONResponse) VisitUpdateAssetResponse(w http.ResponseWriter) error
type UpdateAsset404JSONResponse ¶
type UpdateAsset404JSONResponse Error
func (UpdateAsset404JSONResponse) VisitUpdateAssetResponse ¶
func (response UpdateAsset404JSONResponse) VisitUpdateAssetResponse(w http.ResponseWriter) error
type UpdateAssetJSONBody ¶
type UpdateAssetJSONBody struct { Category *string `json:"category,omitempty"` CheckedOutTo *int `json:"checkedOutTo,omitempty"` CustomAttrs []CustomAttr `json:"customAttrs"` 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"` ParentAssetID *int `json:"parentAssetID,omitempty"` Parts []AssetPart `json:"parts"` PartsTotalCount *int `json:"partsTotalCount,omitempty"` PositionCode *string `json:"positionCode,omitempty"` Purchases []Purchase `json:"purchases"` Quantity *int `json:"quantity,omitempty"` QuantityUnit *string `json:"quantityUnit,omitempty"` SerialNo *string `json:"serialNo,omitempty"` Status AssetStatus `json:"status"` Tag *string `json:"tag,omitempty"` Type string `json:"type"` WarrantyUntil *openapi_types.Date `json:"warrantyUntil,omitempty"` }
UpdateAssetJSONBody defines parameters for UpdateAsset.
type UpdateAssetJSONRequestBody ¶
type UpdateAssetJSONRequestBody UpdateAssetJSONBody
UpdateAssetJSONRequestBody defines body for UpdateAsset for application/json ContentType.
type UpdateAssetRequest ¶
type UpdateAssetRequest struct { Category *string `json:"category,omitempty"` CheckedOutTo *int `json:"checkedOutTo,omitempty"` CustomAttrs []CustomAttr `json:"customAttrs"` 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"` ParentAssetID *int `json:"parentAssetID,omitempty"` Parts []AssetPart `json:"parts"` PartsTotalCount *int `json:"partsTotalCount,omitempty"` PositionCode *string `json:"positionCode,omitempty"` Purchases []Purchase `json:"purchases"` Quantity *int `json:"quantity,omitempty"` QuantityUnit *string `json:"quantityUnit,omitempty"` SerialNo *string `json:"serialNo,omitempty"` Status AssetStatus `json:"status"` Tag *string `json:"tag,omitempty"` Type string `json:"type"` WarrantyUntil *openapi_types.Date `json:"warrantyUntil,omitempty"` }
UpdateAssetRequest defines model for UpdateAssetRequest.
type UpdateAssetRequestObject ¶
type UpdateAssetRequestObject struct { TagOrID string `json:"tagOrID"` Body *UpdateAssetJSONRequestBody }
type UpdateAssetResponseObject ¶
type UpdateAssetResponseObject interface {
VisitUpdateAssetResponse(w http.ResponseWriter) error
}
type User ¶
type User struct { CreatedAt openapi_types.Date `json:"createdAt"` DisplayName string `json:"displayName"` Id int64 `json:"id"` IsAdmin bool `json:"isAdmin"` UpdatedAt openapi_types.Date `json:"updatedAt"` Username string `json:"username"` }
User defines model for User.