Documentation
¶
Overview ¶
Code generated by ogen, DO NOT EDIT.
Index ¶
- Variables
- func WithServerURL(ctx context.Context, u *url.URL) context.Context
- type AttributeListResponse
- func (s *AttributeListResponse) Decode(d *jx.Decoder) error
- func (s *AttributeListResponse) Encode(e *jx.Encoder)
- func (s *AttributeListResponse) GetItems() []AttributeResponse
- func (s *AttributeListResponse) GetPage() int
- func (s *AttributeListResponse) GetSize() int
- func (s *AttributeListResponse) GetTotal() int
- func (s *AttributeListResponse) MarshalJSON() ([]byte, error)
- func (s *AttributeListResponse) SetItems(val []AttributeResponse)
- func (s *AttributeListResponse) SetPage(val int)
- func (s *AttributeListResponse) SetSize(val int)
- func (s *AttributeListResponse) SetTotal(val int)
- func (s *AttributeListResponse) UnmarshalJSON(data []byte) error
- func (s *AttributeListResponse) Validate() error
- type AttributeOption
- func (s *AttributeOption) Decode(d *jx.Decoder) error
- func (s *AttributeOption) Encode(e *jx.Encoder)
- func (s *AttributeOption) GetColorCode() OptString
- func (s *AttributeOption) GetName() string
- func (s *AttributeOption) GetSlug() string
- func (s *AttributeOption) GetSortOrder() int
- func (s *AttributeOption) MarshalJSON() ([]byte, error)
- func (s *AttributeOption) SetColorCode(val OptString)
- func (s *AttributeOption) SetName(val string)
- func (s *AttributeOption) SetSlug(val string)
- func (s *AttributeOption) SetSortOrder(val int)
- func (s *AttributeOption) UnmarshalJSON(data []byte) error
- type AttributeOptionInput
- func (s *AttributeOptionInput) Decode(d *jx.Decoder) error
- func (s *AttributeOptionInput) Encode(e *jx.Encoder)
- func (s *AttributeOptionInput) GetColorCode() OptString
- func (s *AttributeOptionInput) GetName() string
- func (s *AttributeOptionInput) GetSlug() string
- func (s *AttributeOptionInput) GetSortOrder() OptInt
- func (s *AttributeOptionInput) MarshalJSON() ([]byte, error)
- func (s *AttributeOptionInput) SetColorCode(val OptString)
- func (s *AttributeOptionInput) SetName(val string)
- func (s *AttributeOptionInput) SetSlug(val string)
- func (s *AttributeOptionInput) SetSortOrder(val OptInt)
- func (s *AttributeOptionInput) UnmarshalJSON(data []byte) error
- func (s *AttributeOptionInput) Validate() error
- type AttributeResponse
- func (s *AttributeResponse) Decode(d *jx.Decoder) error
- func (s *AttributeResponse) Encode(e *jx.Encoder)
- func (s *AttributeResponse) GetCreatedAt() time.Time
- func (s *AttributeResponse) GetEnabled() bool
- func (s *AttributeResponse) GetID() string
- func (s *AttributeResponse) GetModifiedAt() time.Time
- func (s *AttributeResponse) GetName() string
- func (s *AttributeResponse) GetOptions() []AttributeOption
- func (s *AttributeResponse) GetSlug() string
- func (s *AttributeResponse) GetType() AttributeResponseType
- func (s *AttributeResponse) GetUnit() OptString
- func (s *AttributeResponse) GetVersion() int
- func (s *AttributeResponse) MarshalJSON() ([]byte, error)
- func (s *AttributeResponse) SetCreatedAt(val time.Time)
- func (s *AttributeResponse) SetEnabled(val bool)
- func (s *AttributeResponse) SetID(val string)
- func (s *AttributeResponse) SetModifiedAt(val time.Time)
- func (s *AttributeResponse) SetName(val string)
- func (s *AttributeResponse) SetOptions(val []AttributeOption)
- func (s *AttributeResponse) SetSlug(val string)
- func (s *AttributeResponse) SetType(val AttributeResponseType)
- func (s *AttributeResponse) SetUnit(val OptString)
- func (s *AttributeResponse) SetVersion(val int)
- func (s *AttributeResponse) UnmarshalJSON(data []byte) error
- func (s *AttributeResponse) Validate() error
- type AttributeResponseType
- func (AttributeResponseType) AllValues() []AttributeResponseType
- func (s *AttributeResponseType) Decode(d *jx.Decoder) error
- func (s AttributeResponseType) Encode(e *jx.Encoder)
- func (s AttributeResponseType) MarshalJSON() ([]byte, error)
- func (s AttributeResponseType) MarshalText() ([]byte, error)
- func (s *AttributeResponseType) UnmarshalJSON(data []byte) error
- func (s *AttributeResponseType) UnmarshalText(data []byte) error
- func (s AttributeResponseType) Validate() error
- type AttributeValue
- func (s *AttributeValue) Decode(d *jx.Decoder) error
- func (s *AttributeValue) Encode(e *jx.Encoder)
- func (s *AttributeValue) GetAttributeId() string
- func (s *AttributeValue) GetBooleanValue() OptBool
- func (s *AttributeValue) GetNumericValue() OptFloat64
- func (s *AttributeValue) GetOptionSlugValue() OptString
- func (s *AttributeValue) GetOptionSlugValues() []string
- func (s *AttributeValue) GetTextValue() OptString
- func (s *AttributeValue) MarshalJSON() ([]byte, error)
- func (s *AttributeValue) SetAttributeId(val string)
- func (s *AttributeValue) SetBooleanValue(val OptBool)
- func (s *AttributeValue) SetNumericValue(val OptFloat64)
- func (s *AttributeValue) SetOptionSlugValue(val OptString)
- func (s *AttributeValue) SetOptionSlugValues(val []string)
- func (s *AttributeValue) SetTextValue(val OptString)
- func (s *AttributeValue) UnmarshalJSON(data []byte) error
- func (s *AttributeValue) Validate() error
- type AttributeValueInput
- func (s *AttributeValueInput) Decode(d *jx.Decoder) error
- func (s *AttributeValueInput) Encode(e *jx.Encoder)
- func (s *AttributeValueInput) GetAttributeId() uuid.UUID
- func (s *AttributeValueInput) GetBooleanValue() OptBool
- func (s *AttributeValueInput) GetNumericValue() OptFloat64
- func (s *AttributeValueInput) GetOptionSlugValue() OptString
- func (s *AttributeValueInput) GetOptionSlugValues() []string
- func (s *AttributeValueInput) GetTextValue() OptString
- func (s *AttributeValueInput) MarshalJSON() ([]byte, error)
- func (s *AttributeValueInput) SetAttributeId(val uuid.UUID)
- func (s *AttributeValueInput) SetBooleanValue(val OptBool)
- func (s *AttributeValueInput) SetNumericValue(val OptFloat64)
- func (s *AttributeValueInput) SetOptionSlugValue(val OptString)
- func (s *AttributeValueInput) SetOptionSlugValues(val []string)
- func (s *AttributeValueInput) SetTextValue(val OptString)
- func (s *AttributeValueInput) UnmarshalJSON(data []byte) error
- func (s *AttributeValueInput) Validate() error
- type BearerAuth
- type CategoryAttribute
- func (s *CategoryAttribute) Decode(d *jx.Decoder) error
- func (s *CategoryAttribute) Encode(e *jx.Encoder)
- func (s *CategoryAttribute) GetAttributeId() string
- func (s *CategoryAttribute) GetFilterable() bool
- func (s *CategoryAttribute) GetRequired() bool
- func (s *CategoryAttribute) GetRole() CategoryAttributeRole
- func (s *CategoryAttribute) GetSearchable() bool
- func (s *CategoryAttribute) GetSortOrder() int
- func (s *CategoryAttribute) MarshalJSON() ([]byte, error)
- func (s *CategoryAttribute) SetAttributeId(val string)
- func (s *CategoryAttribute) SetFilterable(val bool)
- func (s *CategoryAttribute) SetRequired(val bool)
- func (s *CategoryAttribute) SetRole(val CategoryAttributeRole)
- func (s *CategoryAttribute) SetSearchable(val bool)
- func (s *CategoryAttribute) SetSortOrder(val int)
- func (s *CategoryAttribute) UnmarshalJSON(data []byte) error
- func (s *CategoryAttribute) Validate() error
- type CategoryAttributeInput
- func (s *CategoryAttributeInput) Decode(d *jx.Decoder) error
- func (s *CategoryAttributeInput) Encode(e *jx.Encoder)
- func (s *CategoryAttributeInput) GetAttributeId() uuid.UUID
- func (s *CategoryAttributeInput) GetFilterable() bool
- func (s *CategoryAttributeInput) GetRequired() OptBool
- func (s *CategoryAttributeInput) GetRole() CategoryAttributeInputRole
- func (s *CategoryAttributeInput) GetSearchable() bool
- func (s *CategoryAttributeInput) GetSortOrder() OptInt
- func (s *CategoryAttributeInput) MarshalJSON() ([]byte, error)
- func (s *CategoryAttributeInput) SetAttributeId(val uuid.UUID)
- func (s *CategoryAttributeInput) SetFilterable(val bool)
- func (s *CategoryAttributeInput) SetRequired(val OptBool)
- func (s *CategoryAttributeInput) SetRole(val CategoryAttributeInputRole)
- func (s *CategoryAttributeInput) SetSearchable(val bool)
- func (s *CategoryAttributeInput) SetSortOrder(val OptInt)
- func (s *CategoryAttributeInput) UnmarshalJSON(data []byte) error
- func (s *CategoryAttributeInput) Validate() error
- type CategoryAttributeInputRole
- func (CategoryAttributeInputRole) AllValues() []CategoryAttributeInputRole
- func (s *CategoryAttributeInputRole) Decode(d *jx.Decoder) error
- func (s CategoryAttributeInputRole) Encode(e *jx.Encoder)
- func (s CategoryAttributeInputRole) MarshalJSON() ([]byte, error)
- func (s CategoryAttributeInputRole) MarshalText() ([]byte, error)
- func (s *CategoryAttributeInputRole) UnmarshalJSON(data []byte) error
- func (s *CategoryAttributeInputRole) UnmarshalText(data []byte) error
- func (s CategoryAttributeInputRole) Validate() error
- type CategoryAttributeRole
- func (CategoryAttributeRole) AllValues() []CategoryAttributeRole
- func (s *CategoryAttributeRole) Decode(d *jx.Decoder) error
- func (s CategoryAttributeRole) Encode(e *jx.Encoder)
- func (s CategoryAttributeRole) MarshalJSON() ([]byte, error)
- func (s CategoryAttributeRole) MarshalText() ([]byte, error)
- func (s *CategoryAttributeRole) UnmarshalJSON(data []byte) error
- func (s *CategoryAttributeRole) UnmarshalText(data []byte) error
- func (s CategoryAttributeRole) Validate() error
- type CategoryListResponse
- func (s *CategoryListResponse) Decode(d *jx.Decoder) error
- func (s *CategoryListResponse) Encode(e *jx.Encoder)
- func (s *CategoryListResponse) GetItems() []CategoryResponse
- func (s *CategoryListResponse) GetPage() int
- func (s *CategoryListResponse) GetSize() int
- func (s *CategoryListResponse) GetTotal() int
- func (s *CategoryListResponse) MarshalJSON() ([]byte, error)
- func (s *CategoryListResponse) SetItems(val []CategoryResponse)
- func (s *CategoryListResponse) SetPage(val int)
- func (s *CategoryListResponse) SetSize(val int)
- func (s *CategoryListResponse) SetTotal(val int)
- func (s *CategoryListResponse) UnmarshalJSON(data []byte) error
- func (s *CategoryListResponse) Validate() error
- type CategoryResponse
- func (s *CategoryResponse) Decode(d *jx.Decoder) error
- func (s *CategoryResponse) Encode(e *jx.Encoder)
- func (s *CategoryResponse) GetAttributes() []CategoryAttribute
- func (s *CategoryResponse) GetCreatedAt() time.Time
- func (s *CategoryResponse) GetEnabled() bool
- func (s *CategoryResponse) GetID() string
- func (s *CategoryResponse) GetModifiedAt() time.Time
- func (s *CategoryResponse) GetName() string
- func (s *CategoryResponse) GetVersion() int
- func (s *CategoryResponse) MarshalJSON() ([]byte, error)
- func (s *CategoryResponse) SetAttributes(val []CategoryAttribute)
- func (s *CategoryResponse) SetCreatedAt(val time.Time)
- func (s *CategoryResponse) SetEnabled(val bool)
- func (s *CategoryResponse) SetID(val string)
- func (s *CategoryResponse) SetModifiedAt(val time.Time)
- func (s *CategoryResponse) SetName(val string)
- func (s *CategoryResponse) SetVersion(val int)
- func (s *CategoryResponse) UnmarshalJSON(data []byte) error
- func (s *CategoryResponse) Validate() error
- type Client
- func (c *Client) CreateAttribute(ctx context.Context, request *CreateAttributeRequest) (CreateAttributeRes, error)
- func (c *Client) CreateCategory(ctx context.Context, request *CreateCategoryRequest) (CreateCategoryRes, error)
- func (c *Client) CreateProduct(ctx context.Context, request *CreateProductRequest) (CreateProductRes, error)
- func (c *Client) GetAttributeById(ctx context.Context, params GetAttributeByIdParams) (GetAttributeByIdRes, error)
- func (c *Client) GetAttributeList(ctx context.Context, params GetAttributeListParams) (GetAttributeListRes, error)
- func (c *Client) GetCategoryById(ctx context.Context, params GetCategoryByIdParams) (GetCategoryByIdRes, error)
- func (c *Client) GetCategoryList(ctx context.Context, params GetCategoryListParams) (GetCategoryListRes, error)
- func (c *Client) GetProductById(ctx context.Context, params GetProductByIdParams) (GetProductByIdRes, error)
- func (c *Client) GetProductList(ctx context.Context, params GetProductListParams) (GetProductListRes, error)
- func (c *Client) UpdateAttribute(ctx context.Context, request *UpdateAttributeRequest) (UpdateAttributeRes, error)
- func (c *Client) UpdateCategory(ctx context.Context, request *UpdateCategoryRequest) (UpdateCategoryRes, error)
- func (c *Client) UpdateProduct(ctx context.Context, request *UpdateProductRequest) (UpdateProductRes, error)
- type ClientOption
- type CreateAttributeBadRequest
- type CreateAttributeConflict
- type CreateAttributeInternalServerError
- type CreateAttributeRequest
- func (s *CreateAttributeRequest) Decode(d *jx.Decoder) error
- func (s *CreateAttributeRequest) Encode(e *jx.Encoder)
- func (s *CreateAttributeRequest) GetEnabled() bool
- func (s *CreateAttributeRequest) GetID() OptUUID
- func (s *CreateAttributeRequest) GetName() string
- func (s *CreateAttributeRequest) GetOptions() []AttributeOptionInput
- func (s *CreateAttributeRequest) GetSlug() string
- func (s *CreateAttributeRequest) GetType() CreateAttributeRequestType
- func (s *CreateAttributeRequest) GetUnit() OptString
- func (s *CreateAttributeRequest) MarshalJSON() ([]byte, error)
- func (s *CreateAttributeRequest) SetEnabled(val bool)
- func (s *CreateAttributeRequest) SetID(val OptUUID)
- func (s *CreateAttributeRequest) SetName(val string)
- func (s *CreateAttributeRequest) SetOptions(val []AttributeOptionInput)
- func (s *CreateAttributeRequest) SetSlug(val string)
- func (s *CreateAttributeRequest) SetType(val CreateAttributeRequestType)
- func (s *CreateAttributeRequest) SetUnit(val OptString)
- func (s *CreateAttributeRequest) UnmarshalJSON(data []byte) error
- func (s *CreateAttributeRequest) Validate() error
- type CreateAttributeRequestType
- func (CreateAttributeRequestType) AllValues() []CreateAttributeRequestType
- func (s *CreateAttributeRequestType) Decode(d *jx.Decoder) error
- func (s CreateAttributeRequestType) Encode(e *jx.Encoder)
- func (s CreateAttributeRequestType) MarshalJSON() ([]byte, error)
- func (s CreateAttributeRequestType) MarshalText() ([]byte, error)
- func (s *CreateAttributeRequestType) UnmarshalJSON(data []byte) error
- func (s *CreateAttributeRequestType) UnmarshalText(data []byte) error
- func (s CreateAttributeRequestType) Validate() error
- type CreateAttributeRes
- type CreateCategoryBadRequest
- type CreateCategoryInternalServerError
- type CreateCategoryRequest
- func (s *CreateCategoryRequest) Decode(d *jx.Decoder) error
- func (s *CreateCategoryRequest) Encode(e *jx.Encoder)
- func (s *CreateCategoryRequest) GetAttributes() []CategoryAttributeInput
- func (s *CreateCategoryRequest) GetEnabled() bool
- func (s *CreateCategoryRequest) GetID() OptUUID
- func (s *CreateCategoryRequest) GetName() string
- func (s *CreateCategoryRequest) MarshalJSON() ([]byte, error)
- func (s *CreateCategoryRequest) SetAttributes(val []CategoryAttributeInput)
- func (s *CreateCategoryRequest) SetEnabled(val bool)
- func (s *CreateCategoryRequest) SetID(val OptUUID)
- func (s *CreateCategoryRequest) SetName(val string)
- func (s *CreateCategoryRequest) UnmarshalJSON(data []byte) error
- func (s *CreateCategoryRequest) Validate() error
- type CreateCategoryRes
- type CreateProductBadRequest
- type CreateProductForbidden
- type CreateProductInternalServerError
- type CreateProductRequest
- func (s *CreateProductRequest) Decode(d *jx.Decoder) error
- func (s *CreateProductRequest) Encode(e *jx.Encoder)
- func (s *CreateProductRequest) GetAttributes() []AttributeValueInput
- func (s *CreateProductRequest) GetCategoryId() OptUUID
- func (s *CreateProductRequest) GetDescription() OptString
- func (s *CreateProductRequest) GetEnabled() bool
- func (s *CreateProductRequest) GetID() OptUUID
- func (s *CreateProductRequest) GetImageId() OptUUID
- func (s *CreateProductRequest) GetName() string
- func (s *CreateProductRequest) GetPrice() float64
- func (s *CreateProductRequest) GetQuantity() int
- func (s *CreateProductRequest) MarshalJSON() ([]byte, error)
- func (s *CreateProductRequest) SetAttributes(val []AttributeValueInput)
- func (s *CreateProductRequest) SetCategoryId(val OptUUID)
- func (s *CreateProductRequest) SetDescription(val OptString)
- func (s *CreateProductRequest) SetEnabled(val bool)
- func (s *CreateProductRequest) SetID(val OptUUID)
- func (s *CreateProductRequest) SetImageId(val OptUUID)
- func (s *CreateProductRequest) SetName(val string)
- func (s *CreateProductRequest) SetPrice(val float64)
- func (s *CreateProductRequest) SetQuantity(val int)
- func (s *CreateProductRequest) UnmarshalJSON(data []byte) error
- func (s *CreateProductRequest) Validate() error
- type CreateProductRes
- type CreateProductUnauthorized
- type ErrorHandler
- type GetAttributeByIdInternalServerError
- type GetAttributeByIdNotFound
- type GetAttributeByIdParams
- type GetAttributeByIdRes
- type GetAttributeListBadRequest
- type GetAttributeListInternalServerError
- type GetAttributeListOrder
- type GetAttributeListParams
- type GetAttributeListRes
- type GetAttributeListSort
- type GetAttributeListType
- type GetCategoryByIdInternalServerError
- type GetCategoryByIdNotFound
- type GetCategoryByIdParams
- type GetCategoryByIdRes
- type GetCategoryListBadRequest
- type GetCategoryListInternalServerError
- type GetCategoryListOrder
- type GetCategoryListParams
- type GetCategoryListRes
- type GetCategoryListSort
- type GetProductByIdForbidden
- type GetProductByIdInternalServerError
- type GetProductByIdNotFound
- type GetProductByIdParams
- type GetProductByIdRes
- type GetProductByIdUnauthorized
- type GetProductListBadRequest
- type GetProductListForbidden
- type GetProductListInternalServerError
- type GetProductListOrder
- type GetProductListParams
- type GetProductListRes
- type GetProductListSort
- type GetProductListUnauthorized
- type Handler
- type Invoker
- type Labeler
- type Middleware
- type OperationName
- type OptBool
- func (o *OptBool) Decode(d *jx.Decoder) error
- func (o OptBool) Encode(e *jx.Encoder)
- func (o OptBool) Get() (v bool, ok bool)
- func (o OptBool) IsSet() bool
- func (s OptBool) MarshalJSON() ([]byte, error)
- func (o OptBool) Or(d bool) bool
- func (o *OptBool) Reset()
- func (o *OptBool) SetTo(v bool)
- func (s *OptBool) UnmarshalJSON(data []byte) error
- type OptFloat64
- func (o *OptFloat64) Decode(d *jx.Decoder) error
- func (o OptFloat64) Encode(e *jx.Encoder)
- func (o OptFloat64) Get() (v float64, ok bool)
- func (o OptFloat64) IsSet() bool
- func (s OptFloat64) MarshalJSON() ([]byte, error)
- func (o OptFloat64) Or(d float64) float64
- func (o *OptFloat64) Reset()
- func (o *OptFloat64) SetTo(v float64)
- func (s *OptFloat64) UnmarshalJSON(data []byte) error
- type OptGetAttributeListOrder
- func (o OptGetAttributeListOrder) Get() (v GetAttributeListOrder, ok bool)
- func (o OptGetAttributeListOrder) IsSet() bool
- func (o OptGetAttributeListOrder) Or(d GetAttributeListOrder) GetAttributeListOrder
- func (o *OptGetAttributeListOrder) Reset()
- func (o *OptGetAttributeListOrder) SetTo(v GetAttributeListOrder)
- type OptGetAttributeListSort
- func (o OptGetAttributeListSort) Get() (v GetAttributeListSort, ok bool)
- func (o OptGetAttributeListSort) IsSet() bool
- func (o OptGetAttributeListSort) Or(d GetAttributeListSort) GetAttributeListSort
- func (o *OptGetAttributeListSort) Reset()
- func (o *OptGetAttributeListSort) SetTo(v GetAttributeListSort)
- type OptGetAttributeListType
- func (o OptGetAttributeListType) Get() (v GetAttributeListType, ok bool)
- func (o OptGetAttributeListType) IsSet() bool
- func (o OptGetAttributeListType) Or(d GetAttributeListType) GetAttributeListType
- func (o *OptGetAttributeListType) Reset()
- func (o *OptGetAttributeListType) SetTo(v GetAttributeListType)
- type OptGetCategoryListOrder
- func (o OptGetCategoryListOrder) Get() (v GetCategoryListOrder, ok bool)
- func (o OptGetCategoryListOrder) IsSet() bool
- func (o OptGetCategoryListOrder) Or(d GetCategoryListOrder) GetCategoryListOrder
- func (o *OptGetCategoryListOrder) Reset()
- func (o *OptGetCategoryListOrder) SetTo(v GetCategoryListOrder)
- type OptGetCategoryListSort
- type OptGetProductListOrder
- type OptGetProductListSort
- type OptInt
- func (o *OptInt) Decode(d *jx.Decoder) error
- func (o OptInt) Encode(e *jx.Encoder)
- func (o OptInt) Get() (v int, ok bool)
- func (o OptInt) IsSet() bool
- func (s OptInt) MarshalJSON() ([]byte, error)
- func (o OptInt) Or(d int) int
- func (o *OptInt) Reset()
- func (o *OptInt) SetTo(v int)
- func (s *OptInt) UnmarshalJSON(data []byte) error
- type OptString
- func (o *OptString) Decode(d *jx.Decoder) error
- func (o OptString) Encode(e *jx.Encoder)
- func (o OptString) Get() (v string, ok bool)
- func (o OptString) IsSet() bool
- func (s OptString) MarshalJSON() ([]byte, error)
- func (o OptString) Or(d string) string
- func (o *OptString) Reset()
- func (o *OptString) SetTo(v string)
- func (s *OptString) UnmarshalJSON(data []byte) error
- type OptURI
- func (o *OptURI) Decode(d *jx.Decoder) error
- func (o OptURI) Encode(e *jx.Encoder)
- func (o OptURI) Get() (v url.URL, ok bool)
- func (o OptURI) IsSet() bool
- func (s OptURI) MarshalJSON() ([]byte, error)
- func (o OptURI) Or(d url.URL) url.URL
- func (o *OptURI) Reset()
- func (o *OptURI) SetTo(v url.URL)
- func (s *OptURI) UnmarshalJSON(data []byte) error
- type OptUUID
- func (o *OptUUID) Decode(d *jx.Decoder) error
- func (o OptUUID) Encode(e *jx.Encoder)
- func (o OptUUID) Get() (v uuid.UUID, ok bool)
- func (o OptUUID) IsSet() bool
- func (s OptUUID) MarshalJSON() ([]byte, error)
- func (o OptUUID) Or(d uuid.UUID) uuid.UUID
- func (o *OptUUID) Reset()
- func (o *OptUUID) SetTo(v uuid.UUID)
- func (s *OptUUID) UnmarshalJSON(data []byte) error
- type Option
- type Problem
- func (s *Problem) Decode(d *jx.Decoder) error
- func (s *Problem) Encode(e *jx.Encoder)
- func (s *Problem) GetDetail() OptString
- func (s *Problem) GetErrors() []ProblemErrorsItem
- func (s *Problem) GetInstance() OptURI
- func (s *Problem) GetStatus() int
- func (s *Problem) GetTitle() string
- func (s *Problem) GetTraceId() OptString
- func (s *Problem) GetType() url.URL
- func (s *Problem) MarshalJSON() ([]byte, error)
- func (s *Problem) SetDetail(val OptString)
- func (s *Problem) SetErrors(val []ProblemErrorsItem)
- func (s *Problem) SetInstance(val OptURI)
- func (s *Problem) SetStatus(val int)
- func (s *Problem) SetTitle(val string)
- func (s *Problem) SetTraceId(val OptString)
- func (s *Problem) SetType(val url.URL)
- func (s *Problem) UnmarshalJSON(data []byte) error
- type ProblemErrorsItem
- func (s *ProblemErrorsItem) Decode(d *jx.Decoder) error
- func (s *ProblemErrorsItem) Encode(e *jx.Encoder)
- func (s *ProblemErrorsItem) GetField() OptString
- func (s *ProblemErrorsItem) GetMessage() OptString
- func (s *ProblemErrorsItem) MarshalJSON() ([]byte, error)
- func (s *ProblemErrorsItem) SetField(val OptString)
- func (s *ProblemErrorsItem) SetMessage(val OptString)
- func (s *ProblemErrorsItem) UnmarshalJSON(data []byte) error
- type ProductListResponse
- func (s *ProductListResponse) Decode(d *jx.Decoder) error
- func (s *ProductListResponse) Encode(e *jx.Encoder)
- func (s *ProductListResponse) GetItems() []ProductResponse
- func (s *ProductListResponse) GetPage() int
- func (s *ProductListResponse) GetSize() int
- func (s *ProductListResponse) GetTotal() int
- func (s *ProductListResponse) MarshalJSON() ([]byte, error)
- func (s *ProductListResponse) SetItems(val []ProductResponse)
- func (s *ProductListResponse) SetPage(val int)
- func (s *ProductListResponse) SetSize(val int)
- func (s *ProductListResponse) SetTotal(val int)
- func (s *ProductListResponse) UnmarshalJSON(data []byte) error
- func (s *ProductListResponse) Validate() error
- type ProductResponse
- func (s *ProductResponse) Decode(d *jx.Decoder) error
- func (s *ProductResponse) Encode(e *jx.Encoder)
- func (s *ProductResponse) GetAttributes() []AttributeValue
- func (s *ProductResponse) GetCategoryId() OptString
- func (s *ProductResponse) GetCreatedAt() time.Time
- func (s *ProductResponse) GetDescription() OptString
- func (s *ProductResponse) GetEnabled() bool
- func (s *ProductResponse) GetID() string
- func (s *ProductResponse) GetImageId() OptString
- func (s *ProductResponse) GetModifiedAt() time.Time
- func (s *ProductResponse) GetName() string
- func (s *ProductResponse) GetPrice() float64
- func (s *ProductResponse) GetQuantity() int
- func (s *ProductResponse) GetVersion() int
- func (s *ProductResponse) MarshalJSON() ([]byte, error)
- func (s *ProductResponse) SetAttributes(val []AttributeValue)
- func (s *ProductResponse) SetCategoryId(val OptString)
- func (s *ProductResponse) SetCreatedAt(val time.Time)
- func (s *ProductResponse) SetDescription(val OptString)
- func (s *ProductResponse) SetEnabled(val bool)
- func (s *ProductResponse) SetID(val string)
- func (s *ProductResponse) SetImageId(val OptString)
- func (s *ProductResponse) SetModifiedAt(val time.Time)
- func (s *ProductResponse) SetName(val string)
- func (s *ProductResponse) SetPrice(val float64)
- func (s *ProductResponse) SetQuantity(val int)
- func (s *ProductResponse) SetVersion(val int)
- func (s *ProductResponse) UnmarshalJSON(data []byte) error
- func (s *ProductResponse) Validate() error
- type Route
- type SecurityHandler
- type SecuritySource
- type Server
- type ServerOption
- func WithErrorHandler(h ErrorHandler) ServerOption
- func WithMaxMultipartMemory(max int64) ServerOption
- func WithMethodNotAllowed(methodNotAllowed func(w http.ResponseWriter, r *http.Request, allowed string)) ServerOption
- func WithMiddleware(m ...Middleware) ServerOption
- func WithNotFound(notFound http.HandlerFunc) ServerOption
- func WithPathPrefix(prefix string) ServerOption
- type TokenSecuritySource
- type UnimplementedHandler
- func (UnimplementedHandler) CreateAttribute(ctx context.Context, req *CreateAttributeRequest) (r CreateAttributeRes, _ error)
- func (UnimplementedHandler) CreateCategory(ctx context.Context, req *CreateCategoryRequest) (r CreateCategoryRes, _ error)
- func (UnimplementedHandler) CreateProduct(ctx context.Context, req *CreateProductRequest) (r CreateProductRes, _ error)
- func (UnimplementedHandler) GetAttributeById(ctx context.Context, params GetAttributeByIdParams) (r GetAttributeByIdRes, _ error)
- func (UnimplementedHandler) GetAttributeList(ctx context.Context, params GetAttributeListParams) (r GetAttributeListRes, _ error)
- func (UnimplementedHandler) GetCategoryById(ctx context.Context, params GetCategoryByIdParams) (r GetCategoryByIdRes, _ error)
- func (UnimplementedHandler) GetCategoryList(ctx context.Context, params GetCategoryListParams) (r GetCategoryListRes, _ error)
- func (UnimplementedHandler) GetProductById(ctx context.Context, params GetProductByIdParams) (r GetProductByIdRes, _ error)
- func (UnimplementedHandler) GetProductList(ctx context.Context, params GetProductListParams) (r GetProductListRes, _ error)
- func (UnimplementedHandler) UpdateAttribute(ctx context.Context, req *UpdateAttributeRequest) (r UpdateAttributeRes, _ error)
- func (UnimplementedHandler) UpdateCategory(ctx context.Context, req *UpdateCategoryRequest) (r UpdateCategoryRes, _ error)
- func (UnimplementedHandler) UpdateProduct(ctx context.Context, req *UpdateProductRequest) (r UpdateProductRes, _ error)
- type UpdateAttributeBadRequest
- type UpdateAttributeConflict
- type UpdateAttributeInternalServerError
- type UpdateAttributeNotFound
- type UpdateAttributePreconditionFailed
- type UpdateAttributeRequest
- func (s *UpdateAttributeRequest) Decode(d *jx.Decoder) error
- func (s *UpdateAttributeRequest) Encode(e *jx.Encoder)
- func (s *UpdateAttributeRequest) GetEnabled() bool
- func (s *UpdateAttributeRequest) GetID() uuid.UUID
- func (s *UpdateAttributeRequest) GetName() string
- func (s *UpdateAttributeRequest) GetOptions() []AttributeOptionInput
- func (s *UpdateAttributeRequest) GetUnit() OptString
- func (s *UpdateAttributeRequest) GetVersion() int
- func (s *UpdateAttributeRequest) MarshalJSON() ([]byte, error)
- func (s *UpdateAttributeRequest) SetEnabled(val bool)
- func (s *UpdateAttributeRequest) SetID(val uuid.UUID)
- func (s *UpdateAttributeRequest) SetName(val string)
- func (s *UpdateAttributeRequest) SetOptions(val []AttributeOptionInput)
- func (s *UpdateAttributeRequest) SetUnit(val OptString)
- func (s *UpdateAttributeRequest) SetVersion(val int)
- func (s *UpdateAttributeRequest) UnmarshalJSON(data []byte) error
- func (s *UpdateAttributeRequest) Validate() error
- type UpdateAttributeRes
- type UpdateCategoryBadRequest
- type UpdateCategoryInternalServerError
- type UpdateCategoryNotFound
- type UpdateCategoryPreconditionFailed
- type UpdateCategoryRequest
- func (s *UpdateCategoryRequest) Decode(d *jx.Decoder) error
- func (s *UpdateCategoryRequest) Encode(e *jx.Encoder)
- func (s *UpdateCategoryRequest) GetAttributes() []CategoryAttributeInput
- func (s *UpdateCategoryRequest) GetEnabled() bool
- func (s *UpdateCategoryRequest) GetID() uuid.UUID
- func (s *UpdateCategoryRequest) GetName() string
- func (s *UpdateCategoryRequest) GetVersion() int
- func (s *UpdateCategoryRequest) MarshalJSON() ([]byte, error)
- func (s *UpdateCategoryRequest) SetAttributes(val []CategoryAttributeInput)
- func (s *UpdateCategoryRequest) SetEnabled(val bool)
- func (s *UpdateCategoryRequest) SetID(val uuid.UUID)
- func (s *UpdateCategoryRequest) SetName(val string)
- func (s *UpdateCategoryRequest) SetVersion(val int)
- func (s *UpdateCategoryRequest) UnmarshalJSON(data []byte) error
- func (s *UpdateCategoryRequest) Validate() error
- type UpdateCategoryRes
- type UpdateProductBadRequest
- type UpdateProductForbidden
- type UpdateProductInternalServerError
- type UpdateProductNotFound
- type UpdateProductPreconditionFailed
- type UpdateProductRequest
- func (s *UpdateProductRequest) Decode(d *jx.Decoder) error
- func (s *UpdateProductRequest) Encode(e *jx.Encoder)
- func (s *UpdateProductRequest) GetAttributes() []AttributeValueInput
- func (s *UpdateProductRequest) GetCategoryId() OptUUID
- func (s *UpdateProductRequest) GetDescription() OptString
- func (s *UpdateProductRequest) GetEnabled() bool
- func (s *UpdateProductRequest) GetID() uuid.UUID
- func (s *UpdateProductRequest) GetImageId() OptUUID
- func (s *UpdateProductRequest) GetName() string
- func (s *UpdateProductRequest) GetPrice() float64
- func (s *UpdateProductRequest) GetQuantity() int
- func (s *UpdateProductRequest) GetVersion() int
- func (s *UpdateProductRequest) MarshalJSON() ([]byte, error)
- func (s *UpdateProductRequest) SetAttributes(val []AttributeValueInput)
- func (s *UpdateProductRequest) SetCategoryId(val OptUUID)
- func (s *UpdateProductRequest) SetDescription(val OptString)
- func (s *UpdateProductRequest) SetEnabled(val bool)
- func (s *UpdateProductRequest) SetID(val uuid.UUID)
- func (s *UpdateProductRequest) SetImageId(val OptUUID)
- func (s *UpdateProductRequest) SetName(val string)
- func (s *UpdateProductRequest) SetPrice(val float64)
- func (s *UpdateProductRequest) SetQuantity(val int)
- func (s *UpdateProductRequest) SetVersion(val int)
- func (s *UpdateProductRequest) UnmarshalJSON(data []byte) error
- func (s *UpdateProductRequest) Validate() error
- type UpdateProductRes
- type UpdateProductUnauthorized
Constants ¶
This section is empty.
Variables ¶
var OpenAPIDoc []byte
Functions ¶
Types ¶
type AttributeListResponse ¶
type AttributeListResponse struct {
Items []AttributeResponse `json:"items"`
// Current page number.
Page int `json:"page"`
// Number of items per page.
Size int `json:"size"`
// Total number of items.
Total int `json:"total"`
}
Ref: #/components/schemas/AttributeListResponse
func (*AttributeListResponse) Decode ¶
func (s *AttributeListResponse) Decode(d *jx.Decoder) error
Decode decodes AttributeListResponse from json.
func (*AttributeListResponse) Encode ¶
func (s *AttributeListResponse) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*AttributeListResponse) GetItems ¶
func (s *AttributeListResponse) GetItems() []AttributeResponse
GetItems returns the value of Items.
func (*AttributeListResponse) GetPage ¶
func (s *AttributeListResponse) GetPage() int
GetPage returns the value of Page.
func (*AttributeListResponse) GetSize ¶
func (s *AttributeListResponse) GetSize() int
GetSize returns the value of Size.
func (*AttributeListResponse) GetTotal ¶
func (s *AttributeListResponse) GetTotal() int
GetTotal returns the value of Total.
func (*AttributeListResponse) MarshalJSON ¶
func (s *AttributeListResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*AttributeListResponse) SetItems ¶
func (s *AttributeListResponse) SetItems(val []AttributeResponse)
SetItems sets the value of Items.
func (*AttributeListResponse) SetPage ¶
func (s *AttributeListResponse) SetPage(val int)
SetPage sets the value of Page.
func (*AttributeListResponse) SetSize ¶
func (s *AttributeListResponse) SetSize(val int)
SetSize sets the value of Size.
func (*AttributeListResponse) SetTotal ¶
func (s *AttributeListResponse) SetTotal(val int)
SetTotal sets the value of Total.
func (*AttributeListResponse) UnmarshalJSON ¶
func (s *AttributeListResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*AttributeListResponse) Validate ¶
func (s *AttributeListResponse) Validate() error
type AttributeOption ¶
type AttributeOption struct {
Name string `json:"name"`
Slug string `json:"slug"`
ColorCode OptString `json:"colorCode"`
SortOrder int `json:"sortOrder"`
}
Embedded attribute option. Ref: #/components/schemas/AttributeOption
func (*AttributeOption) Decode ¶
func (s *AttributeOption) Decode(d *jx.Decoder) error
Decode decodes AttributeOption from json.
func (*AttributeOption) Encode ¶
func (s *AttributeOption) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*AttributeOption) GetColorCode ¶
func (s *AttributeOption) GetColorCode() OptString
GetColorCode returns the value of ColorCode.
func (*AttributeOption) GetName ¶
func (s *AttributeOption) GetName() string
GetName returns the value of Name.
func (*AttributeOption) GetSlug ¶
func (s *AttributeOption) GetSlug() string
GetSlug returns the value of Slug.
func (*AttributeOption) GetSortOrder ¶
func (s *AttributeOption) GetSortOrder() int
GetSortOrder returns the value of SortOrder.
func (*AttributeOption) MarshalJSON ¶
func (s *AttributeOption) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*AttributeOption) SetColorCode ¶
func (s *AttributeOption) SetColorCode(val OptString)
SetColorCode sets the value of ColorCode.
func (*AttributeOption) SetName ¶
func (s *AttributeOption) SetName(val string)
SetName sets the value of Name.
func (*AttributeOption) SetSlug ¶
func (s *AttributeOption) SetSlug(val string)
SetSlug sets the value of Slug.
func (*AttributeOption) SetSortOrder ¶
func (s *AttributeOption) SetSortOrder(val int)
SetSortOrder sets the value of SortOrder.
func (*AttributeOption) UnmarshalJSON ¶
func (s *AttributeOption) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type AttributeOptionInput ¶
type AttributeOptionInput struct {
Name string `json:"name"`
// URL-friendly identifier. Immutable after creation.
// Used as identifier for updates.
Slug string `json:"slug"`
// Hex color code for color attributes.
ColorCode OptString `json:"colorCode"`
SortOrder OptInt `json:"sortOrder"`
}
Input for creating/updating an attribute option. - slug is immutable: set once during creation, used as identifier for updates - To update an option, use the same slug with new name/colorCode/sortOrder. Ref: #/components/schemas/AttributeOptionInput
func (*AttributeOptionInput) Decode ¶
func (s *AttributeOptionInput) Decode(d *jx.Decoder) error
Decode decodes AttributeOptionInput from json.
func (*AttributeOptionInput) Encode ¶
func (s *AttributeOptionInput) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*AttributeOptionInput) GetColorCode ¶
func (s *AttributeOptionInput) GetColorCode() OptString
GetColorCode returns the value of ColorCode.
func (*AttributeOptionInput) GetName ¶
func (s *AttributeOptionInput) GetName() string
GetName returns the value of Name.
func (*AttributeOptionInput) GetSlug ¶
func (s *AttributeOptionInput) GetSlug() string
GetSlug returns the value of Slug.
func (*AttributeOptionInput) GetSortOrder ¶
func (s *AttributeOptionInput) GetSortOrder() OptInt
GetSortOrder returns the value of SortOrder.
func (*AttributeOptionInput) MarshalJSON ¶
func (s *AttributeOptionInput) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*AttributeOptionInput) SetColorCode ¶
func (s *AttributeOptionInput) SetColorCode(val OptString)
SetColorCode sets the value of ColorCode.
func (*AttributeOptionInput) SetName ¶
func (s *AttributeOptionInput) SetName(val string)
SetName sets the value of Name.
func (*AttributeOptionInput) SetSlug ¶
func (s *AttributeOptionInput) SetSlug(val string)
SetSlug sets the value of Slug.
func (*AttributeOptionInput) SetSortOrder ¶
func (s *AttributeOptionInput) SetSortOrder(val OptInt)
SetSortOrder sets the value of SortOrder.
func (*AttributeOptionInput) UnmarshalJSON ¶
func (s *AttributeOptionInput) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*AttributeOptionInput) Validate ¶
func (s *AttributeOptionInput) Validate() error
type AttributeResponse ¶
type AttributeResponse struct {
ID string `json:"id"`
Version int `json:"version"`
Name string `json:"name"`
Slug string `json:"slug"`
Type AttributeResponseType `json:"type"`
Unit OptString `json:"unit"`
Enabled bool `json:"enabled"`
Options []AttributeOption `json:"options"`
CreatedAt time.Time `json:"createdAt"`
ModifiedAt time.Time `json:"modifiedAt"`
}
Ref: #/components/schemas/AttributeResponse
func (*AttributeResponse) Decode ¶
func (s *AttributeResponse) Decode(d *jx.Decoder) error
Decode decodes AttributeResponse from json.
func (*AttributeResponse) Encode ¶
func (s *AttributeResponse) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*AttributeResponse) GetCreatedAt ¶
func (s *AttributeResponse) GetCreatedAt() time.Time
GetCreatedAt returns the value of CreatedAt.
func (*AttributeResponse) GetEnabled ¶
func (s *AttributeResponse) GetEnabled() bool
GetEnabled returns the value of Enabled.
func (*AttributeResponse) GetID ¶
func (s *AttributeResponse) GetID() string
GetID returns the value of ID.
func (*AttributeResponse) GetModifiedAt ¶
func (s *AttributeResponse) GetModifiedAt() time.Time
GetModifiedAt returns the value of ModifiedAt.
func (*AttributeResponse) GetName ¶
func (s *AttributeResponse) GetName() string
GetName returns the value of Name.
func (*AttributeResponse) GetOptions ¶
func (s *AttributeResponse) GetOptions() []AttributeOption
GetOptions returns the value of Options.
func (*AttributeResponse) GetSlug ¶
func (s *AttributeResponse) GetSlug() string
GetSlug returns the value of Slug.
func (*AttributeResponse) GetType ¶
func (s *AttributeResponse) GetType() AttributeResponseType
GetType returns the value of Type.
func (*AttributeResponse) GetUnit ¶
func (s *AttributeResponse) GetUnit() OptString
GetUnit returns the value of Unit.
func (*AttributeResponse) GetVersion ¶
func (s *AttributeResponse) GetVersion() int
GetVersion returns the value of Version.
func (*AttributeResponse) MarshalJSON ¶
func (s *AttributeResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*AttributeResponse) SetCreatedAt ¶
func (s *AttributeResponse) SetCreatedAt(val time.Time)
SetCreatedAt sets the value of CreatedAt.
func (*AttributeResponse) SetEnabled ¶
func (s *AttributeResponse) SetEnabled(val bool)
SetEnabled sets the value of Enabled.
func (*AttributeResponse) SetID ¶
func (s *AttributeResponse) SetID(val string)
SetID sets the value of ID.
func (*AttributeResponse) SetModifiedAt ¶
func (s *AttributeResponse) SetModifiedAt(val time.Time)
SetModifiedAt sets the value of ModifiedAt.
func (*AttributeResponse) SetName ¶
func (s *AttributeResponse) SetName(val string)
SetName sets the value of Name.
func (*AttributeResponse) SetOptions ¶
func (s *AttributeResponse) SetOptions(val []AttributeOption)
SetOptions sets the value of Options.
func (*AttributeResponse) SetSlug ¶
func (s *AttributeResponse) SetSlug(val string)
SetSlug sets the value of Slug.
func (*AttributeResponse) SetType ¶
func (s *AttributeResponse) SetType(val AttributeResponseType)
SetType sets the value of Type.
func (*AttributeResponse) SetUnit ¶
func (s *AttributeResponse) SetUnit(val OptString)
SetUnit sets the value of Unit.
func (*AttributeResponse) SetVersion ¶
func (s *AttributeResponse) SetVersion(val int)
SetVersion sets the value of Version.
func (*AttributeResponse) UnmarshalJSON ¶
func (s *AttributeResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*AttributeResponse) Validate ¶
func (s *AttributeResponse) Validate() error
type AttributeResponseType ¶
type AttributeResponseType string
const ( AttributeResponseTypeSingle AttributeResponseType = "single" AttributeResponseTypeMultiple AttributeResponseType = "multiple" AttributeResponseTypeRange AttributeResponseType = "range" AttributeResponseTypeBoolean AttributeResponseType = "boolean" AttributeResponseTypeText AttributeResponseType = "text" )
func (AttributeResponseType) AllValues ¶
func (AttributeResponseType) AllValues() []AttributeResponseType
AllValues returns all AttributeResponseType values.
func (*AttributeResponseType) Decode ¶
func (s *AttributeResponseType) Decode(d *jx.Decoder) error
Decode decodes AttributeResponseType from json.
func (AttributeResponseType) Encode ¶
func (s AttributeResponseType) Encode(e *jx.Encoder)
Encode encodes AttributeResponseType as json.
func (AttributeResponseType) MarshalJSON ¶
func (s AttributeResponseType) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (AttributeResponseType) MarshalText ¶
func (s AttributeResponseType) MarshalText() ([]byte, error)
MarshalText implements encoding.TextMarshaler.
func (*AttributeResponseType) UnmarshalJSON ¶
func (s *AttributeResponseType) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*AttributeResponseType) UnmarshalText ¶
func (s *AttributeResponseType) UnmarshalText(data []byte) error
UnmarshalText implements encoding.TextUnmarshaler.
func (AttributeResponseType) Validate ¶
func (s AttributeResponseType) Validate() error
type AttributeValue ¶
type AttributeValue struct {
// Reference to the attribute definition.
AttributeId string `json:"attributeId"`
// Slug of the selected option (for single type).
OptionSlugValue OptString `json:"optionSlugValue"`
// Slugs of selected options (for multiple type).
OptionSlugValues []string `json:"optionSlugValues"`
// Numeric value (for range type).
NumericValue OptFloat64 `json:"numericValue"`
// Free text value (for text type).
TextValue OptString `json:"textValue"`
// Boolean value (for boolean type).
BooleanValue OptBool `json:"booleanValue"`
}
Embedded product attribute with value. Ref: #/components/schemas/AttributeValue
func (*AttributeValue) Decode ¶
func (s *AttributeValue) Decode(d *jx.Decoder) error
Decode decodes AttributeValue from json.
func (*AttributeValue) Encode ¶
func (s *AttributeValue) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*AttributeValue) GetAttributeId ¶
func (s *AttributeValue) GetAttributeId() string
GetAttributeId returns the value of AttributeId.
func (*AttributeValue) GetBooleanValue ¶
func (s *AttributeValue) GetBooleanValue() OptBool
GetBooleanValue returns the value of BooleanValue.
func (*AttributeValue) GetNumericValue ¶
func (s *AttributeValue) GetNumericValue() OptFloat64
GetNumericValue returns the value of NumericValue.
func (*AttributeValue) GetOptionSlugValue ¶
func (s *AttributeValue) GetOptionSlugValue() OptString
GetOptionSlugValue returns the value of OptionSlugValue.
func (*AttributeValue) GetOptionSlugValues ¶
func (s *AttributeValue) GetOptionSlugValues() []string
GetOptionSlugValues returns the value of OptionSlugValues.
func (*AttributeValue) GetTextValue ¶
func (s *AttributeValue) GetTextValue() OptString
GetTextValue returns the value of TextValue.
func (*AttributeValue) MarshalJSON ¶
func (s *AttributeValue) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*AttributeValue) SetAttributeId ¶
func (s *AttributeValue) SetAttributeId(val string)
SetAttributeId sets the value of AttributeId.
func (*AttributeValue) SetBooleanValue ¶
func (s *AttributeValue) SetBooleanValue(val OptBool)
SetBooleanValue sets the value of BooleanValue.
func (*AttributeValue) SetNumericValue ¶
func (s *AttributeValue) SetNumericValue(val OptFloat64)
SetNumericValue sets the value of NumericValue.
func (*AttributeValue) SetOptionSlugValue ¶
func (s *AttributeValue) SetOptionSlugValue(val OptString)
SetOptionSlugValue sets the value of OptionSlugValue.
func (*AttributeValue) SetOptionSlugValues ¶
func (s *AttributeValue) SetOptionSlugValues(val []string)
SetOptionSlugValues sets the value of OptionSlugValues.
func (*AttributeValue) SetTextValue ¶
func (s *AttributeValue) SetTextValue(val OptString)
SetTextValue sets the value of TextValue.
func (*AttributeValue) UnmarshalJSON ¶
func (s *AttributeValue) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*AttributeValue) Validate ¶
func (s *AttributeValue) Validate() error
type AttributeValueInput ¶
type AttributeValueInput struct {
// Reference to the attribute definition.
AttributeId uuid.UUID `json:"attributeId"`
// Slug of the selected option (for single type).
OptionSlugValue OptString `json:"optionSlugValue"`
// Slugs of selected options (for multiple type).
OptionSlugValues []string `json:"optionSlugValues"`
// Numeric value (for range type - e.g., RAM, storage).
NumericValue OptFloat64 `json:"numericValue"`
// Free text value (for text type).
TextValue OptString `json:"textValue"`
// Boolean value (for boolean type).
BooleanValue OptBool `json:"booleanValue"`
}
Input for assigning an attribute value to a product. Ref: #/components/schemas/AttributeValueInput
func (*AttributeValueInput) Decode ¶
func (s *AttributeValueInput) Decode(d *jx.Decoder) error
Decode decodes AttributeValueInput from json.
func (*AttributeValueInput) Encode ¶
func (s *AttributeValueInput) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*AttributeValueInput) GetAttributeId ¶
func (s *AttributeValueInput) GetAttributeId() uuid.UUID
GetAttributeId returns the value of AttributeId.
func (*AttributeValueInput) GetBooleanValue ¶
func (s *AttributeValueInput) GetBooleanValue() OptBool
GetBooleanValue returns the value of BooleanValue.
func (*AttributeValueInput) GetNumericValue ¶
func (s *AttributeValueInput) GetNumericValue() OptFloat64
GetNumericValue returns the value of NumericValue.
func (*AttributeValueInput) GetOptionSlugValue ¶
func (s *AttributeValueInput) GetOptionSlugValue() OptString
GetOptionSlugValue returns the value of OptionSlugValue.
func (*AttributeValueInput) GetOptionSlugValues ¶
func (s *AttributeValueInput) GetOptionSlugValues() []string
GetOptionSlugValues returns the value of OptionSlugValues.
func (*AttributeValueInput) GetTextValue ¶
func (s *AttributeValueInput) GetTextValue() OptString
GetTextValue returns the value of TextValue.
func (*AttributeValueInput) MarshalJSON ¶
func (s *AttributeValueInput) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*AttributeValueInput) SetAttributeId ¶
func (s *AttributeValueInput) SetAttributeId(val uuid.UUID)
SetAttributeId sets the value of AttributeId.
func (*AttributeValueInput) SetBooleanValue ¶
func (s *AttributeValueInput) SetBooleanValue(val OptBool)
SetBooleanValue sets the value of BooleanValue.
func (*AttributeValueInput) SetNumericValue ¶
func (s *AttributeValueInput) SetNumericValue(val OptFloat64)
SetNumericValue sets the value of NumericValue.
func (*AttributeValueInput) SetOptionSlugValue ¶
func (s *AttributeValueInput) SetOptionSlugValue(val OptString)
SetOptionSlugValue sets the value of OptionSlugValue.
func (*AttributeValueInput) SetOptionSlugValues ¶
func (s *AttributeValueInput) SetOptionSlugValues(val []string)
SetOptionSlugValues sets the value of OptionSlugValues.
func (*AttributeValueInput) SetTextValue ¶
func (s *AttributeValueInput) SetTextValue(val OptString)
SetTextValue sets the value of TextValue.
func (*AttributeValueInput) UnmarshalJSON ¶
func (s *AttributeValueInput) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*AttributeValueInput) Validate ¶
func (s *AttributeValueInput) Validate() error
type BearerAuth ¶
func (*BearerAuth) GetRoles ¶
func (s *BearerAuth) GetRoles() []string
GetRoles returns the value of Roles.
func (*BearerAuth) GetToken ¶
func (s *BearerAuth) GetToken() string
GetToken returns the value of Token.
func (*BearerAuth) SetRoles ¶
func (s *BearerAuth) SetRoles(val []string)
SetRoles sets the value of Roles.
func (*BearerAuth) SetToken ¶
func (s *BearerAuth) SetToken(val string)
SetToken sets the value of Token.
type CategoryAttribute ¶
type CategoryAttribute struct {
AttributeId string `json:"attributeId"`
Role CategoryAttributeRole `json:"role"`
Required bool `json:"required"`
SortOrder int `json:"sortOrder"`
Filterable bool `json:"filterable"`
Searchable bool `json:"searchable"`
}
Embedded category attribute. Ref: #/components/schemas/CategoryAttribute
func (*CategoryAttribute) Decode ¶
func (s *CategoryAttribute) Decode(d *jx.Decoder) error
Decode decodes CategoryAttribute from json.
func (*CategoryAttribute) Encode ¶
func (s *CategoryAttribute) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*CategoryAttribute) GetAttributeId ¶
func (s *CategoryAttribute) GetAttributeId() string
GetAttributeId returns the value of AttributeId.
func (*CategoryAttribute) GetFilterable ¶
func (s *CategoryAttribute) GetFilterable() bool
GetFilterable returns the value of Filterable.
func (*CategoryAttribute) GetRequired ¶
func (s *CategoryAttribute) GetRequired() bool
GetRequired returns the value of Required.
func (*CategoryAttribute) GetRole ¶
func (s *CategoryAttribute) GetRole() CategoryAttributeRole
GetRole returns the value of Role.
func (*CategoryAttribute) GetSearchable ¶
func (s *CategoryAttribute) GetSearchable() bool
GetSearchable returns the value of Searchable.
func (*CategoryAttribute) GetSortOrder ¶
func (s *CategoryAttribute) GetSortOrder() int
GetSortOrder returns the value of SortOrder.
func (*CategoryAttribute) MarshalJSON ¶
func (s *CategoryAttribute) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*CategoryAttribute) SetAttributeId ¶
func (s *CategoryAttribute) SetAttributeId(val string)
SetAttributeId sets the value of AttributeId.
func (*CategoryAttribute) SetFilterable ¶
func (s *CategoryAttribute) SetFilterable(val bool)
SetFilterable sets the value of Filterable.
func (*CategoryAttribute) SetRequired ¶
func (s *CategoryAttribute) SetRequired(val bool)
SetRequired sets the value of Required.
func (*CategoryAttribute) SetRole ¶
func (s *CategoryAttribute) SetRole(val CategoryAttributeRole)
SetRole sets the value of Role.
func (*CategoryAttribute) SetSearchable ¶
func (s *CategoryAttribute) SetSearchable(val bool)
SetSearchable sets the value of Searchable.
func (*CategoryAttribute) SetSortOrder ¶
func (s *CategoryAttribute) SetSortOrder(val int)
SetSortOrder sets the value of SortOrder.
func (*CategoryAttribute) UnmarshalJSON ¶
func (s *CategoryAttribute) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*CategoryAttribute) Validate ¶
func (s *CategoryAttribute) Validate() error
type CategoryAttributeInput ¶
type CategoryAttributeInput struct {
AttributeId uuid.UUID `json:"attributeId"`
// How this attribute is used in this category:
// - variant: Creates product variants (color, size) - buyer can choose
// - specification: Describes the product (processor, screen) - shown in specs.
Role CategoryAttributeInputRole `json:"role"`
// Whether products must have this attribute.
Required OptBool `json:"required"`
SortOrder OptInt `json:"sortOrder"`
// Whether this attribute can be used as a filter.
Filterable bool `json:"filterable"`
// Whether this attribute value is included in search.
Searchable bool `json:"searchable"`
}
Input for assigning an attribute to a category. Ref: #/components/schemas/CategoryAttributeInput
func (*CategoryAttributeInput) Decode ¶
func (s *CategoryAttributeInput) Decode(d *jx.Decoder) error
Decode decodes CategoryAttributeInput from json.
func (*CategoryAttributeInput) Encode ¶
func (s *CategoryAttributeInput) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*CategoryAttributeInput) GetAttributeId ¶
func (s *CategoryAttributeInput) GetAttributeId() uuid.UUID
GetAttributeId returns the value of AttributeId.
func (*CategoryAttributeInput) GetFilterable ¶
func (s *CategoryAttributeInput) GetFilterable() bool
GetFilterable returns the value of Filterable.
func (*CategoryAttributeInput) GetRequired ¶
func (s *CategoryAttributeInput) GetRequired() OptBool
GetRequired returns the value of Required.
func (*CategoryAttributeInput) GetRole ¶
func (s *CategoryAttributeInput) GetRole() CategoryAttributeInputRole
GetRole returns the value of Role.
func (*CategoryAttributeInput) GetSearchable ¶
func (s *CategoryAttributeInput) GetSearchable() bool
GetSearchable returns the value of Searchable.
func (*CategoryAttributeInput) GetSortOrder ¶
func (s *CategoryAttributeInput) GetSortOrder() OptInt
GetSortOrder returns the value of SortOrder.
func (*CategoryAttributeInput) MarshalJSON ¶
func (s *CategoryAttributeInput) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*CategoryAttributeInput) SetAttributeId ¶
func (s *CategoryAttributeInput) SetAttributeId(val uuid.UUID)
SetAttributeId sets the value of AttributeId.
func (*CategoryAttributeInput) SetFilterable ¶
func (s *CategoryAttributeInput) SetFilterable(val bool)
SetFilterable sets the value of Filterable.
func (*CategoryAttributeInput) SetRequired ¶
func (s *CategoryAttributeInput) SetRequired(val OptBool)
SetRequired sets the value of Required.
func (*CategoryAttributeInput) SetRole ¶
func (s *CategoryAttributeInput) SetRole(val CategoryAttributeInputRole)
SetRole sets the value of Role.
func (*CategoryAttributeInput) SetSearchable ¶
func (s *CategoryAttributeInput) SetSearchable(val bool)
SetSearchable sets the value of Searchable.
func (*CategoryAttributeInput) SetSortOrder ¶
func (s *CategoryAttributeInput) SetSortOrder(val OptInt)
SetSortOrder sets the value of SortOrder.
func (*CategoryAttributeInput) UnmarshalJSON ¶
func (s *CategoryAttributeInput) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*CategoryAttributeInput) Validate ¶
func (s *CategoryAttributeInput) Validate() error
type CategoryAttributeInputRole ¶
type CategoryAttributeInputRole string
How this attribute is used in this category: - variant: Creates product variants (color, size) - buyer can choose - specification: Describes the product (processor, screen) - shown in specs.
const ( CategoryAttributeInputRoleVariant CategoryAttributeInputRole = "variant" CategoryAttributeInputRoleSpecification CategoryAttributeInputRole = "specification" )
func (CategoryAttributeInputRole) AllValues ¶
func (CategoryAttributeInputRole) AllValues() []CategoryAttributeInputRole
AllValues returns all CategoryAttributeInputRole values.
func (*CategoryAttributeInputRole) Decode ¶
func (s *CategoryAttributeInputRole) Decode(d *jx.Decoder) error
Decode decodes CategoryAttributeInputRole from json.
func (CategoryAttributeInputRole) Encode ¶
func (s CategoryAttributeInputRole) Encode(e *jx.Encoder)
Encode encodes CategoryAttributeInputRole as json.
func (CategoryAttributeInputRole) MarshalJSON ¶
func (s CategoryAttributeInputRole) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (CategoryAttributeInputRole) MarshalText ¶
func (s CategoryAttributeInputRole) MarshalText() ([]byte, error)
MarshalText implements encoding.TextMarshaler.
func (*CategoryAttributeInputRole) UnmarshalJSON ¶
func (s *CategoryAttributeInputRole) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*CategoryAttributeInputRole) UnmarshalText ¶
func (s *CategoryAttributeInputRole) UnmarshalText(data []byte) error
UnmarshalText implements encoding.TextUnmarshaler.
func (CategoryAttributeInputRole) Validate ¶
func (s CategoryAttributeInputRole) Validate() error
type CategoryAttributeRole ¶
type CategoryAttributeRole string
const ( CategoryAttributeRoleVariant CategoryAttributeRole = "variant" CategoryAttributeRoleSpecification CategoryAttributeRole = "specification" )
func (CategoryAttributeRole) AllValues ¶
func (CategoryAttributeRole) AllValues() []CategoryAttributeRole
AllValues returns all CategoryAttributeRole values.
func (*CategoryAttributeRole) Decode ¶
func (s *CategoryAttributeRole) Decode(d *jx.Decoder) error
Decode decodes CategoryAttributeRole from json.
func (CategoryAttributeRole) Encode ¶
func (s CategoryAttributeRole) Encode(e *jx.Encoder)
Encode encodes CategoryAttributeRole as json.
func (CategoryAttributeRole) MarshalJSON ¶
func (s CategoryAttributeRole) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (CategoryAttributeRole) MarshalText ¶
func (s CategoryAttributeRole) MarshalText() ([]byte, error)
MarshalText implements encoding.TextMarshaler.
func (*CategoryAttributeRole) UnmarshalJSON ¶
func (s *CategoryAttributeRole) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*CategoryAttributeRole) UnmarshalText ¶
func (s *CategoryAttributeRole) UnmarshalText(data []byte) error
UnmarshalText implements encoding.TextUnmarshaler.
func (CategoryAttributeRole) Validate ¶
func (s CategoryAttributeRole) Validate() error
type CategoryListResponse ¶
type CategoryListResponse struct {
Items []CategoryResponse `json:"items"`
// Current page number.
Page int `json:"page"`
// Number of items per page.
Size int `json:"size"`
// Total number of items.
Total int `json:"total"`
}
Ref: #/components/schemas/CategoryListResponse
func (*CategoryListResponse) Decode ¶
func (s *CategoryListResponse) Decode(d *jx.Decoder) error
Decode decodes CategoryListResponse from json.
func (*CategoryListResponse) Encode ¶
func (s *CategoryListResponse) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*CategoryListResponse) GetItems ¶
func (s *CategoryListResponse) GetItems() []CategoryResponse
GetItems returns the value of Items.
func (*CategoryListResponse) GetPage ¶
func (s *CategoryListResponse) GetPage() int
GetPage returns the value of Page.
func (*CategoryListResponse) GetSize ¶
func (s *CategoryListResponse) GetSize() int
GetSize returns the value of Size.
func (*CategoryListResponse) GetTotal ¶
func (s *CategoryListResponse) GetTotal() int
GetTotal returns the value of Total.
func (*CategoryListResponse) MarshalJSON ¶
func (s *CategoryListResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*CategoryListResponse) SetItems ¶
func (s *CategoryListResponse) SetItems(val []CategoryResponse)
SetItems sets the value of Items.
func (*CategoryListResponse) SetPage ¶
func (s *CategoryListResponse) SetPage(val int)
SetPage sets the value of Page.
func (*CategoryListResponse) SetSize ¶
func (s *CategoryListResponse) SetSize(val int)
SetSize sets the value of Size.
func (*CategoryListResponse) SetTotal ¶
func (s *CategoryListResponse) SetTotal(val int)
SetTotal sets the value of Total.
func (*CategoryListResponse) UnmarshalJSON ¶
func (s *CategoryListResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*CategoryListResponse) Validate ¶
func (s *CategoryListResponse) Validate() error
type CategoryResponse ¶
type CategoryResponse struct {
ID string `json:"id"`
Version int `json:"version"`
Name string `json:"name"`
Enabled bool `json:"enabled"`
CreatedAt time.Time `json:"createdAt"`
ModifiedAt time.Time `json:"modifiedAt"`
// List of attributes assigned to this category.
Attributes []CategoryAttribute `json:"attributes"`
}
Ref: #/components/schemas/CategoryResponse
func (*CategoryResponse) Decode ¶
func (s *CategoryResponse) Decode(d *jx.Decoder) error
Decode decodes CategoryResponse from json.
func (*CategoryResponse) Encode ¶
func (s *CategoryResponse) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*CategoryResponse) GetAttributes ¶
func (s *CategoryResponse) GetAttributes() []CategoryAttribute
GetAttributes returns the value of Attributes.
func (*CategoryResponse) GetCreatedAt ¶
func (s *CategoryResponse) GetCreatedAt() time.Time
GetCreatedAt returns the value of CreatedAt.
func (*CategoryResponse) GetEnabled ¶
func (s *CategoryResponse) GetEnabled() bool
GetEnabled returns the value of Enabled.
func (*CategoryResponse) GetID ¶
func (s *CategoryResponse) GetID() string
GetID returns the value of ID.
func (*CategoryResponse) GetModifiedAt ¶
func (s *CategoryResponse) GetModifiedAt() time.Time
GetModifiedAt returns the value of ModifiedAt.
func (*CategoryResponse) GetName ¶
func (s *CategoryResponse) GetName() string
GetName returns the value of Name.
func (*CategoryResponse) GetVersion ¶
func (s *CategoryResponse) GetVersion() int
GetVersion returns the value of Version.
func (*CategoryResponse) MarshalJSON ¶
func (s *CategoryResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*CategoryResponse) SetAttributes ¶
func (s *CategoryResponse) SetAttributes(val []CategoryAttribute)
SetAttributes sets the value of Attributes.
func (*CategoryResponse) SetCreatedAt ¶
func (s *CategoryResponse) SetCreatedAt(val time.Time)
SetCreatedAt sets the value of CreatedAt.
func (*CategoryResponse) SetEnabled ¶
func (s *CategoryResponse) SetEnabled(val bool)
SetEnabled sets the value of Enabled.
func (*CategoryResponse) SetID ¶
func (s *CategoryResponse) SetID(val string)
SetID sets the value of ID.
func (*CategoryResponse) SetModifiedAt ¶
func (s *CategoryResponse) SetModifiedAt(val time.Time)
SetModifiedAt sets the value of ModifiedAt.
func (*CategoryResponse) SetName ¶
func (s *CategoryResponse) SetName(val string)
SetName sets the value of Name.
func (*CategoryResponse) SetVersion ¶
func (s *CategoryResponse) SetVersion(val int)
SetVersion sets the value of Version.
func (*CategoryResponse) UnmarshalJSON ¶
func (s *CategoryResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*CategoryResponse) Validate ¶
func (s *CategoryResponse) Validate() error
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client implements OAS client.
func NewClient ¶
func NewClient(serverURL string, sec SecuritySource, opts ...ClientOption) (*Client, error)
NewClient initializes new Client defined by OAS.
func ProvideClient ¶ added in v1.0.10
func ProvideClient( httpClient *http.Client, cfg httpclient.Config, tokenCfg token.Config, tracerProvider trace.TracerProvider, meterProvider metric.MeterProvider, ) (*Client, error)
ProvideClient creates a configured API client with all dependencies for fx DI.
func (*Client) CreateAttribute ¶
func (c *Client) CreateAttribute(ctx context.Context, request *CreateAttributeRequest) (CreateAttributeRes, error)
CreateAttribute invokes createAttribute operation.
Create a new attribute.
POST /v1/attribute/create
func (*Client) CreateCategory ¶
func (c *Client) CreateCategory(ctx context.Context, request *CreateCategoryRequest) (CreateCategoryRes, error)
CreateCategory invokes createCategory operation.
Create a new category.
POST /v1/category/create
func (*Client) CreateProduct ¶
func (c *Client) CreateProduct(ctx context.Context, request *CreateProductRequest) (CreateProductRes, error)
CreateProduct invokes createProduct operation.
Create a new product.
POST /v1/product/create
func (*Client) GetAttributeById ¶
func (c *Client) GetAttributeById(ctx context.Context, params GetAttributeByIdParams) (GetAttributeByIdRes, error)
GetAttributeById invokes getAttributeById operation.
Get an attribute by ID.
GET /v1/attribute/get/{id}
func (*Client) GetAttributeList ¶
func (c *Client) GetAttributeList(ctx context.Context, params GetAttributeListParams) (GetAttributeListRes, error)
GetAttributeList invokes getAttributeList operation.
Get a paginated list of attributes.
GET /v1/attribute/list
func (*Client) GetCategoryById ¶
func (c *Client) GetCategoryById(ctx context.Context, params GetCategoryByIdParams) (GetCategoryByIdRes, error)
GetCategoryById invokes getCategoryById operation.
Get a category by ID.
GET /v1/category/get/{id}
func (*Client) GetCategoryList ¶
func (c *Client) GetCategoryList(ctx context.Context, params GetCategoryListParams) (GetCategoryListRes, error)
GetCategoryList invokes getCategoryList operation.
Get a paginated list of categories.
GET /v1/category/list
func (*Client) GetProductById ¶
func (c *Client) GetProductById(ctx context.Context, params GetProductByIdParams) (GetProductByIdRes, error)
GetProductById invokes getProductById operation.
Get a product by ID.
GET /v1/product/get/{id}
func (*Client) GetProductList ¶
func (c *Client) GetProductList(ctx context.Context, params GetProductListParams) (GetProductListRes, error)
GetProductList invokes getProductList operation.
Get a paginated list of products.
GET /v1/product/list
func (*Client) UpdateAttribute ¶
func (c *Client) UpdateAttribute(ctx context.Context, request *UpdateAttributeRequest) (UpdateAttributeRes, error)
UpdateAttribute invokes updateAttribute operation.
Update an existing attribute.
PUT /v1/attribute/update
func (*Client) UpdateCategory ¶
func (c *Client) UpdateCategory(ctx context.Context, request *UpdateCategoryRequest) (UpdateCategoryRes, error)
UpdateCategory invokes updateCategory operation.
Update an existing category.
PUT /v1/category/update
func (*Client) UpdateProduct ¶
func (c *Client) UpdateProduct(ctx context.Context, request *UpdateProductRequest) (UpdateProductRes, error)
UpdateProduct invokes updateProduct operation.
Update an existing product.
PUT /v1/product/update
type ClientOption ¶
type ClientOption interface {
// contains filtered or unexported methods
}
ClientOption is client config option.
func WithClient ¶
func WithClient(client ht.Client) ClientOption
WithClient specifies http client to use.
type CreateAttributeBadRequest ¶
type CreateAttributeBadRequest Problem
func (*CreateAttributeBadRequest) Decode ¶
func (s *CreateAttributeBadRequest) Decode(d *jx.Decoder) error
Decode decodes CreateAttributeBadRequest from json.
func (*CreateAttributeBadRequest) Encode ¶
func (s *CreateAttributeBadRequest) Encode(e *jx.Encoder)
Encode encodes CreateAttributeBadRequest as json.
func (*CreateAttributeBadRequest) MarshalJSON ¶
func (s *CreateAttributeBadRequest) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*CreateAttributeBadRequest) UnmarshalJSON ¶
func (s *CreateAttributeBadRequest) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type CreateAttributeConflict ¶
type CreateAttributeConflict Problem
func (*CreateAttributeConflict) Decode ¶
func (s *CreateAttributeConflict) Decode(d *jx.Decoder) error
Decode decodes CreateAttributeConflict from json.
func (*CreateAttributeConflict) Encode ¶
func (s *CreateAttributeConflict) Encode(e *jx.Encoder)
Encode encodes CreateAttributeConflict as json.
func (*CreateAttributeConflict) MarshalJSON ¶
func (s *CreateAttributeConflict) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*CreateAttributeConflict) UnmarshalJSON ¶
func (s *CreateAttributeConflict) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type CreateAttributeInternalServerError ¶
type CreateAttributeInternalServerError Problem
func (*CreateAttributeInternalServerError) Decode ¶
func (s *CreateAttributeInternalServerError) Decode(d *jx.Decoder) error
Decode decodes CreateAttributeInternalServerError from json.
func (*CreateAttributeInternalServerError) Encode ¶
func (s *CreateAttributeInternalServerError) Encode(e *jx.Encoder)
Encode encodes CreateAttributeInternalServerError as json.
func (*CreateAttributeInternalServerError) MarshalJSON ¶
func (s *CreateAttributeInternalServerError) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*CreateAttributeInternalServerError) UnmarshalJSON ¶
func (s *CreateAttributeInternalServerError) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type CreateAttributeRequest ¶
type CreateAttributeRequest struct {
// Optional client-generated UUID.
ID OptUUID `json:"id"`
Name string `json:"name"`
// URL-friendly identifier.
Slug string `json:"slug"`
// Attribute type:
// - single: One option from list (e.g., color)
// - multiple: Multiple options (e.g., connectivity: WiFi, Bluetooth)
// - range: Numeric value with optional unit (e.g., RAM: 8 GB)
// - boolean: Yes/No value (e.g., waterproof)
// - text: Free text (e.g., custom engraving).
Type CreateAttributeRequestType `json:"type"`
// Unit for range type (GB, kg, mm, etc.).
Unit OptString `json:"unit"`
Enabled bool `json:"enabled"`
// Options for single/multiple types.
Options []AttributeOptionInput `json:"options"`
}
Ref: #/components/schemas/CreateAttributeRequest
func (*CreateAttributeRequest) Decode ¶
func (s *CreateAttributeRequest) Decode(d *jx.Decoder) error
Decode decodes CreateAttributeRequest from json.
func (*CreateAttributeRequest) Encode ¶
func (s *CreateAttributeRequest) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*CreateAttributeRequest) GetEnabled ¶
func (s *CreateAttributeRequest) GetEnabled() bool
GetEnabled returns the value of Enabled.
func (*CreateAttributeRequest) GetID ¶
func (s *CreateAttributeRequest) GetID() OptUUID
GetID returns the value of ID.
func (*CreateAttributeRequest) GetName ¶
func (s *CreateAttributeRequest) GetName() string
GetName returns the value of Name.
func (*CreateAttributeRequest) GetOptions ¶
func (s *CreateAttributeRequest) GetOptions() []AttributeOptionInput
GetOptions returns the value of Options.
func (*CreateAttributeRequest) GetSlug ¶
func (s *CreateAttributeRequest) GetSlug() string
GetSlug returns the value of Slug.
func (*CreateAttributeRequest) GetType ¶
func (s *CreateAttributeRequest) GetType() CreateAttributeRequestType
GetType returns the value of Type.
func (*CreateAttributeRequest) GetUnit ¶
func (s *CreateAttributeRequest) GetUnit() OptString
GetUnit returns the value of Unit.
func (*CreateAttributeRequest) MarshalJSON ¶
func (s *CreateAttributeRequest) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*CreateAttributeRequest) SetEnabled ¶
func (s *CreateAttributeRequest) SetEnabled(val bool)
SetEnabled sets the value of Enabled.
func (*CreateAttributeRequest) SetID ¶
func (s *CreateAttributeRequest) SetID(val OptUUID)
SetID sets the value of ID.
func (*CreateAttributeRequest) SetName ¶
func (s *CreateAttributeRequest) SetName(val string)
SetName sets the value of Name.
func (*CreateAttributeRequest) SetOptions ¶
func (s *CreateAttributeRequest) SetOptions(val []AttributeOptionInput)
SetOptions sets the value of Options.
func (*CreateAttributeRequest) SetSlug ¶
func (s *CreateAttributeRequest) SetSlug(val string)
SetSlug sets the value of Slug.
func (*CreateAttributeRequest) SetType ¶
func (s *CreateAttributeRequest) SetType(val CreateAttributeRequestType)
SetType sets the value of Type.
func (*CreateAttributeRequest) SetUnit ¶
func (s *CreateAttributeRequest) SetUnit(val OptString)
SetUnit sets the value of Unit.
func (*CreateAttributeRequest) UnmarshalJSON ¶
func (s *CreateAttributeRequest) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*CreateAttributeRequest) Validate ¶
func (s *CreateAttributeRequest) Validate() error
type CreateAttributeRequestType ¶
type CreateAttributeRequestType string
Attribute type: - single: One option from list (e.g., color) - multiple: Multiple options (e.g., connectivity: WiFi, Bluetooth) - range: Numeric value with optional unit (e.g., RAM: 8 GB) - boolean: Yes/No value (e.g., waterproof) - text: Free text (e.g., custom engraving).
const ( CreateAttributeRequestTypeSingle CreateAttributeRequestType = "single" CreateAttributeRequestTypeMultiple CreateAttributeRequestType = "multiple" CreateAttributeRequestTypeRange CreateAttributeRequestType = "range" CreateAttributeRequestTypeBoolean CreateAttributeRequestType = "boolean" CreateAttributeRequestTypeText CreateAttributeRequestType = "text" )
func (CreateAttributeRequestType) AllValues ¶
func (CreateAttributeRequestType) AllValues() []CreateAttributeRequestType
AllValues returns all CreateAttributeRequestType values.
func (*CreateAttributeRequestType) Decode ¶
func (s *CreateAttributeRequestType) Decode(d *jx.Decoder) error
Decode decodes CreateAttributeRequestType from json.
func (CreateAttributeRequestType) Encode ¶
func (s CreateAttributeRequestType) Encode(e *jx.Encoder)
Encode encodes CreateAttributeRequestType as json.
func (CreateAttributeRequestType) MarshalJSON ¶
func (s CreateAttributeRequestType) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (CreateAttributeRequestType) MarshalText ¶
func (s CreateAttributeRequestType) MarshalText() ([]byte, error)
MarshalText implements encoding.TextMarshaler.
func (*CreateAttributeRequestType) UnmarshalJSON ¶
func (s *CreateAttributeRequestType) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*CreateAttributeRequestType) UnmarshalText ¶
func (s *CreateAttributeRequestType) UnmarshalText(data []byte) error
UnmarshalText implements encoding.TextUnmarshaler.
func (CreateAttributeRequestType) Validate ¶
func (s CreateAttributeRequestType) Validate() error
type CreateAttributeRes ¶
type CreateAttributeRes interface {
// contains filtered or unexported methods
}
type CreateCategoryBadRequest ¶
type CreateCategoryBadRequest Problem
func (*CreateCategoryBadRequest) Decode ¶
func (s *CreateCategoryBadRequest) Decode(d *jx.Decoder) error
Decode decodes CreateCategoryBadRequest from json.
func (*CreateCategoryBadRequest) Encode ¶
func (s *CreateCategoryBadRequest) Encode(e *jx.Encoder)
Encode encodes CreateCategoryBadRequest as json.
func (*CreateCategoryBadRequest) MarshalJSON ¶
func (s *CreateCategoryBadRequest) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*CreateCategoryBadRequest) UnmarshalJSON ¶
func (s *CreateCategoryBadRequest) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type CreateCategoryInternalServerError ¶
type CreateCategoryInternalServerError Problem
func (*CreateCategoryInternalServerError) Decode ¶
func (s *CreateCategoryInternalServerError) Decode(d *jx.Decoder) error
Decode decodes CreateCategoryInternalServerError from json.
func (*CreateCategoryInternalServerError) Encode ¶
func (s *CreateCategoryInternalServerError) Encode(e *jx.Encoder)
Encode encodes CreateCategoryInternalServerError as json.
func (*CreateCategoryInternalServerError) MarshalJSON ¶
func (s *CreateCategoryInternalServerError) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*CreateCategoryInternalServerError) UnmarshalJSON ¶
func (s *CreateCategoryInternalServerError) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type CreateCategoryRequest ¶
type CreateCategoryRequest struct {
// Optional client-generated UUID.
ID OptUUID `json:"id"`
Name string `json:"name"`
Enabled bool `json:"enabled"`
// List of attributes to assign to this category.
Attributes []CategoryAttributeInput `json:"attributes"`
}
Ref: #/components/schemas/CreateCategoryRequest
func (*CreateCategoryRequest) Decode ¶
func (s *CreateCategoryRequest) Decode(d *jx.Decoder) error
Decode decodes CreateCategoryRequest from json.
func (*CreateCategoryRequest) Encode ¶
func (s *CreateCategoryRequest) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*CreateCategoryRequest) GetAttributes ¶
func (s *CreateCategoryRequest) GetAttributes() []CategoryAttributeInput
GetAttributes returns the value of Attributes.
func (*CreateCategoryRequest) GetEnabled ¶
func (s *CreateCategoryRequest) GetEnabled() bool
GetEnabled returns the value of Enabled.
func (*CreateCategoryRequest) GetID ¶
func (s *CreateCategoryRequest) GetID() OptUUID
GetID returns the value of ID.
func (*CreateCategoryRequest) GetName ¶
func (s *CreateCategoryRequest) GetName() string
GetName returns the value of Name.
func (*CreateCategoryRequest) MarshalJSON ¶
func (s *CreateCategoryRequest) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*CreateCategoryRequest) SetAttributes ¶
func (s *CreateCategoryRequest) SetAttributes(val []CategoryAttributeInput)
SetAttributes sets the value of Attributes.
func (*CreateCategoryRequest) SetEnabled ¶
func (s *CreateCategoryRequest) SetEnabled(val bool)
SetEnabled sets the value of Enabled.
func (*CreateCategoryRequest) SetID ¶
func (s *CreateCategoryRequest) SetID(val OptUUID)
SetID sets the value of ID.
func (*CreateCategoryRequest) SetName ¶
func (s *CreateCategoryRequest) SetName(val string)
SetName sets the value of Name.
func (*CreateCategoryRequest) UnmarshalJSON ¶
func (s *CreateCategoryRequest) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*CreateCategoryRequest) Validate ¶
func (s *CreateCategoryRequest) Validate() error
type CreateCategoryRes ¶
type CreateCategoryRes interface {
// contains filtered or unexported methods
}
type CreateProductBadRequest ¶
type CreateProductBadRequest Problem
func (*CreateProductBadRequest) Decode ¶
func (s *CreateProductBadRequest) Decode(d *jx.Decoder) error
Decode decodes CreateProductBadRequest from json.
func (*CreateProductBadRequest) Encode ¶
func (s *CreateProductBadRequest) Encode(e *jx.Encoder)
Encode encodes CreateProductBadRequest as json.
func (*CreateProductBadRequest) MarshalJSON ¶
func (s *CreateProductBadRequest) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*CreateProductBadRequest) UnmarshalJSON ¶
func (s *CreateProductBadRequest) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type CreateProductForbidden ¶
type CreateProductForbidden Problem
func (*CreateProductForbidden) Decode ¶
func (s *CreateProductForbidden) Decode(d *jx.Decoder) error
Decode decodes CreateProductForbidden from json.
func (*CreateProductForbidden) Encode ¶
func (s *CreateProductForbidden) Encode(e *jx.Encoder)
Encode encodes CreateProductForbidden as json.
func (*CreateProductForbidden) MarshalJSON ¶
func (s *CreateProductForbidden) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*CreateProductForbidden) UnmarshalJSON ¶
func (s *CreateProductForbidden) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type CreateProductInternalServerError ¶
type CreateProductInternalServerError Problem
func (*CreateProductInternalServerError) Decode ¶
func (s *CreateProductInternalServerError) Decode(d *jx.Decoder) error
Decode decodes CreateProductInternalServerError from json.
func (*CreateProductInternalServerError) Encode ¶
func (s *CreateProductInternalServerError) Encode(e *jx.Encoder)
Encode encodes CreateProductInternalServerError as json.
func (*CreateProductInternalServerError) MarshalJSON ¶
func (s *CreateProductInternalServerError) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*CreateProductInternalServerError) UnmarshalJSON ¶
func (s *CreateProductInternalServerError) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type CreateProductRequest ¶
type CreateProductRequest struct {
// Optional client-generated UUID.
ID OptUUID `json:"id"`
Name string `json:"name"`
Description OptString `json:"description"`
Price float64 `json:"price"`
Quantity int `json:"quantity"`
// Reference to image in Image Service.
ImageId OptUUID `json:"imageId"`
// Category this product belongs to.
CategoryId OptUUID `json:"categoryId"`
Enabled bool `json:"enabled"`
// List of attribute values for this product.
Attributes []AttributeValueInput `json:"attributes"`
}
Ref: #/components/schemas/CreateProductRequest
func (*CreateProductRequest) Decode ¶
func (s *CreateProductRequest) Decode(d *jx.Decoder) error
Decode decodes CreateProductRequest from json.
func (*CreateProductRequest) Encode ¶
func (s *CreateProductRequest) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*CreateProductRequest) GetAttributes ¶
func (s *CreateProductRequest) GetAttributes() []AttributeValueInput
GetAttributes returns the value of Attributes.
func (*CreateProductRequest) GetCategoryId ¶
func (s *CreateProductRequest) GetCategoryId() OptUUID
GetCategoryId returns the value of CategoryId.
func (*CreateProductRequest) GetDescription ¶
func (s *CreateProductRequest) GetDescription() OptString
GetDescription returns the value of Description.
func (*CreateProductRequest) GetEnabled ¶
func (s *CreateProductRequest) GetEnabled() bool
GetEnabled returns the value of Enabled.
func (*CreateProductRequest) GetID ¶
func (s *CreateProductRequest) GetID() OptUUID
GetID returns the value of ID.
func (*CreateProductRequest) GetImageId ¶
func (s *CreateProductRequest) GetImageId() OptUUID
GetImageId returns the value of ImageId.
func (*CreateProductRequest) GetName ¶
func (s *CreateProductRequest) GetName() string
GetName returns the value of Name.
func (*CreateProductRequest) GetPrice ¶
func (s *CreateProductRequest) GetPrice() float64
GetPrice returns the value of Price.
func (*CreateProductRequest) GetQuantity ¶
func (s *CreateProductRequest) GetQuantity() int
GetQuantity returns the value of Quantity.
func (*CreateProductRequest) MarshalJSON ¶
func (s *CreateProductRequest) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*CreateProductRequest) SetAttributes ¶
func (s *CreateProductRequest) SetAttributes(val []AttributeValueInput)
SetAttributes sets the value of Attributes.
func (*CreateProductRequest) SetCategoryId ¶
func (s *CreateProductRequest) SetCategoryId(val OptUUID)
SetCategoryId sets the value of CategoryId.
func (*CreateProductRequest) SetDescription ¶
func (s *CreateProductRequest) SetDescription(val OptString)
SetDescription sets the value of Description.
func (*CreateProductRequest) SetEnabled ¶
func (s *CreateProductRequest) SetEnabled(val bool)
SetEnabled sets the value of Enabled.
func (*CreateProductRequest) SetID ¶
func (s *CreateProductRequest) SetID(val OptUUID)
SetID sets the value of ID.
func (*CreateProductRequest) SetImageId ¶
func (s *CreateProductRequest) SetImageId(val OptUUID)
SetImageId sets the value of ImageId.
func (*CreateProductRequest) SetName ¶
func (s *CreateProductRequest) SetName(val string)
SetName sets the value of Name.
func (*CreateProductRequest) SetPrice ¶
func (s *CreateProductRequest) SetPrice(val float64)
SetPrice sets the value of Price.
func (*CreateProductRequest) SetQuantity ¶
func (s *CreateProductRequest) SetQuantity(val int)
SetQuantity sets the value of Quantity.
func (*CreateProductRequest) UnmarshalJSON ¶
func (s *CreateProductRequest) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*CreateProductRequest) Validate ¶
func (s *CreateProductRequest) Validate() error
type CreateProductRes ¶
type CreateProductRes interface {
// contains filtered or unexported methods
}
type CreateProductUnauthorized ¶
type CreateProductUnauthorized Problem
func (*CreateProductUnauthorized) Decode ¶
func (s *CreateProductUnauthorized) Decode(d *jx.Decoder) error
Decode decodes CreateProductUnauthorized from json.
func (*CreateProductUnauthorized) Encode ¶
func (s *CreateProductUnauthorized) Encode(e *jx.Encoder)
Encode encodes CreateProductUnauthorized as json.
func (*CreateProductUnauthorized) MarshalJSON ¶
func (s *CreateProductUnauthorized) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*CreateProductUnauthorized) UnmarshalJSON ¶
func (s *CreateProductUnauthorized) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type GetAttributeByIdInternalServerError ¶
type GetAttributeByIdInternalServerError Problem
func (*GetAttributeByIdInternalServerError) Decode ¶
func (s *GetAttributeByIdInternalServerError) Decode(d *jx.Decoder) error
Decode decodes GetAttributeByIdInternalServerError from json.
func (*GetAttributeByIdInternalServerError) Encode ¶
func (s *GetAttributeByIdInternalServerError) Encode(e *jx.Encoder)
Encode encodes GetAttributeByIdInternalServerError as json.
func (*GetAttributeByIdInternalServerError) MarshalJSON ¶
func (s *GetAttributeByIdInternalServerError) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*GetAttributeByIdInternalServerError) UnmarshalJSON ¶
func (s *GetAttributeByIdInternalServerError) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type GetAttributeByIdNotFound ¶
type GetAttributeByIdNotFound Problem
func (*GetAttributeByIdNotFound) Decode ¶
func (s *GetAttributeByIdNotFound) Decode(d *jx.Decoder) error
Decode decodes GetAttributeByIdNotFound from json.
func (*GetAttributeByIdNotFound) Encode ¶
func (s *GetAttributeByIdNotFound) Encode(e *jx.Encoder)
Encode encodes GetAttributeByIdNotFound as json.
func (*GetAttributeByIdNotFound) MarshalJSON ¶
func (s *GetAttributeByIdNotFound) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*GetAttributeByIdNotFound) UnmarshalJSON ¶
func (s *GetAttributeByIdNotFound) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type GetAttributeByIdParams ¶
GetAttributeByIdParams is parameters of getAttributeById operation.
type GetAttributeByIdRes ¶
type GetAttributeByIdRes interface {
// contains filtered or unexported methods
}
type GetAttributeListBadRequest ¶
type GetAttributeListBadRequest Problem
func (*GetAttributeListBadRequest) Decode ¶
func (s *GetAttributeListBadRequest) Decode(d *jx.Decoder) error
Decode decodes GetAttributeListBadRequest from json.
func (*GetAttributeListBadRequest) Encode ¶
func (s *GetAttributeListBadRequest) Encode(e *jx.Encoder)
Encode encodes GetAttributeListBadRequest as json.
func (*GetAttributeListBadRequest) MarshalJSON ¶
func (s *GetAttributeListBadRequest) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*GetAttributeListBadRequest) UnmarshalJSON ¶
func (s *GetAttributeListBadRequest) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type GetAttributeListInternalServerError ¶
type GetAttributeListInternalServerError Problem
func (*GetAttributeListInternalServerError) Decode ¶
func (s *GetAttributeListInternalServerError) Decode(d *jx.Decoder) error
Decode decodes GetAttributeListInternalServerError from json.
func (*GetAttributeListInternalServerError) Encode ¶
func (s *GetAttributeListInternalServerError) Encode(e *jx.Encoder)
Encode encodes GetAttributeListInternalServerError as json.
func (*GetAttributeListInternalServerError) MarshalJSON ¶
func (s *GetAttributeListInternalServerError) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*GetAttributeListInternalServerError) UnmarshalJSON ¶
func (s *GetAttributeListInternalServerError) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type GetAttributeListOrder ¶
type GetAttributeListOrder string
const ( GetAttributeListOrderAsc GetAttributeListOrder = "asc" GetAttributeListOrderDesc GetAttributeListOrder = "desc" )
func (GetAttributeListOrder) AllValues ¶
func (GetAttributeListOrder) AllValues() []GetAttributeListOrder
AllValues returns all GetAttributeListOrder values.
func (GetAttributeListOrder) MarshalText ¶
func (s GetAttributeListOrder) MarshalText() ([]byte, error)
MarshalText implements encoding.TextMarshaler.
func (*GetAttributeListOrder) UnmarshalText ¶
func (s *GetAttributeListOrder) UnmarshalText(data []byte) error
UnmarshalText implements encoding.TextUnmarshaler.
func (GetAttributeListOrder) Validate ¶
func (s GetAttributeListOrder) Validate() error
type GetAttributeListParams ¶
type GetAttributeListParams struct {
// Page number (1-based).
Page int
// Number of items per page (max 100).
Size int
// Filter by enabled status.
Enabled OptBool `json:",omitempty,omitzero"`
// Filter by attribute type.
Type OptGetAttributeListType `json:",omitempty,omitzero"`
// Field to sort by.
Sort OptGetAttributeListSort `json:",omitempty,omitzero"`
// Sort order.
Order OptGetAttributeListOrder `json:",omitempty,omitzero"`
}
GetAttributeListParams is parameters of getAttributeList operation.
type GetAttributeListRes ¶
type GetAttributeListRes interface {
// contains filtered or unexported methods
}
type GetAttributeListSort ¶
type GetAttributeListSort string
const ( GetAttributeListSortName GetAttributeListSort = "name" GetAttributeListSortSlug GetAttributeListSort = "slug" GetAttributeListSortCreatedAt GetAttributeListSort = "createdAt" GetAttributeListSortModifiedAt GetAttributeListSort = "modifiedAt" )
func (GetAttributeListSort) AllValues ¶
func (GetAttributeListSort) AllValues() []GetAttributeListSort
AllValues returns all GetAttributeListSort values.
func (GetAttributeListSort) MarshalText ¶
func (s GetAttributeListSort) MarshalText() ([]byte, error)
MarshalText implements encoding.TextMarshaler.
func (*GetAttributeListSort) UnmarshalText ¶
func (s *GetAttributeListSort) UnmarshalText(data []byte) error
UnmarshalText implements encoding.TextUnmarshaler.
func (GetAttributeListSort) Validate ¶
func (s GetAttributeListSort) Validate() error
type GetAttributeListType ¶
type GetAttributeListType string
const ( GetAttributeListTypeSingle GetAttributeListType = "single" GetAttributeListTypeMultiple GetAttributeListType = "multiple" GetAttributeListTypeRange GetAttributeListType = "range" GetAttributeListTypeBoolean GetAttributeListType = "boolean" GetAttributeListTypeText GetAttributeListType = "text" )
func (GetAttributeListType) AllValues ¶
func (GetAttributeListType) AllValues() []GetAttributeListType
AllValues returns all GetAttributeListType values.
func (GetAttributeListType) MarshalText ¶
func (s GetAttributeListType) MarshalText() ([]byte, error)
MarshalText implements encoding.TextMarshaler.
func (*GetAttributeListType) UnmarshalText ¶
func (s *GetAttributeListType) UnmarshalText(data []byte) error
UnmarshalText implements encoding.TextUnmarshaler.
func (GetAttributeListType) Validate ¶
func (s GetAttributeListType) Validate() error
type GetCategoryByIdInternalServerError ¶
type GetCategoryByIdInternalServerError Problem
func (*GetCategoryByIdInternalServerError) Decode ¶
func (s *GetCategoryByIdInternalServerError) Decode(d *jx.Decoder) error
Decode decodes GetCategoryByIdInternalServerError from json.
func (*GetCategoryByIdInternalServerError) Encode ¶
func (s *GetCategoryByIdInternalServerError) Encode(e *jx.Encoder)
Encode encodes GetCategoryByIdInternalServerError as json.
func (*GetCategoryByIdInternalServerError) MarshalJSON ¶
func (s *GetCategoryByIdInternalServerError) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*GetCategoryByIdInternalServerError) UnmarshalJSON ¶
func (s *GetCategoryByIdInternalServerError) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type GetCategoryByIdNotFound ¶
type GetCategoryByIdNotFound Problem
func (*GetCategoryByIdNotFound) Decode ¶
func (s *GetCategoryByIdNotFound) Decode(d *jx.Decoder) error
Decode decodes GetCategoryByIdNotFound from json.
func (*GetCategoryByIdNotFound) Encode ¶
func (s *GetCategoryByIdNotFound) Encode(e *jx.Encoder)
Encode encodes GetCategoryByIdNotFound as json.
func (*GetCategoryByIdNotFound) MarshalJSON ¶
func (s *GetCategoryByIdNotFound) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*GetCategoryByIdNotFound) UnmarshalJSON ¶
func (s *GetCategoryByIdNotFound) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type GetCategoryByIdParams ¶
GetCategoryByIdParams is parameters of getCategoryById operation.
type GetCategoryByIdRes ¶
type GetCategoryByIdRes interface {
// contains filtered or unexported methods
}
type GetCategoryListBadRequest ¶
type GetCategoryListBadRequest Problem
func (*GetCategoryListBadRequest) Decode ¶
func (s *GetCategoryListBadRequest) Decode(d *jx.Decoder) error
Decode decodes GetCategoryListBadRequest from json.
func (*GetCategoryListBadRequest) Encode ¶
func (s *GetCategoryListBadRequest) Encode(e *jx.Encoder)
Encode encodes GetCategoryListBadRequest as json.
func (*GetCategoryListBadRequest) MarshalJSON ¶
func (s *GetCategoryListBadRequest) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*GetCategoryListBadRequest) UnmarshalJSON ¶
func (s *GetCategoryListBadRequest) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type GetCategoryListInternalServerError ¶
type GetCategoryListInternalServerError Problem
func (*GetCategoryListInternalServerError) Decode ¶
func (s *GetCategoryListInternalServerError) Decode(d *jx.Decoder) error
Decode decodes GetCategoryListInternalServerError from json.
func (*GetCategoryListInternalServerError) Encode ¶
func (s *GetCategoryListInternalServerError) Encode(e *jx.Encoder)
Encode encodes GetCategoryListInternalServerError as json.
func (*GetCategoryListInternalServerError) MarshalJSON ¶
func (s *GetCategoryListInternalServerError) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*GetCategoryListInternalServerError) UnmarshalJSON ¶
func (s *GetCategoryListInternalServerError) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type GetCategoryListOrder ¶
type GetCategoryListOrder string
const ( GetCategoryListOrderAsc GetCategoryListOrder = "asc" GetCategoryListOrderDesc GetCategoryListOrder = "desc" )
func (GetCategoryListOrder) AllValues ¶
func (GetCategoryListOrder) AllValues() []GetCategoryListOrder
AllValues returns all GetCategoryListOrder values.
func (GetCategoryListOrder) MarshalText ¶
func (s GetCategoryListOrder) MarshalText() ([]byte, error)
MarshalText implements encoding.TextMarshaler.
func (*GetCategoryListOrder) UnmarshalText ¶
func (s *GetCategoryListOrder) UnmarshalText(data []byte) error
UnmarshalText implements encoding.TextUnmarshaler.
func (GetCategoryListOrder) Validate ¶
func (s GetCategoryListOrder) Validate() error
type GetCategoryListParams ¶
type GetCategoryListParams struct {
// Page number (1-based).
Page int
// Number of items per page (max 100).
Size int
// Filter by enabled status.
Enabled OptBool `json:",omitempty,omitzero"`
// Field to sort by.
Sort OptGetCategoryListSort `json:",omitempty,omitzero"`
// Sort order.
Order OptGetCategoryListOrder `json:",omitempty,omitzero"`
}
GetCategoryListParams is parameters of getCategoryList operation.
type GetCategoryListRes ¶
type GetCategoryListRes interface {
// contains filtered or unexported methods
}
type GetCategoryListSort ¶
type GetCategoryListSort string
const ( GetCategoryListSortName GetCategoryListSort = "name" GetCategoryListSortCreatedAt GetCategoryListSort = "createdAt" GetCategoryListSortModifiedAt GetCategoryListSort = "modifiedAt" )
func (GetCategoryListSort) AllValues ¶
func (GetCategoryListSort) AllValues() []GetCategoryListSort
AllValues returns all GetCategoryListSort values.
func (GetCategoryListSort) MarshalText ¶
func (s GetCategoryListSort) MarshalText() ([]byte, error)
MarshalText implements encoding.TextMarshaler.
func (*GetCategoryListSort) UnmarshalText ¶
func (s *GetCategoryListSort) UnmarshalText(data []byte) error
UnmarshalText implements encoding.TextUnmarshaler.
func (GetCategoryListSort) Validate ¶
func (s GetCategoryListSort) Validate() error
type GetProductByIdForbidden ¶
type GetProductByIdForbidden Problem
func (*GetProductByIdForbidden) Decode ¶
func (s *GetProductByIdForbidden) Decode(d *jx.Decoder) error
Decode decodes GetProductByIdForbidden from json.
func (*GetProductByIdForbidden) Encode ¶
func (s *GetProductByIdForbidden) Encode(e *jx.Encoder)
Encode encodes GetProductByIdForbidden as json.
func (*GetProductByIdForbidden) MarshalJSON ¶
func (s *GetProductByIdForbidden) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*GetProductByIdForbidden) UnmarshalJSON ¶
func (s *GetProductByIdForbidden) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type GetProductByIdInternalServerError ¶
type GetProductByIdInternalServerError Problem
func (*GetProductByIdInternalServerError) Decode ¶
func (s *GetProductByIdInternalServerError) Decode(d *jx.Decoder) error
Decode decodes GetProductByIdInternalServerError from json.
func (*GetProductByIdInternalServerError) Encode ¶
func (s *GetProductByIdInternalServerError) Encode(e *jx.Encoder)
Encode encodes GetProductByIdInternalServerError as json.
func (*GetProductByIdInternalServerError) MarshalJSON ¶
func (s *GetProductByIdInternalServerError) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*GetProductByIdInternalServerError) UnmarshalJSON ¶
func (s *GetProductByIdInternalServerError) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type GetProductByIdNotFound ¶
type GetProductByIdNotFound Problem
func (*GetProductByIdNotFound) Decode ¶
func (s *GetProductByIdNotFound) Decode(d *jx.Decoder) error
Decode decodes GetProductByIdNotFound from json.
func (*GetProductByIdNotFound) Encode ¶
func (s *GetProductByIdNotFound) Encode(e *jx.Encoder)
Encode encodes GetProductByIdNotFound as json.
func (*GetProductByIdNotFound) MarshalJSON ¶
func (s *GetProductByIdNotFound) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*GetProductByIdNotFound) UnmarshalJSON ¶
func (s *GetProductByIdNotFound) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type GetProductByIdParams ¶
GetProductByIdParams is parameters of getProductById operation.
type GetProductByIdRes ¶
type GetProductByIdRes interface {
// contains filtered or unexported methods
}
type GetProductByIdUnauthorized ¶
type GetProductByIdUnauthorized Problem
func (*GetProductByIdUnauthorized) Decode ¶
func (s *GetProductByIdUnauthorized) Decode(d *jx.Decoder) error
Decode decodes GetProductByIdUnauthorized from json.
func (*GetProductByIdUnauthorized) Encode ¶
func (s *GetProductByIdUnauthorized) Encode(e *jx.Encoder)
Encode encodes GetProductByIdUnauthorized as json.
func (*GetProductByIdUnauthorized) MarshalJSON ¶
func (s *GetProductByIdUnauthorized) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*GetProductByIdUnauthorized) UnmarshalJSON ¶
func (s *GetProductByIdUnauthorized) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type GetProductListBadRequest ¶
type GetProductListBadRequest Problem
func (*GetProductListBadRequest) Decode ¶
func (s *GetProductListBadRequest) Decode(d *jx.Decoder) error
Decode decodes GetProductListBadRequest from json.
func (*GetProductListBadRequest) Encode ¶
func (s *GetProductListBadRequest) Encode(e *jx.Encoder)
Encode encodes GetProductListBadRequest as json.
func (*GetProductListBadRequest) MarshalJSON ¶
func (s *GetProductListBadRequest) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*GetProductListBadRequest) UnmarshalJSON ¶
func (s *GetProductListBadRequest) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type GetProductListForbidden ¶
type GetProductListForbidden Problem
func (*GetProductListForbidden) Decode ¶
func (s *GetProductListForbidden) Decode(d *jx.Decoder) error
Decode decodes GetProductListForbidden from json.
func (*GetProductListForbidden) Encode ¶
func (s *GetProductListForbidden) Encode(e *jx.Encoder)
Encode encodes GetProductListForbidden as json.
func (*GetProductListForbidden) MarshalJSON ¶
func (s *GetProductListForbidden) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*GetProductListForbidden) UnmarshalJSON ¶
func (s *GetProductListForbidden) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type GetProductListInternalServerError ¶
type GetProductListInternalServerError Problem
func (*GetProductListInternalServerError) Decode ¶
func (s *GetProductListInternalServerError) Decode(d *jx.Decoder) error
Decode decodes GetProductListInternalServerError from json.
func (*GetProductListInternalServerError) Encode ¶
func (s *GetProductListInternalServerError) Encode(e *jx.Encoder)
Encode encodes GetProductListInternalServerError as json.
func (*GetProductListInternalServerError) MarshalJSON ¶
func (s *GetProductListInternalServerError) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*GetProductListInternalServerError) UnmarshalJSON ¶
func (s *GetProductListInternalServerError) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type GetProductListOrder ¶
type GetProductListOrder string
const ( GetProductListOrderAsc GetProductListOrder = "asc" GetProductListOrderDesc GetProductListOrder = "desc" )
func (GetProductListOrder) AllValues ¶
func (GetProductListOrder) AllValues() []GetProductListOrder
AllValues returns all GetProductListOrder values.
func (GetProductListOrder) MarshalText ¶
func (s GetProductListOrder) MarshalText() ([]byte, error)
MarshalText implements encoding.TextMarshaler.
func (*GetProductListOrder) UnmarshalText ¶
func (s *GetProductListOrder) UnmarshalText(data []byte) error
UnmarshalText implements encoding.TextUnmarshaler.
func (GetProductListOrder) Validate ¶
func (s GetProductListOrder) Validate() error
type GetProductListParams ¶
type GetProductListParams struct {
// Page number (1-based).
Page int
// Number of items per page (max 100).
Size int
// Filter by enabled status.
Enabled OptBool `json:",omitempty,omitzero"`
// Filter by category ID.
CategoryId OptUUID `json:",omitempty,omitzero"`
// Field to sort by.
Sort OptGetProductListSort `json:",omitempty,omitzero"`
// Sort order.
Order OptGetProductListOrder `json:",omitempty,omitzero"`
}
GetProductListParams is parameters of getProductList operation.
type GetProductListRes ¶
type GetProductListRes interface {
// contains filtered or unexported methods
}
type GetProductListSort ¶
type GetProductListSort string
const ( GetProductListSortName GetProductListSort = "name" GetProductListSortPrice GetProductListSort = "price" GetProductListSortQuantity GetProductListSort = "quantity" GetProductListSortCreatedAt GetProductListSort = "createdAt" GetProductListSortModifiedAt GetProductListSort = "modifiedAt" GetProductListSortCategoryId GetProductListSort = "categoryId" )
func (GetProductListSort) AllValues ¶
func (GetProductListSort) AllValues() []GetProductListSort
AllValues returns all GetProductListSort values.
func (GetProductListSort) MarshalText ¶
func (s GetProductListSort) MarshalText() ([]byte, error)
MarshalText implements encoding.TextMarshaler.
func (*GetProductListSort) UnmarshalText ¶
func (s *GetProductListSort) UnmarshalText(data []byte) error
UnmarshalText implements encoding.TextUnmarshaler.
func (GetProductListSort) Validate ¶
func (s GetProductListSort) Validate() error
type GetProductListUnauthorized ¶
type GetProductListUnauthorized Problem
func (*GetProductListUnauthorized) Decode ¶
func (s *GetProductListUnauthorized) Decode(d *jx.Decoder) error
Decode decodes GetProductListUnauthorized from json.
func (*GetProductListUnauthorized) Encode ¶
func (s *GetProductListUnauthorized) Encode(e *jx.Encoder)
Encode encodes GetProductListUnauthorized as json.
func (*GetProductListUnauthorized) MarshalJSON ¶
func (s *GetProductListUnauthorized) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*GetProductListUnauthorized) UnmarshalJSON ¶
func (s *GetProductListUnauthorized) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type Handler ¶
type Handler interface {
// CreateAttribute implements createAttribute operation.
//
// Create a new attribute.
//
// POST /v1/attribute/create
CreateAttribute(ctx context.Context, req *CreateAttributeRequest) (CreateAttributeRes, error)
// CreateCategory implements createCategory operation.
//
// Create a new category.
//
// POST /v1/category/create
CreateCategory(ctx context.Context, req *CreateCategoryRequest) (CreateCategoryRes, error)
// CreateProduct implements createProduct operation.
//
// Create a new product.
//
// POST /v1/product/create
CreateProduct(ctx context.Context, req *CreateProductRequest) (CreateProductRes, error)
// GetAttributeById implements getAttributeById operation.
//
// Get an attribute by ID.
//
// GET /v1/attribute/get/{id}
GetAttributeById(ctx context.Context, params GetAttributeByIdParams) (GetAttributeByIdRes, error)
// GetAttributeList implements getAttributeList operation.
//
// Get a paginated list of attributes.
//
// GET /v1/attribute/list
GetAttributeList(ctx context.Context, params GetAttributeListParams) (GetAttributeListRes, error)
// GetCategoryById implements getCategoryById operation.
//
// Get a category by ID.
//
// GET /v1/category/get/{id}
GetCategoryById(ctx context.Context, params GetCategoryByIdParams) (GetCategoryByIdRes, error)
// GetCategoryList implements getCategoryList operation.
//
// Get a paginated list of categories.
//
// GET /v1/category/list
GetCategoryList(ctx context.Context, params GetCategoryListParams) (GetCategoryListRes, error)
// GetProductById implements getProductById operation.
//
// Get a product by ID.
//
// GET /v1/product/get/{id}
GetProductById(ctx context.Context, params GetProductByIdParams) (GetProductByIdRes, error)
// GetProductList implements getProductList operation.
//
// Get a paginated list of products.
//
// GET /v1/product/list
GetProductList(ctx context.Context, params GetProductListParams) (GetProductListRes, error)
// UpdateAttribute implements updateAttribute operation.
//
// Update an existing attribute.
//
// PUT /v1/attribute/update
UpdateAttribute(ctx context.Context, req *UpdateAttributeRequest) (UpdateAttributeRes, error)
// UpdateCategory implements updateCategory operation.
//
// Update an existing category.
//
// PUT /v1/category/update
UpdateCategory(ctx context.Context, req *UpdateCategoryRequest) (UpdateCategoryRes, error)
// UpdateProduct implements updateProduct operation.
//
// Update an existing product.
//
// PUT /v1/product/update
UpdateProduct(ctx context.Context, req *UpdateProductRequest) (UpdateProductRes, error)
}
Handler handles operations described by OpenAPI v3 specification.
type Invoker ¶
type Invoker interface {
// CreateAttribute invokes createAttribute operation.
//
// Create a new attribute.
//
// POST /v1/attribute/create
CreateAttribute(ctx context.Context, request *CreateAttributeRequest) (CreateAttributeRes, error)
// CreateCategory invokes createCategory operation.
//
// Create a new category.
//
// POST /v1/category/create
CreateCategory(ctx context.Context, request *CreateCategoryRequest) (CreateCategoryRes, error)
// CreateProduct invokes createProduct operation.
//
// Create a new product.
//
// POST /v1/product/create
CreateProduct(ctx context.Context, request *CreateProductRequest) (CreateProductRes, error)
// GetAttributeById invokes getAttributeById operation.
//
// Get an attribute by ID.
//
// GET /v1/attribute/get/{id}
GetAttributeById(ctx context.Context, params GetAttributeByIdParams) (GetAttributeByIdRes, error)
// GetAttributeList invokes getAttributeList operation.
//
// Get a paginated list of attributes.
//
// GET /v1/attribute/list
GetAttributeList(ctx context.Context, params GetAttributeListParams) (GetAttributeListRes, error)
// GetCategoryById invokes getCategoryById operation.
//
// Get a category by ID.
//
// GET /v1/category/get/{id}
GetCategoryById(ctx context.Context, params GetCategoryByIdParams) (GetCategoryByIdRes, error)
// GetCategoryList invokes getCategoryList operation.
//
// Get a paginated list of categories.
//
// GET /v1/category/list
GetCategoryList(ctx context.Context, params GetCategoryListParams) (GetCategoryListRes, error)
// GetProductById invokes getProductById operation.
//
// Get a product by ID.
//
// GET /v1/product/get/{id}
GetProductById(ctx context.Context, params GetProductByIdParams) (GetProductByIdRes, error)
// GetProductList invokes getProductList operation.
//
// Get a paginated list of products.
//
// GET /v1/product/list
GetProductList(ctx context.Context, params GetProductListParams) (GetProductListRes, error)
// UpdateAttribute invokes updateAttribute operation.
//
// Update an existing attribute.
//
// PUT /v1/attribute/update
UpdateAttribute(ctx context.Context, request *UpdateAttributeRequest) (UpdateAttributeRes, error)
// UpdateCategory invokes updateCategory operation.
//
// Update an existing category.
//
// PUT /v1/category/update
UpdateCategory(ctx context.Context, request *UpdateCategoryRequest) (UpdateCategoryRes, error)
// UpdateProduct invokes updateProduct operation.
//
// Update an existing product.
//
// PUT /v1/product/update
UpdateProduct(ctx context.Context, request *UpdateProductRequest) (UpdateProductRes, error)
}
Invoker invokes operations described by OpenAPI v3 specification.
type Labeler ¶
type Labeler struct {
// contains filtered or unexported fields
}
Labeler is used to allow adding custom attributes to the server request metrics.
func LabelerFromContext ¶
LabelerFromContext retrieves the Labeler from the provided context, if present.
If no Labeler was found in the provided context a new, empty Labeler is returned and the second return value is false. In this case it is safe to use the Labeler but any attributes added to it will not be used.
func (*Labeler) AttributeSet ¶
AttributeSet returns the attributes added to the Labeler as an attribute.Set.
type OperationName ¶
type OperationName = string
OperationName is the ogen operation name
const ( CreateAttributeOperation OperationName = "CreateAttribute" CreateCategoryOperation OperationName = "CreateCategory" CreateProductOperation OperationName = "CreateProduct" GetAttributeByIdOperation OperationName = "GetAttributeById" GetAttributeListOperation OperationName = "GetAttributeList" GetCategoryByIdOperation OperationName = "GetCategoryById" GetCategoryListOperation OperationName = "GetCategoryList" GetProductByIdOperation OperationName = "GetProductById" GetProductListOperation OperationName = "GetProductList" UpdateAttributeOperation OperationName = "UpdateAttribute" UpdateCategoryOperation OperationName = "UpdateCategory" UpdateProductOperation OperationName = "UpdateProduct" )
type OptBool ¶
OptBool is optional bool.
func NewOptBool ¶
NewOptBool returns new OptBool with value set to v.
func (OptBool) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*OptBool) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type OptFloat64 ¶
OptFloat64 is optional float64.
func NewOptFloat64 ¶
func NewOptFloat64(v float64) OptFloat64
NewOptFloat64 returns new OptFloat64 with value set to v.
func (*OptFloat64) Decode ¶
func (o *OptFloat64) Decode(d *jx.Decoder) error
Decode decodes float64 from json.
func (OptFloat64) Encode ¶
func (o OptFloat64) Encode(e *jx.Encoder)
Encode encodes float64 as json.
func (OptFloat64) Get ¶
func (o OptFloat64) Get() (v float64, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptFloat64) IsSet ¶
func (o OptFloat64) IsSet() bool
IsSet returns true if OptFloat64 was set.
func (OptFloat64) MarshalJSON ¶
func (s OptFloat64) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (OptFloat64) Or ¶
func (o OptFloat64) Or(d float64) float64
Or returns value if set, or given parameter if does not.
func (*OptFloat64) UnmarshalJSON ¶
func (s *OptFloat64) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type OptGetAttributeListOrder ¶
type OptGetAttributeListOrder struct {
Value GetAttributeListOrder
Set bool
}
OptGetAttributeListOrder is optional GetAttributeListOrder.
func NewOptGetAttributeListOrder ¶
func NewOptGetAttributeListOrder(v GetAttributeListOrder) OptGetAttributeListOrder
NewOptGetAttributeListOrder returns new OptGetAttributeListOrder with value set to v.
func (OptGetAttributeListOrder) Get ¶
func (o OptGetAttributeListOrder) Get() (v GetAttributeListOrder, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptGetAttributeListOrder) IsSet ¶
func (o OptGetAttributeListOrder) IsSet() bool
IsSet returns true if OptGetAttributeListOrder was set.
func (OptGetAttributeListOrder) Or ¶
func (o OptGetAttributeListOrder) Or(d GetAttributeListOrder) GetAttributeListOrder
Or returns value if set, or given parameter if does not.
func (*OptGetAttributeListOrder) Reset ¶
func (o *OptGetAttributeListOrder) Reset()
Reset unsets value.
func (*OptGetAttributeListOrder) SetTo ¶
func (o *OptGetAttributeListOrder) SetTo(v GetAttributeListOrder)
SetTo sets value to v.
type OptGetAttributeListSort ¶
type OptGetAttributeListSort struct {
Value GetAttributeListSort
Set bool
}
OptGetAttributeListSort is optional GetAttributeListSort.
func NewOptGetAttributeListSort ¶
func NewOptGetAttributeListSort(v GetAttributeListSort) OptGetAttributeListSort
NewOptGetAttributeListSort returns new OptGetAttributeListSort with value set to v.
func (OptGetAttributeListSort) Get ¶
func (o OptGetAttributeListSort) Get() (v GetAttributeListSort, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptGetAttributeListSort) IsSet ¶
func (o OptGetAttributeListSort) IsSet() bool
IsSet returns true if OptGetAttributeListSort was set.
func (OptGetAttributeListSort) Or ¶
func (o OptGetAttributeListSort) Or(d GetAttributeListSort) GetAttributeListSort
Or returns value if set, or given parameter if does not.
func (*OptGetAttributeListSort) Reset ¶
func (o *OptGetAttributeListSort) Reset()
Reset unsets value.
func (*OptGetAttributeListSort) SetTo ¶
func (o *OptGetAttributeListSort) SetTo(v GetAttributeListSort)
SetTo sets value to v.
type OptGetAttributeListType ¶
type OptGetAttributeListType struct {
Value GetAttributeListType
Set bool
}
OptGetAttributeListType is optional GetAttributeListType.
func NewOptGetAttributeListType ¶
func NewOptGetAttributeListType(v GetAttributeListType) OptGetAttributeListType
NewOptGetAttributeListType returns new OptGetAttributeListType with value set to v.
func (OptGetAttributeListType) Get ¶
func (o OptGetAttributeListType) Get() (v GetAttributeListType, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptGetAttributeListType) IsSet ¶
func (o OptGetAttributeListType) IsSet() bool
IsSet returns true if OptGetAttributeListType was set.
func (OptGetAttributeListType) Or ¶
func (o OptGetAttributeListType) Or(d GetAttributeListType) GetAttributeListType
Or returns value if set, or given parameter if does not.
func (*OptGetAttributeListType) Reset ¶
func (o *OptGetAttributeListType) Reset()
Reset unsets value.
func (*OptGetAttributeListType) SetTo ¶
func (o *OptGetAttributeListType) SetTo(v GetAttributeListType)
SetTo sets value to v.
type OptGetCategoryListOrder ¶
type OptGetCategoryListOrder struct {
Value GetCategoryListOrder
Set bool
}
OptGetCategoryListOrder is optional GetCategoryListOrder.
func NewOptGetCategoryListOrder ¶
func NewOptGetCategoryListOrder(v GetCategoryListOrder) OptGetCategoryListOrder
NewOptGetCategoryListOrder returns new OptGetCategoryListOrder with value set to v.
func (OptGetCategoryListOrder) Get ¶
func (o OptGetCategoryListOrder) Get() (v GetCategoryListOrder, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptGetCategoryListOrder) IsSet ¶
func (o OptGetCategoryListOrder) IsSet() bool
IsSet returns true if OptGetCategoryListOrder was set.
func (OptGetCategoryListOrder) Or ¶
func (o OptGetCategoryListOrder) Or(d GetCategoryListOrder) GetCategoryListOrder
Or returns value if set, or given parameter if does not.
func (*OptGetCategoryListOrder) Reset ¶
func (o *OptGetCategoryListOrder) Reset()
Reset unsets value.
func (*OptGetCategoryListOrder) SetTo ¶
func (o *OptGetCategoryListOrder) SetTo(v GetCategoryListOrder)
SetTo sets value to v.
type OptGetCategoryListSort ¶
type OptGetCategoryListSort struct {
Value GetCategoryListSort
Set bool
}
OptGetCategoryListSort is optional GetCategoryListSort.
func NewOptGetCategoryListSort ¶
func NewOptGetCategoryListSort(v GetCategoryListSort) OptGetCategoryListSort
NewOptGetCategoryListSort returns new OptGetCategoryListSort with value set to v.
func (OptGetCategoryListSort) Get ¶
func (o OptGetCategoryListSort) Get() (v GetCategoryListSort, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptGetCategoryListSort) IsSet ¶
func (o OptGetCategoryListSort) IsSet() bool
IsSet returns true if OptGetCategoryListSort was set.
func (OptGetCategoryListSort) Or ¶
func (o OptGetCategoryListSort) Or(d GetCategoryListSort) GetCategoryListSort
Or returns value if set, or given parameter if does not.
func (*OptGetCategoryListSort) SetTo ¶
func (o *OptGetCategoryListSort) SetTo(v GetCategoryListSort)
SetTo sets value to v.
type OptGetProductListOrder ¶
type OptGetProductListOrder struct {
Value GetProductListOrder
Set bool
}
OptGetProductListOrder is optional GetProductListOrder.
func NewOptGetProductListOrder ¶
func NewOptGetProductListOrder(v GetProductListOrder) OptGetProductListOrder
NewOptGetProductListOrder returns new OptGetProductListOrder with value set to v.
func (OptGetProductListOrder) Get ¶
func (o OptGetProductListOrder) Get() (v GetProductListOrder, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptGetProductListOrder) IsSet ¶
func (o OptGetProductListOrder) IsSet() bool
IsSet returns true if OptGetProductListOrder was set.
func (OptGetProductListOrder) Or ¶
func (o OptGetProductListOrder) Or(d GetProductListOrder) GetProductListOrder
Or returns value if set, or given parameter if does not.
func (*OptGetProductListOrder) SetTo ¶
func (o *OptGetProductListOrder) SetTo(v GetProductListOrder)
SetTo sets value to v.
type OptGetProductListSort ¶
type OptGetProductListSort struct {
Value GetProductListSort
Set bool
}
OptGetProductListSort is optional GetProductListSort.
func NewOptGetProductListSort ¶
func NewOptGetProductListSort(v GetProductListSort) OptGetProductListSort
NewOptGetProductListSort returns new OptGetProductListSort with value set to v.
func (OptGetProductListSort) Get ¶
func (o OptGetProductListSort) Get() (v GetProductListSort, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptGetProductListSort) IsSet ¶
func (o OptGetProductListSort) IsSet() bool
IsSet returns true if OptGetProductListSort was set.
func (OptGetProductListSort) Or ¶
func (o OptGetProductListSort) Or(d GetProductListSort) GetProductListSort
Or returns value if set, or given parameter if does not.
func (*OptGetProductListSort) SetTo ¶
func (o *OptGetProductListSort) SetTo(v GetProductListSort)
SetTo sets value to v.
type OptInt ¶
OptInt is optional int.
func (OptInt) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*OptInt) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type OptString ¶
OptString is optional string.
func NewOptString ¶
NewOptString returns new OptString with value set to v.
func (OptString) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*OptString) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type OptURI ¶
OptURI is optional url.URL.
func (OptURI) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*OptURI) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type OptUUID ¶
OptUUID is optional uuid.UUID.
func NewOptUUID ¶
NewOptUUID returns new OptUUID with value set to v.
func (OptUUID) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*OptUUID) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type Option ¶
type Option interface {
ServerOption
ClientOption
}
Option is config option.
func WithAttributes ¶
WithAttributes specifies default otel attributes.
func WithMeterProvider ¶
func WithMeterProvider(provider metric.MeterProvider) Option
WithMeterProvider specifies a meter provider to use for creating a meter.
If none is specified, the otel.GetMeterProvider() is used.
func WithTracerProvider ¶
func WithTracerProvider(provider trace.TracerProvider) Option
WithTracerProvider specifies a tracer provider to use for creating a tracer.
If none is specified, the global provider is used.
type Problem ¶
type Problem struct {
Type url.URL `json:"type"`
Title string `json:"title"`
Status int `json:"status"`
Detail OptString `json:"detail"`
Instance OptURI `json:"instance"`
TraceId OptString `json:"traceId"`
Errors []ProblemErrorsItem `json:"errors"`
}
RFC7807 Problem Details. Ref: #/components/schemas/Problem
func (*Problem) GetErrors ¶
func (s *Problem) GetErrors() []ProblemErrorsItem
GetErrors returns the value of Errors.
func (*Problem) GetInstance ¶
GetInstance returns the value of Instance.
func (*Problem) GetTraceId ¶
GetTraceId returns the value of TraceId.
func (*Problem) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*Problem) SetErrors ¶
func (s *Problem) SetErrors(val []ProblemErrorsItem)
SetErrors sets the value of Errors.
func (*Problem) SetInstance ¶
SetInstance sets the value of Instance.
func (*Problem) SetTraceId ¶
SetTraceId sets the value of TraceId.
func (*Problem) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type ProblemErrorsItem ¶
func (*ProblemErrorsItem) Decode ¶
func (s *ProblemErrorsItem) Decode(d *jx.Decoder) error
Decode decodes ProblemErrorsItem from json.
func (*ProblemErrorsItem) Encode ¶
func (s *ProblemErrorsItem) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*ProblemErrorsItem) GetField ¶
func (s *ProblemErrorsItem) GetField() OptString
GetField returns the value of Field.
func (*ProblemErrorsItem) GetMessage ¶
func (s *ProblemErrorsItem) GetMessage() OptString
GetMessage returns the value of Message.
func (*ProblemErrorsItem) MarshalJSON ¶
func (s *ProblemErrorsItem) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*ProblemErrorsItem) SetField ¶
func (s *ProblemErrorsItem) SetField(val OptString)
SetField sets the value of Field.
func (*ProblemErrorsItem) SetMessage ¶
func (s *ProblemErrorsItem) SetMessage(val OptString)
SetMessage sets the value of Message.
func (*ProblemErrorsItem) UnmarshalJSON ¶
func (s *ProblemErrorsItem) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type ProductListResponse ¶
type ProductListResponse struct {
Items []ProductResponse `json:"items"`
// Current page number.
Page int `json:"page"`
// Number of items per page.
Size int `json:"size"`
// Total number of items.
Total int `json:"total"`
}
Ref: #/components/schemas/ProductListResponse
func (*ProductListResponse) Decode ¶
func (s *ProductListResponse) Decode(d *jx.Decoder) error
Decode decodes ProductListResponse from json.
func (*ProductListResponse) Encode ¶
func (s *ProductListResponse) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*ProductListResponse) GetItems ¶
func (s *ProductListResponse) GetItems() []ProductResponse
GetItems returns the value of Items.
func (*ProductListResponse) GetPage ¶
func (s *ProductListResponse) GetPage() int
GetPage returns the value of Page.
func (*ProductListResponse) GetSize ¶
func (s *ProductListResponse) GetSize() int
GetSize returns the value of Size.
func (*ProductListResponse) GetTotal ¶
func (s *ProductListResponse) GetTotal() int
GetTotal returns the value of Total.
func (*ProductListResponse) MarshalJSON ¶
func (s *ProductListResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*ProductListResponse) SetItems ¶
func (s *ProductListResponse) SetItems(val []ProductResponse)
SetItems sets the value of Items.
func (*ProductListResponse) SetPage ¶
func (s *ProductListResponse) SetPage(val int)
SetPage sets the value of Page.
func (*ProductListResponse) SetSize ¶
func (s *ProductListResponse) SetSize(val int)
SetSize sets the value of Size.
func (*ProductListResponse) SetTotal ¶
func (s *ProductListResponse) SetTotal(val int)
SetTotal sets the value of Total.
func (*ProductListResponse) UnmarshalJSON ¶
func (s *ProductListResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*ProductListResponse) Validate ¶
func (s *ProductListResponse) Validate() error
type ProductResponse ¶
type ProductResponse struct {
ID string `json:"id"`
Version int `json:"version"`
Name string `json:"name"`
Description OptString `json:"description"`
Price float64 `json:"price"`
Quantity int `json:"quantity"`
ImageId OptString `json:"imageId"`
CategoryId OptString `json:"categoryId"`
Enabled bool `json:"enabled"`
CreatedAt time.Time `json:"createdAt"`
ModifiedAt time.Time `json:"modifiedAt"`
// List of attribute values for this product.
Attributes []AttributeValue `json:"attributes"`
}
Ref: #/components/schemas/ProductResponse
func (*ProductResponse) Decode ¶
func (s *ProductResponse) Decode(d *jx.Decoder) error
Decode decodes ProductResponse from json.
func (*ProductResponse) Encode ¶
func (s *ProductResponse) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*ProductResponse) GetAttributes ¶
func (s *ProductResponse) GetAttributes() []AttributeValue
GetAttributes returns the value of Attributes.
func (*ProductResponse) GetCategoryId ¶
func (s *ProductResponse) GetCategoryId() OptString
GetCategoryId returns the value of CategoryId.
func (*ProductResponse) GetCreatedAt ¶
func (s *ProductResponse) GetCreatedAt() time.Time
GetCreatedAt returns the value of CreatedAt.
func (*ProductResponse) GetDescription ¶
func (s *ProductResponse) GetDescription() OptString
GetDescription returns the value of Description.
func (*ProductResponse) GetEnabled ¶
func (s *ProductResponse) GetEnabled() bool
GetEnabled returns the value of Enabled.
func (*ProductResponse) GetID ¶
func (s *ProductResponse) GetID() string
GetID returns the value of ID.
func (*ProductResponse) GetImageId ¶
func (s *ProductResponse) GetImageId() OptString
GetImageId returns the value of ImageId.
func (*ProductResponse) GetModifiedAt ¶
func (s *ProductResponse) GetModifiedAt() time.Time
GetModifiedAt returns the value of ModifiedAt.
func (*ProductResponse) GetName ¶
func (s *ProductResponse) GetName() string
GetName returns the value of Name.
func (*ProductResponse) GetPrice ¶
func (s *ProductResponse) GetPrice() float64
GetPrice returns the value of Price.
func (*ProductResponse) GetQuantity ¶
func (s *ProductResponse) GetQuantity() int
GetQuantity returns the value of Quantity.
func (*ProductResponse) GetVersion ¶
func (s *ProductResponse) GetVersion() int
GetVersion returns the value of Version.
func (*ProductResponse) MarshalJSON ¶
func (s *ProductResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*ProductResponse) SetAttributes ¶
func (s *ProductResponse) SetAttributes(val []AttributeValue)
SetAttributes sets the value of Attributes.
func (*ProductResponse) SetCategoryId ¶
func (s *ProductResponse) SetCategoryId(val OptString)
SetCategoryId sets the value of CategoryId.
func (*ProductResponse) SetCreatedAt ¶
func (s *ProductResponse) SetCreatedAt(val time.Time)
SetCreatedAt sets the value of CreatedAt.
func (*ProductResponse) SetDescription ¶
func (s *ProductResponse) SetDescription(val OptString)
SetDescription sets the value of Description.
func (*ProductResponse) SetEnabled ¶
func (s *ProductResponse) SetEnabled(val bool)
SetEnabled sets the value of Enabled.
func (*ProductResponse) SetID ¶
func (s *ProductResponse) SetID(val string)
SetID sets the value of ID.
func (*ProductResponse) SetImageId ¶
func (s *ProductResponse) SetImageId(val OptString)
SetImageId sets the value of ImageId.
func (*ProductResponse) SetModifiedAt ¶
func (s *ProductResponse) SetModifiedAt(val time.Time)
SetModifiedAt sets the value of ModifiedAt.
func (*ProductResponse) SetName ¶
func (s *ProductResponse) SetName(val string)
SetName sets the value of Name.
func (*ProductResponse) SetPrice ¶
func (s *ProductResponse) SetPrice(val float64)
SetPrice sets the value of Price.
func (*ProductResponse) SetQuantity ¶
func (s *ProductResponse) SetQuantity(val int)
SetQuantity sets the value of Quantity.
func (*ProductResponse) SetVersion ¶
func (s *ProductResponse) SetVersion(val int)
SetVersion sets the value of Version.
func (*ProductResponse) UnmarshalJSON ¶
func (s *ProductResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*ProductResponse) Validate ¶
func (s *ProductResponse) Validate() error
type Route ¶
type Route struct {
// contains filtered or unexported fields
}
Route is route object.
func (Route) OperationGroup ¶
OperationGroup returns the x-ogen-operation-group value.
func (Route) OperationID ¶
OperationID returns OpenAPI operationId.
type SecurityHandler ¶
type SecurityHandler interface {
// HandleBearerAuth handles BearerAuth security.
// PASETO token in Authorization header.
HandleBearerAuth(ctx context.Context, operationName OperationName, t BearerAuth) (context.Context, error)
}
SecurityHandler is handler for security parameters.
type SecuritySource ¶
type SecuritySource interface {
// BearerAuth provides BearerAuth security value.
// PASETO token in Authorization header.
BearerAuth(ctx context.Context, operationName OperationName) (BearerAuth, error)
}
SecuritySource is provider of security values (tokens, passwords, etc.).
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server implements http server based on OpenAPI v3 specification and calls Handler to handle requests.
func NewServer ¶
func NewServer(h Handler, sec SecurityHandler, opts ...ServerOption) (*Server, error)
NewServer creates new Server.
func ProvideServer ¶ added in v1.0.10
func ProvideServer( handler Handler, securityHandler SecurityHandler, tracerProvider trace.TracerProvider, meterProvider metric.MeterProvider, middlewares []middleware.Middleware, errorHandler ogenerrors.ErrorHandler, ) (*Server, error)
ProvideServer creates an ogen server with security handler for fx DI.
type ServerOption ¶
type ServerOption interface {
// contains filtered or unexported methods
}
ServerOption is server config option.
func WithErrorHandler ¶
func WithErrorHandler(h ErrorHandler) ServerOption
WithErrorHandler specifies error handler to use.
func WithMaxMultipartMemory ¶
func WithMaxMultipartMemory(max int64) ServerOption
WithMaxMultipartMemory specifies limit of memory for storing file parts. File parts which can't be stored in memory will be stored on disk in temporary files.
func WithMethodNotAllowed ¶
func WithMethodNotAllowed(methodNotAllowed func(w http.ResponseWriter, r *http.Request, allowed string)) ServerOption
WithMethodNotAllowed specifies Method Not Allowed handler to use.
func WithMiddleware ¶
func WithMiddleware(m ...Middleware) ServerOption
WithMiddleware specifies middlewares to use.
func WithNotFound ¶
func WithNotFound(notFound http.HandlerFunc) ServerOption
WithNotFound specifies Not Found handler to use.
func WithPathPrefix ¶
func WithPathPrefix(prefix string) ServerOption
WithPathPrefix specifies server path prefix.
type TokenSecuritySource ¶ added in v1.0.10
type TokenSecuritySource struct {
// contains filtered or unexported fields
}
TokenSecuritySource implements SecuritySource for service-to-service authentication.
func NewTokenSecuritySource ¶ added in v1.0.10
func NewTokenSecuritySource(token string) *TokenSecuritySource
NewTokenSecuritySource creates a SecuritySource that uses a static token.
func (*TokenSecuritySource) BearerAuth ¶ added in v1.0.10
func (s *TokenSecuritySource) BearerAuth(_ context.Context, _ OperationName) (BearerAuth, error)
BearerAuth returns the bearer token for authentication.
type UnimplementedHandler ¶
type UnimplementedHandler struct{}
UnimplementedHandler is no-op Handler which returns http.ErrNotImplemented.
func (UnimplementedHandler) CreateAttribute ¶
func (UnimplementedHandler) CreateAttribute(ctx context.Context, req *CreateAttributeRequest) (r CreateAttributeRes, _ error)
CreateAttribute implements createAttribute operation.
Create a new attribute.
POST /v1/attribute/create
func (UnimplementedHandler) CreateCategory ¶
func (UnimplementedHandler) CreateCategory(ctx context.Context, req *CreateCategoryRequest) (r CreateCategoryRes, _ error)
CreateCategory implements createCategory operation.
Create a new category.
POST /v1/category/create
func (UnimplementedHandler) CreateProduct ¶
func (UnimplementedHandler) CreateProduct(ctx context.Context, req *CreateProductRequest) (r CreateProductRes, _ error)
CreateProduct implements createProduct operation.
Create a new product.
POST /v1/product/create
func (UnimplementedHandler) GetAttributeById ¶
func (UnimplementedHandler) GetAttributeById(ctx context.Context, params GetAttributeByIdParams) (r GetAttributeByIdRes, _ error)
GetAttributeById implements getAttributeById operation.
Get an attribute by ID.
GET /v1/attribute/get/{id}
func (UnimplementedHandler) GetAttributeList ¶
func (UnimplementedHandler) GetAttributeList(ctx context.Context, params GetAttributeListParams) (r GetAttributeListRes, _ error)
GetAttributeList implements getAttributeList operation.
Get a paginated list of attributes.
GET /v1/attribute/list
func (UnimplementedHandler) GetCategoryById ¶
func (UnimplementedHandler) GetCategoryById(ctx context.Context, params GetCategoryByIdParams) (r GetCategoryByIdRes, _ error)
GetCategoryById implements getCategoryById operation.
Get a category by ID.
GET /v1/category/get/{id}
func (UnimplementedHandler) GetCategoryList ¶
func (UnimplementedHandler) GetCategoryList(ctx context.Context, params GetCategoryListParams) (r GetCategoryListRes, _ error)
GetCategoryList implements getCategoryList operation.
Get a paginated list of categories.
GET /v1/category/list
func (UnimplementedHandler) GetProductById ¶
func (UnimplementedHandler) GetProductById(ctx context.Context, params GetProductByIdParams) (r GetProductByIdRes, _ error)
GetProductById implements getProductById operation.
Get a product by ID.
GET /v1/product/get/{id}
func (UnimplementedHandler) GetProductList ¶
func (UnimplementedHandler) GetProductList(ctx context.Context, params GetProductListParams) (r GetProductListRes, _ error)
GetProductList implements getProductList operation.
Get a paginated list of products.
GET /v1/product/list
func (UnimplementedHandler) UpdateAttribute ¶
func (UnimplementedHandler) UpdateAttribute(ctx context.Context, req *UpdateAttributeRequest) (r UpdateAttributeRes, _ error)
UpdateAttribute implements updateAttribute operation.
Update an existing attribute.
PUT /v1/attribute/update
func (UnimplementedHandler) UpdateCategory ¶
func (UnimplementedHandler) UpdateCategory(ctx context.Context, req *UpdateCategoryRequest) (r UpdateCategoryRes, _ error)
UpdateCategory implements updateCategory operation.
Update an existing category.
PUT /v1/category/update
func (UnimplementedHandler) UpdateProduct ¶
func (UnimplementedHandler) UpdateProduct(ctx context.Context, req *UpdateProductRequest) (r UpdateProductRes, _ error)
UpdateProduct implements updateProduct operation.
Update an existing product.
PUT /v1/product/update
type UpdateAttributeBadRequest ¶
type UpdateAttributeBadRequest Problem
func (*UpdateAttributeBadRequest) Decode ¶
func (s *UpdateAttributeBadRequest) Decode(d *jx.Decoder) error
Decode decodes UpdateAttributeBadRequest from json.
func (*UpdateAttributeBadRequest) Encode ¶
func (s *UpdateAttributeBadRequest) Encode(e *jx.Encoder)
Encode encodes UpdateAttributeBadRequest as json.
func (*UpdateAttributeBadRequest) MarshalJSON ¶
func (s *UpdateAttributeBadRequest) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*UpdateAttributeBadRequest) UnmarshalJSON ¶
func (s *UpdateAttributeBadRequest) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type UpdateAttributeConflict ¶
type UpdateAttributeConflict Problem
func (*UpdateAttributeConflict) Decode ¶
func (s *UpdateAttributeConflict) Decode(d *jx.Decoder) error
Decode decodes UpdateAttributeConflict from json.
func (*UpdateAttributeConflict) Encode ¶
func (s *UpdateAttributeConflict) Encode(e *jx.Encoder)
Encode encodes UpdateAttributeConflict as json.
func (*UpdateAttributeConflict) MarshalJSON ¶
func (s *UpdateAttributeConflict) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*UpdateAttributeConflict) UnmarshalJSON ¶
func (s *UpdateAttributeConflict) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type UpdateAttributeInternalServerError ¶
type UpdateAttributeInternalServerError Problem
func (*UpdateAttributeInternalServerError) Decode ¶
func (s *UpdateAttributeInternalServerError) Decode(d *jx.Decoder) error
Decode decodes UpdateAttributeInternalServerError from json.
func (*UpdateAttributeInternalServerError) Encode ¶
func (s *UpdateAttributeInternalServerError) Encode(e *jx.Encoder)
Encode encodes UpdateAttributeInternalServerError as json.
func (*UpdateAttributeInternalServerError) MarshalJSON ¶
func (s *UpdateAttributeInternalServerError) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*UpdateAttributeInternalServerError) UnmarshalJSON ¶
func (s *UpdateAttributeInternalServerError) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type UpdateAttributeNotFound ¶
type UpdateAttributeNotFound Problem
func (*UpdateAttributeNotFound) Decode ¶
func (s *UpdateAttributeNotFound) Decode(d *jx.Decoder) error
Decode decodes UpdateAttributeNotFound from json.
func (*UpdateAttributeNotFound) Encode ¶
func (s *UpdateAttributeNotFound) Encode(e *jx.Encoder)
Encode encodes UpdateAttributeNotFound as json.
func (*UpdateAttributeNotFound) MarshalJSON ¶
func (s *UpdateAttributeNotFound) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*UpdateAttributeNotFound) UnmarshalJSON ¶
func (s *UpdateAttributeNotFound) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type UpdateAttributePreconditionFailed ¶
type UpdateAttributePreconditionFailed Problem
func (*UpdateAttributePreconditionFailed) Decode ¶
func (s *UpdateAttributePreconditionFailed) Decode(d *jx.Decoder) error
Decode decodes UpdateAttributePreconditionFailed from json.
func (*UpdateAttributePreconditionFailed) Encode ¶
func (s *UpdateAttributePreconditionFailed) Encode(e *jx.Encoder)
Encode encodes UpdateAttributePreconditionFailed as json.
func (*UpdateAttributePreconditionFailed) MarshalJSON ¶
func (s *UpdateAttributePreconditionFailed) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*UpdateAttributePreconditionFailed) UnmarshalJSON ¶
func (s *UpdateAttributePreconditionFailed) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type UpdateAttributeRequest ¶
type UpdateAttributeRequest struct {
ID uuid.UUID `json:"id"`
Name string `json:"name"`
Unit OptString `json:"unit"`
Enabled bool `json:"enabled"`
// Optimistic locking version.
Version int `json:"version"`
// Options for single/multiple types.
// - To add option: include new option with slug
// - To update option: include existing option with same slug
// - To remove option: omit option from array (only if not used by products).
Options []AttributeOptionInput `json:"options"`
}
Ref: #/components/schemas/UpdateAttributeRequest
func (*UpdateAttributeRequest) Decode ¶
func (s *UpdateAttributeRequest) Decode(d *jx.Decoder) error
Decode decodes UpdateAttributeRequest from json.
func (*UpdateAttributeRequest) Encode ¶
func (s *UpdateAttributeRequest) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*UpdateAttributeRequest) GetEnabled ¶
func (s *UpdateAttributeRequest) GetEnabled() bool
GetEnabled returns the value of Enabled.
func (*UpdateAttributeRequest) GetID ¶
func (s *UpdateAttributeRequest) GetID() uuid.UUID
GetID returns the value of ID.
func (*UpdateAttributeRequest) GetName ¶
func (s *UpdateAttributeRequest) GetName() string
GetName returns the value of Name.
func (*UpdateAttributeRequest) GetOptions ¶
func (s *UpdateAttributeRequest) GetOptions() []AttributeOptionInput
GetOptions returns the value of Options.
func (*UpdateAttributeRequest) GetUnit ¶
func (s *UpdateAttributeRequest) GetUnit() OptString
GetUnit returns the value of Unit.
func (*UpdateAttributeRequest) GetVersion ¶
func (s *UpdateAttributeRequest) GetVersion() int
GetVersion returns the value of Version.
func (*UpdateAttributeRequest) MarshalJSON ¶
func (s *UpdateAttributeRequest) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*UpdateAttributeRequest) SetEnabled ¶
func (s *UpdateAttributeRequest) SetEnabled(val bool)
SetEnabled sets the value of Enabled.
func (*UpdateAttributeRequest) SetID ¶
func (s *UpdateAttributeRequest) SetID(val uuid.UUID)
SetID sets the value of ID.
func (*UpdateAttributeRequest) SetName ¶
func (s *UpdateAttributeRequest) SetName(val string)
SetName sets the value of Name.
func (*UpdateAttributeRequest) SetOptions ¶
func (s *UpdateAttributeRequest) SetOptions(val []AttributeOptionInput)
SetOptions sets the value of Options.
func (*UpdateAttributeRequest) SetUnit ¶
func (s *UpdateAttributeRequest) SetUnit(val OptString)
SetUnit sets the value of Unit.
func (*UpdateAttributeRequest) SetVersion ¶
func (s *UpdateAttributeRequest) SetVersion(val int)
SetVersion sets the value of Version.
func (*UpdateAttributeRequest) UnmarshalJSON ¶
func (s *UpdateAttributeRequest) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*UpdateAttributeRequest) Validate ¶
func (s *UpdateAttributeRequest) Validate() error
type UpdateAttributeRes ¶
type UpdateAttributeRes interface {
// contains filtered or unexported methods
}
type UpdateCategoryBadRequest ¶
type UpdateCategoryBadRequest Problem
func (*UpdateCategoryBadRequest) Decode ¶
func (s *UpdateCategoryBadRequest) Decode(d *jx.Decoder) error
Decode decodes UpdateCategoryBadRequest from json.
func (*UpdateCategoryBadRequest) Encode ¶
func (s *UpdateCategoryBadRequest) Encode(e *jx.Encoder)
Encode encodes UpdateCategoryBadRequest as json.
func (*UpdateCategoryBadRequest) MarshalJSON ¶
func (s *UpdateCategoryBadRequest) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*UpdateCategoryBadRequest) UnmarshalJSON ¶
func (s *UpdateCategoryBadRequest) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type UpdateCategoryInternalServerError ¶
type UpdateCategoryInternalServerError Problem
func (*UpdateCategoryInternalServerError) Decode ¶
func (s *UpdateCategoryInternalServerError) Decode(d *jx.Decoder) error
Decode decodes UpdateCategoryInternalServerError from json.
func (*UpdateCategoryInternalServerError) Encode ¶
func (s *UpdateCategoryInternalServerError) Encode(e *jx.Encoder)
Encode encodes UpdateCategoryInternalServerError as json.
func (*UpdateCategoryInternalServerError) MarshalJSON ¶
func (s *UpdateCategoryInternalServerError) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*UpdateCategoryInternalServerError) UnmarshalJSON ¶
func (s *UpdateCategoryInternalServerError) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type UpdateCategoryNotFound ¶
type UpdateCategoryNotFound Problem
func (*UpdateCategoryNotFound) Decode ¶
func (s *UpdateCategoryNotFound) Decode(d *jx.Decoder) error
Decode decodes UpdateCategoryNotFound from json.
func (*UpdateCategoryNotFound) Encode ¶
func (s *UpdateCategoryNotFound) Encode(e *jx.Encoder)
Encode encodes UpdateCategoryNotFound as json.
func (*UpdateCategoryNotFound) MarshalJSON ¶
func (s *UpdateCategoryNotFound) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*UpdateCategoryNotFound) UnmarshalJSON ¶
func (s *UpdateCategoryNotFound) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type UpdateCategoryPreconditionFailed ¶
type UpdateCategoryPreconditionFailed Problem
func (*UpdateCategoryPreconditionFailed) Decode ¶
func (s *UpdateCategoryPreconditionFailed) Decode(d *jx.Decoder) error
Decode decodes UpdateCategoryPreconditionFailed from json.
func (*UpdateCategoryPreconditionFailed) Encode ¶
func (s *UpdateCategoryPreconditionFailed) Encode(e *jx.Encoder)
Encode encodes UpdateCategoryPreconditionFailed as json.
func (*UpdateCategoryPreconditionFailed) MarshalJSON ¶
func (s *UpdateCategoryPreconditionFailed) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*UpdateCategoryPreconditionFailed) UnmarshalJSON ¶
func (s *UpdateCategoryPreconditionFailed) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type UpdateCategoryRequest ¶
type UpdateCategoryRequest struct {
ID uuid.UUID `json:"id"`
Name string `json:"name"`
Enabled bool `json:"enabled"`
// Optimistic locking version.
Version int `json:"version"`
// List of attributes assigned to this category.
Attributes []CategoryAttributeInput `json:"attributes"`
}
Ref: #/components/schemas/UpdateCategoryRequest
func (*UpdateCategoryRequest) Decode ¶
func (s *UpdateCategoryRequest) Decode(d *jx.Decoder) error
Decode decodes UpdateCategoryRequest from json.
func (*UpdateCategoryRequest) Encode ¶
func (s *UpdateCategoryRequest) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*UpdateCategoryRequest) GetAttributes ¶
func (s *UpdateCategoryRequest) GetAttributes() []CategoryAttributeInput
GetAttributes returns the value of Attributes.
func (*UpdateCategoryRequest) GetEnabled ¶
func (s *UpdateCategoryRequest) GetEnabled() bool
GetEnabled returns the value of Enabled.
func (*UpdateCategoryRequest) GetID ¶
func (s *UpdateCategoryRequest) GetID() uuid.UUID
GetID returns the value of ID.
func (*UpdateCategoryRequest) GetName ¶
func (s *UpdateCategoryRequest) GetName() string
GetName returns the value of Name.
func (*UpdateCategoryRequest) GetVersion ¶
func (s *UpdateCategoryRequest) GetVersion() int
GetVersion returns the value of Version.
func (*UpdateCategoryRequest) MarshalJSON ¶
func (s *UpdateCategoryRequest) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*UpdateCategoryRequest) SetAttributes ¶
func (s *UpdateCategoryRequest) SetAttributes(val []CategoryAttributeInput)
SetAttributes sets the value of Attributes.
func (*UpdateCategoryRequest) SetEnabled ¶
func (s *UpdateCategoryRequest) SetEnabled(val bool)
SetEnabled sets the value of Enabled.
func (*UpdateCategoryRequest) SetID ¶
func (s *UpdateCategoryRequest) SetID(val uuid.UUID)
SetID sets the value of ID.
func (*UpdateCategoryRequest) SetName ¶
func (s *UpdateCategoryRequest) SetName(val string)
SetName sets the value of Name.
func (*UpdateCategoryRequest) SetVersion ¶
func (s *UpdateCategoryRequest) SetVersion(val int)
SetVersion sets the value of Version.
func (*UpdateCategoryRequest) UnmarshalJSON ¶
func (s *UpdateCategoryRequest) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*UpdateCategoryRequest) Validate ¶
func (s *UpdateCategoryRequest) Validate() error
type UpdateCategoryRes ¶
type UpdateCategoryRes interface {
// contains filtered or unexported methods
}
type UpdateProductBadRequest ¶
type UpdateProductBadRequest Problem
func (*UpdateProductBadRequest) Decode ¶
func (s *UpdateProductBadRequest) Decode(d *jx.Decoder) error
Decode decodes UpdateProductBadRequest from json.
func (*UpdateProductBadRequest) Encode ¶
func (s *UpdateProductBadRequest) Encode(e *jx.Encoder)
Encode encodes UpdateProductBadRequest as json.
func (*UpdateProductBadRequest) MarshalJSON ¶
func (s *UpdateProductBadRequest) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*UpdateProductBadRequest) UnmarshalJSON ¶
func (s *UpdateProductBadRequest) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type UpdateProductForbidden ¶
type UpdateProductForbidden Problem
func (*UpdateProductForbidden) Decode ¶
func (s *UpdateProductForbidden) Decode(d *jx.Decoder) error
Decode decodes UpdateProductForbidden from json.
func (*UpdateProductForbidden) Encode ¶
func (s *UpdateProductForbidden) Encode(e *jx.Encoder)
Encode encodes UpdateProductForbidden as json.
func (*UpdateProductForbidden) MarshalJSON ¶
func (s *UpdateProductForbidden) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*UpdateProductForbidden) UnmarshalJSON ¶
func (s *UpdateProductForbidden) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type UpdateProductInternalServerError ¶
type UpdateProductInternalServerError Problem
func (*UpdateProductInternalServerError) Decode ¶
func (s *UpdateProductInternalServerError) Decode(d *jx.Decoder) error
Decode decodes UpdateProductInternalServerError from json.
func (*UpdateProductInternalServerError) Encode ¶
func (s *UpdateProductInternalServerError) Encode(e *jx.Encoder)
Encode encodes UpdateProductInternalServerError as json.
func (*UpdateProductInternalServerError) MarshalJSON ¶
func (s *UpdateProductInternalServerError) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*UpdateProductInternalServerError) UnmarshalJSON ¶
func (s *UpdateProductInternalServerError) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type UpdateProductNotFound ¶
type UpdateProductNotFound Problem
func (*UpdateProductNotFound) Decode ¶
func (s *UpdateProductNotFound) Decode(d *jx.Decoder) error
Decode decodes UpdateProductNotFound from json.
func (*UpdateProductNotFound) Encode ¶
func (s *UpdateProductNotFound) Encode(e *jx.Encoder)
Encode encodes UpdateProductNotFound as json.
func (*UpdateProductNotFound) MarshalJSON ¶
func (s *UpdateProductNotFound) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*UpdateProductNotFound) UnmarshalJSON ¶
func (s *UpdateProductNotFound) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type UpdateProductPreconditionFailed ¶
type UpdateProductPreconditionFailed Problem
func (*UpdateProductPreconditionFailed) Decode ¶
func (s *UpdateProductPreconditionFailed) Decode(d *jx.Decoder) error
Decode decodes UpdateProductPreconditionFailed from json.
func (*UpdateProductPreconditionFailed) Encode ¶
func (s *UpdateProductPreconditionFailed) Encode(e *jx.Encoder)
Encode encodes UpdateProductPreconditionFailed as json.
func (*UpdateProductPreconditionFailed) MarshalJSON ¶
func (s *UpdateProductPreconditionFailed) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*UpdateProductPreconditionFailed) UnmarshalJSON ¶
func (s *UpdateProductPreconditionFailed) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type UpdateProductRequest ¶
type UpdateProductRequest struct {
ID uuid.UUID `json:"id"`
Name string `json:"name"`
Description OptString `json:"description"`
Price float64 `json:"price"`
Quantity int `json:"quantity"`
ImageId OptUUID `json:"imageId"`
CategoryId OptUUID `json:"categoryId"`
Enabled bool `json:"enabled"`
// Optimistic locking version.
Version int `json:"version"`
// List of attribute values for this product.
Attributes []AttributeValueInput `json:"attributes"`
}
Ref: #/components/schemas/UpdateProductRequest
func (*UpdateProductRequest) Decode ¶
func (s *UpdateProductRequest) Decode(d *jx.Decoder) error
Decode decodes UpdateProductRequest from json.
func (*UpdateProductRequest) Encode ¶
func (s *UpdateProductRequest) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*UpdateProductRequest) GetAttributes ¶
func (s *UpdateProductRequest) GetAttributes() []AttributeValueInput
GetAttributes returns the value of Attributes.
func (*UpdateProductRequest) GetCategoryId ¶
func (s *UpdateProductRequest) GetCategoryId() OptUUID
GetCategoryId returns the value of CategoryId.
func (*UpdateProductRequest) GetDescription ¶
func (s *UpdateProductRequest) GetDescription() OptString
GetDescription returns the value of Description.
func (*UpdateProductRequest) GetEnabled ¶
func (s *UpdateProductRequest) GetEnabled() bool
GetEnabled returns the value of Enabled.
func (*UpdateProductRequest) GetID ¶
func (s *UpdateProductRequest) GetID() uuid.UUID
GetID returns the value of ID.
func (*UpdateProductRequest) GetImageId ¶
func (s *UpdateProductRequest) GetImageId() OptUUID
GetImageId returns the value of ImageId.
func (*UpdateProductRequest) GetName ¶
func (s *UpdateProductRequest) GetName() string
GetName returns the value of Name.
func (*UpdateProductRequest) GetPrice ¶
func (s *UpdateProductRequest) GetPrice() float64
GetPrice returns the value of Price.
func (*UpdateProductRequest) GetQuantity ¶
func (s *UpdateProductRequest) GetQuantity() int
GetQuantity returns the value of Quantity.
func (*UpdateProductRequest) GetVersion ¶
func (s *UpdateProductRequest) GetVersion() int
GetVersion returns the value of Version.
func (*UpdateProductRequest) MarshalJSON ¶
func (s *UpdateProductRequest) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*UpdateProductRequest) SetAttributes ¶
func (s *UpdateProductRequest) SetAttributes(val []AttributeValueInput)
SetAttributes sets the value of Attributes.
func (*UpdateProductRequest) SetCategoryId ¶
func (s *UpdateProductRequest) SetCategoryId(val OptUUID)
SetCategoryId sets the value of CategoryId.
func (*UpdateProductRequest) SetDescription ¶
func (s *UpdateProductRequest) SetDescription(val OptString)
SetDescription sets the value of Description.
func (*UpdateProductRequest) SetEnabled ¶
func (s *UpdateProductRequest) SetEnabled(val bool)
SetEnabled sets the value of Enabled.
func (*UpdateProductRequest) SetID ¶
func (s *UpdateProductRequest) SetID(val uuid.UUID)
SetID sets the value of ID.
func (*UpdateProductRequest) SetImageId ¶
func (s *UpdateProductRequest) SetImageId(val OptUUID)
SetImageId sets the value of ImageId.
func (*UpdateProductRequest) SetName ¶
func (s *UpdateProductRequest) SetName(val string)
SetName sets the value of Name.
func (*UpdateProductRequest) SetPrice ¶
func (s *UpdateProductRequest) SetPrice(val float64)
SetPrice sets the value of Price.
func (*UpdateProductRequest) SetQuantity ¶
func (s *UpdateProductRequest) SetQuantity(val int)
SetQuantity sets the value of Quantity.
func (*UpdateProductRequest) SetVersion ¶
func (s *UpdateProductRequest) SetVersion(val int)
SetVersion sets the value of Version.
func (*UpdateProductRequest) UnmarshalJSON ¶
func (s *UpdateProductRequest) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*UpdateProductRequest) Validate ¶
func (s *UpdateProductRequest) Validate() error
type UpdateProductRes ¶
type UpdateProductRes interface {
// contains filtered or unexported methods
}
type UpdateProductUnauthorized ¶
type UpdateProductUnauthorized Problem
func (*UpdateProductUnauthorized) Decode ¶
func (s *UpdateProductUnauthorized) Decode(d *jx.Decoder) error
Decode decodes UpdateProductUnauthorized from json.
func (*UpdateProductUnauthorized) Encode ¶
func (s *UpdateProductUnauthorized) Encode(e *jx.Encoder)
Encode encodes UpdateProductUnauthorized as json.
func (*UpdateProductUnauthorized) MarshalJSON ¶
func (s *UpdateProductUnauthorized) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*UpdateProductUnauthorized) UnmarshalJSON ¶
func (s *UpdateProductUnauthorized) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
Source Files
¶
- oas_cfg_gen.go
- oas_client_gen.go
- oas_client_provider.gen.go
- oas_handlers_gen.go
- oas_interfaces_gen.go
- oas_json_gen.go
- oas_labeler_gen.go
- oas_middleware_gen.go
- oas_operations_gen.go
- oas_parameters_gen.go
- oas_request_decoders_gen.go
- oas_request_encoders_gen.go
- oas_response_decoders_gen.go
- oas_response_encoders_gen.go
- oas_router_gen.go
- oas_schemas_gen.go
- oas_security_gen.go
- oas_server_gen.go
- oas_server_provider.gen.go
- oas_unimplemented_gen.go
- oas_validators_gen.go
- openapi_embed.gen.go