Documentation
¶
Overview ¶
Code generated by ogen, DO NOT EDIT.
Index ¶
- Variables
- func WithServerURL(ctx context.Context, u *url.URL) context.Context
- type Client
- func (c *Client) ConfirmUpload(ctx context.Context, request *ConfirmRequest) (ConfirmUploadRes, error)
- func (c *Client) CreatePresign(ctx context.Context, request *PresignRequest) (CreatePresignRes, error)
- func (c *Client) DeleteImage(ctx context.Context, params DeleteImageParams) (DeleteImageRes, error)
- func (c *Client) GetDeliveryUrl(ctx context.Context, params GetDeliveryUrlParams) (GetDeliveryUrlRes, error)
- func (c *Client) GetImage(ctx context.Context, params GetImageParams) (GetImageRes, error)
- func (c *Client) PromoteImages(ctx context.Context, request *PromoteRequest) (PromoteImagesRes, error)
- type ClientOption
- type ConfirmRequest
- func (s *ConfirmRequest) Decode(d *jx.Decoder) error
- func (s *ConfirmRequest) Encode(e *jx.Encoder)
- func (s *ConfirmRequest) GetAlt() string
- func (s *ConfirmRequest) GetChecksum() OptNilString
- func (s *ConfirmRequest) GetRole() ImageRole
- func (s *ConfirmRequest) GetUploadToken() string
- func (s *ConfirmRequest) MarshalJSON() ([]byte, error)
- func (s *ConfirmRequest) SetAlt(val string)
- func (s *ConfirmRequest) SetChecksum(val OptNilString)
- func (s *ConfirmRequest) SetRole(val ImageRole)
- func (s *ConfirmRequest) SetUploadToken(val string)
- func (s *ConfirmRequest) UnmarshalJSON(data []byte) error
- func (s *ConfirmRequest) Validate() error
- type ConfirmUploadBadRequest
- type ConfirmUploadConflict
- type ConfirmUploadInternalServerError
- type ConfirmUploadNotFound
- type ConfirmUploadRes
- type CreatePresignBadRequest
- type CreatePresignInternalServerError
- type CreatePresignRes
- type DeleteImageInternalServerError
- type DeleteImageNoContent
- type DeleteImageNotFound
- type DeleteImageParams
- type DeleteImageRes
- type ErrorHandler
- type GetDeliveryUrlFit
- type GetDeliveryUrlFormat
- type GetDeliveryUrlInternalServerError
- type GetDeliveryUrlNotFound
- type GetDeliveryUrlOK
- func (s *GetDeliveryUrlOK) Decode(d *jx.Decoder) error
- func (s *GetDeliveryUrlOK) Encode(e *jx.Encoder)
- func (s *GetDeliveryUrlOK) GetExpiresAt() OptDateTime
- func (s *GetDeliveryUrlOK) GetURL() url.URL
- func (s *GetDeliveryUrlOK) MarshalJSON() ([]byte, error)
- func (s *GetDeliveryUrlOK) SetExpiresAt(val OptDateTime)
- func (s *GetDeliveryUrlOK) SetURL(val url.URL)
- func (s *GetDeliveryUrlOK) UnmarshalJSON(data []byte) error
- type GetDeliveryUrlParams
- type GetDeliveryUrlRes
- type GetImageInternalServerError
- type GetImageNotFound
- type GetImageParams
- type GetImageRes
- type Handler
- type Image
- func (s *Image) Decode(d *jx.Decoder) error
- func (s *Image) Encode(e *jx.Encoder)
- func (s *Image) GetAlt() string
- func (s *Image) GetCreatedAt() time.Time
- func (s *Image) GetHash() OptNilString
- func (s *Image) GetID() string
- func (s *Image) GetKey() string
- func (s *Image) GetMime() string
- func (s *Image) GetModifiedAt() time.Time
- func (s *Image) GetOwnerId() string
- func (s *Image) GetOwnerType() OwnerType
- func (s *Image) GetRole() ImageRole
- func (s *Image) GetSize() int
- func (s *Image) GetStatus() ImageStatus
- func (s *Image) GetURL() OptNilString
- func (s *Image) GetVariants() []Variant
- func (s *Image) MarshalJSON() ([]byte, error)
- func (s *Image) SetAlt(val string)
- func (s *Image) SetCreatedAt(val time.Time)
- func (s *Image) SetHash(val OptNilString)
- func (s *Image) SetID(val string)
- func (s *Image) SetKey(val string)
- func (s *Image) SetMime(val string)
- func (s *Image) SetModifiedAt(val time.Time)
- func (s *Image) SetOwnerId(val string)
- func (s *Image) SetOwnerType(val OwnerType)
- func (s *Image) SetRole(val ImageRole)
- func (s *Image) SetSize(val int)
- func (s *Image) SetStatus(val ImageStatus)
- func (s *Image) SetURL(val OptNilString)
- func (s *Image) SetVariants(val []Variant)
- func (s *Image) UnmarshalJSON(data []byte) error
- func (s *Image) Validate() error
- type ImageRole
- func (ImageRole) AllValues() []ImageRole
- func (s *ImageRole) Decode(d *jx.Decoder) error
- func (s ImageRole) Encode(e *jx.Encoder)
- func (s ImageRole) MarshalJSON() ([]byte, error)
- func (s ImageRole) MarshalText() ([]byte, error)
- func (s *ImageRole) UnmarshalJSON(data []byte) error
- func (s *ImageRole) UnmarshalText(data []byte) error
- func (s ImageRole) Validate() error
- type ImageStatus
- func (ImageStatus) AllValues() []ImageStatus
- func (s *ImageStatus) Decode(d *jx.Decoder) error
- func (s ImageStatus) Encode(e *jx.Encoder)
- func (s ImageStatus) MarshalJSON() ([]byte, error)
- func (s ImageStatus) MarshalText() ([]byte, error)
- func (s *ImageStatus) UnmarshalJSON(data []byte) error
- func (s *ImageStatus) UnmarshalText(data []byte) error
- func (s ImageStatus) Validate() error
- type Invoker
- type Labeler
- type Middleware
- type OperationName
- type OptBool
- type OptDateTime
- func (o *OptDateTime) Decode(d *jx.Decoder, format func(*jx.Decoder) (time.Time, error)) error
- func (o OptDateTime) Encode(e *jx.Encoder, format func(*jx.Encoder, time.Time))
- func (o OptDateTime) Get() (v time.Time, ok bool)
- func (o OptDateTime) IsSet() bool
- func (s OptDateTime) MarshalJSON() ([]byte, error)
- func (o OptDateTime) Or(d time.Time) time.Time
- func (o *OptDateTime) Reset()
- func (o *OptDateTime) SetTo(v time.Time)
- func (s *OptDateTime) UnmarshalJSON(data []byte) error
- type OptFloat64
- type OptGetDeliveryUrlFit
- type OptGetDeliveryUrlFormat
- func (o OptGetDeliveryUrlFormat) Get() (v GetDeliveryUrlFormat, ok bool)
- func (o OptGetDeliveryUrlFormat) IsSet() bool
- func (o OptGetDeliveryUrlFormat) Or(d GetDeliveryUrlFormat) GetDeliveryUrlFormat
- func (o *OptGetDeliveryUrlFormat) Reset()
- func (o *OptGetDeliveryUrlFormat) SetTo(v GetDeliveryUrlFormat)
- 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 OptNilString
- func (o *OptNilString) Decode(d *jx.Decoder) error
- func (o OptNilString) Encode(e *jx.Encoder)
- func (o OptNilString) Get() (v string, ok bool)
- func (o OptNilString) IsNull() bool
- func (o OptNilString) IsSet() bool
- func (s OptNilString) MarshalJSON() ([]byte, error)
- func (o OptNilString) Or(d string) string
- func (o *OptNilString) Reset()
- func (o *OptNilString) SetTo(v string)
- func (o *OptNilString) SetToNull()
- func (s *OptNilString) 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 Option
- type OwnerType
- func (OwnerType) AllValues() []OwnerType
- func (s *OwnerType) Decode(d *jx.Decoder) error
- func (s OwnerType) Encode(e *jx.Encoder)
- func (s OwnerType) MarshalJSON() ([]byte, error)
- func (s OwnerType) MarshalText() ([]byte, error)
- func (s *OwnerType) UnmarshalJSON(data []byte) error
- func (s *OwnerType) UnmarshalText(data []byte) error
- func (s OwnerType) Validate() error
- type PresignRequest
- func (s *PresignRequest) Decode(d *jx.Decoder) error
- func (s *PresignRequest) Encode(e *jx.Encoder)
- func (s *PresignRequest) GetContentType() PresignRequestContentType
- func (s *PresignRequest) GetFilename() string
- func (s *PresignRequest) GetOwnerId() string
- func (s *PresignRequest) GetOwnerType() OwnerType
- func (s *PresignRequest) GetRole() ImageRole
- func (s *PresignRequest) GetSize() int
- func (s *PresignRequest) MarshalJSON() ([]byte, error)
- func (s *PresignRequest) SetContentType(val PresignRequestContentType)
- func (s *PresignRequest) SetFilename(val string)
- func (s *PresignRequest) SetOwnerId(val string)
- func (s *PresignRequest) SetOwnerType(val OwnerType)
- func (s *PresignRequest) SetRole(val ImageRole)
- func (s *PresignRequest) SetSize(val int)
- func (s *PresignRequest) UnmarshalJSON(data []byte) error
- func (s *PresignRequest) Validate() error
- type PresignRequestContentType
- func (PresignRequestContentType) AllValues() []PresignRequestContentType
- func (s *PresignRequestContentType) Decode(d *jx.Decoder) error
- func (s PresignRequestContentType) Encode(e *jx.Encoder)
- func (s PresignRequestContentType) MarshalJSON() ([]byte, error)
- func (s PresignRequestContentType) MarshalText() ([]byte, error)
- func (s *PresignRequestContentType) UnmarshalJSON(data []byte) error
- func (s *PresignRequestContentType) UnmarshalText(data []byte) error
- func (s PresignRequestContentType) Validate() error
- type PresignResponse
- func (s *PresignResponse) Decode(d *jx.Decoder) error
- func (s *PresignResponse) Encode(e *jx.Encoder)
- func (s *PresignResponse) GetExpiresIn() int
- func (s *PresignResponse) GetFormData() PresignResponseFormData
- func (s *PresignResponse) GetUploadToken() string
- func (s *PresignResponse) GetUploadUrl() url.URL
- func (s *PresignResponse) MarshalJSON() ([]byte, error)
- func (s *PresignResponse) SetExpiresIn(val int)
- func (s *PresignResponse) SetFormData(val PresignResponseFormData)
- func (s *PresignResponse) SetUploadToken(val string)
- func (s *PresignResponse) SetUploadUrl(val url.URL)
- func (s *PresignResponse) UnmarshalJSON(data []byte) error
- type PresignResponseFormData
- 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 PromoteImagesBadRequest
- type PromoteImagesConflict
- type PromoteImagesInternalServerError
- type PromoteImagesNotFound
- type PromoteImagesOK
- func (s *PromoteImagesOK) Decode(d *jx.Decoder) error
- func (s *PromoteImagesOK) Encode(e *jx.Encoder)
- func (s *PromoteImagesOK) GetPromoted() []Image
- func (s *PromoteImagesOK) MarshalJSON() ([]byte, error)
- func (s *PromoteImagesOK) SetPromoted(val []Image)
- func (s *PromoteImagesOK) UnmarshalJSON(data []byte) error
- func (s *PromoteImagesOK) Validate() error
- type PromoteImagesRes
- type PromoteRequest
- func (s *PromoteRequest) Decode(d *jx.Decoder) error
- func (s *PromoteRequest) Encode(e *jx.Encoder)
- func (s *PromoteRequest) GetDraftId() string
- func (s *PromoteRequest) GetImages() []string
- func (s *PromoteRequest) GetMove() bool
- func (s *PromoteRequest) GetProductId() string
- func (s *PromoteRequest) MarshalJSON() ([]byte, error)
- func (s *PromoteRequest) SetDraftId(val string)
- func (s *PromoteRequest) SetImages(val []string)
- func (s *PromoteRequest) SetMove(val bool)
- func (s *PromoteRequest) SetProductId(val string)
- func (s *PromoteRequest) UnmarshalJSON(data []byte) error
- func (s *PromoteRequest) Validate() error
- type Route
- 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 UnimplementedHandler
- func (UnimplementedHandler) ConfirmUpload(ctx context.Context, req *ConfirmRequest) (r ConfirmUploadRes, _ error)
- func (UnimplementedHandler) CreatePresign(ctx context.Context, req *PresignRequest) (r CreatePresignRes, _ error)
- func (UnimplementedHandler) DeleteImage(ctx context.Context, params DeleteImageParams) (r DeleteImageRes, _ error)
- func (UnimplementedHandler) GetDeliveryUrl(ctx context.Context, params GetDeliveryUrlParams) (r GetDeliveryUrlRes, _ error)
- func (UnimplementedHandler) GetImage(ctx context.Context, params GetImageParams) (r GetImageRes, _ error)
- func (UnimplementedHandler) PromoteImages(ctx context.Context, req *PromoteRequest) (r PromoteImagesRes, _ error)
- type Variant
- func (s *Variant) Decode(d *jx.Decoder) error
- func (s *Variant) Encode(e *jx.Encoder)
- func (s *Variant) GetHeight() OptInt
- func (s *Variant) GetKey() OptString
- func (s *Variant) GetMime() OptString
- func (s *Variant) GetName() OptString
- func (s *Variant) GetSize() OptInt
- func (s *Variant) GetWidth() OptInt
- func (s *Variant) MarshalJSON() ([]byte, error)
- func (s *Variant) SetHeight(val OptInt)
- func (s *Variant) SetKey(val OptString)
- func (s *Variant) SetMime(val OptString)
- func (s *Variant) SetName(val OptString)
- func (s *Variant) SetSize(val OptInt)
- func (s *Variant) SetWidth(val OptInt)
- func (s *Variant) UnmarshalJSON(data []byte) error
Constants ¶
This section is empty.
Variables ¶
var OpenAPIDoc []byte
Functions ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client implements OAS client.
func NewClient ¶
func NewClient(serverURL string, opts ...ClientOption) (*Client, error)
NewClient initializes new Client defined by OAS.
func (*Client) ConfirmUpload ¶
func (c *Client) ConfirmUpload(ctx context.Context, request *ConfirmRequest) (ConfirmUploadRes, error)
ConfirmUpload invokes confirmUpload operation.
Confirm upload (HEAD against S3), persist metadata.
POST /v1/images/confirm
func (*Client) CreatePresign ¶
func (c *Client) CreatePresign(ctx context.Context, request *PresignRequest) (CreatePresignRes, error)
CreatePresign invokes createPresign operation.
Create a POST policy for uploading an image to MinIO/S3 with size validation.
POST /v1/images/presign
func (*Client) DeleteImage ¶
func (c *Client) DeleteImage(ctx context.Context, params DeleteImageParams) (DeleteImageRes, error)
DeleteImage invokes deleteImage operation.
Delete image (soft or hard, per policy).
DELETE /v1/images/{id}
func (*Client) GetDeliveryUrl ¶
func (c *Client) GetDeliveryUrl(ctx context.Context, params GetDeliveryUrlParams) (GetDeliveryUrlRes, error)
GetDeliveryUrl invokes getDeliveryUrl operation.
Generate a signed imgproxy URL for delivery with requested params.
GET /v1/images/{id}/url
func (*Client) GetImage ¶
func (c *Client) GetImage(ctx context.Context, params GetImageParams) (GetImageRes, error)
GetImage invokes getImage operation.
Get image metadata.
GET /v1/images/{id}
func (*Client) PromoteImages ¶
func (c *Client) PromoteImages(ctx context.Context, request *PromoteRequest) (PromoteImagesRes, error)
PromoteImages invokes promoteImages operation.
Promote images from a product draft to a final product.
POST /v1/images/promote
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 ConfirmRequest ¶
type ConfirmRequest struct {
// Signed JWT token from presign response.
UploadToken string `json:"uploadToken"`
Alt string `json:"alt"`
Role ImageRole `json:"role"`
// E.g., SHA256 hex for additional integrity check.
Checksum OptNilString `json:"checksum"`
}
Ref: #/components/schemas/ConfirmRequest
func (*ConfirmRequest) Decode ¶
func (s *ConfirmRequest) Decode(d *jx.Decoder) error
Decode decodes ConfirmRequest from json.
func (*ConfirmRequest) Encode ¶
func (s *ConfirmRequest) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*ConfirmRequest) GetAlt ¶
func (s *ConfirmRequest) GetAlt() string
GetAlt returns the value of Alt.
func (*ConfirmRequest) GetChecksum ¶
func (s *ConfirmRequest) GetChecksum() OptNilString
GetChecksum returns the value of Checksum.
func (*ConfirmRequest) GetRole ¶
func (s *ConfirmRequest) GetRole() ImageRole
GetRole returns the value of Role.
func (*ConfirmRequest) GetUploadToken ¶
func (s *ConfirmRequest) GetUploadToken() string
GetUploadToken returns the value of UploadToken.
func (*ConfirmRequest) MarshalJSON ¶
func (s *ConfirmRequest) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*ConfirmRequest) SetAlt ¶
func (s *ConfirmRequest) SetAlt(val string)
SetAlt sets the value of Alt.
func (*ConfirmRequest) SetChecksum ¶
func (s *ConfirmRequest) SetChecksum(val OptNilString)
SetChecksum sets the value of Checksum.
func (*ConfirmRequest) SetRole ¶
func (s *ConfirmRequest) SetRole(val ImageRole)
SetRole sets the value of Role.
func (*ConfirmRequest) SetUploadToken ¶
func (s *ConfirmRequest) SetUploadToken(val string)
SetUploadToken sets the value of UploadToken.
func (*ConfirmRequest) UnmarshalJSON ¶
func (s *ConfirmRequest) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*ConfirmRequest) Validate ¶
func (s *ConfirmRequest) Validate() error
type ConfirmUploadBadRequest ¶
type ConfirmUploadBadRequest Problem
func (*ConfirmUploadBadRequest) Decode ¶
func (s *ConfirmUploadBadRequest) Decode(d *jx.Decoder) error
Decode decodes ConfirmUploadBadRequest from json.
func (*ConfirmUploadBadRequest) Encode ¶
func (s *ConfirmUploadBadRequest) Encode(e *jx.Encoder)
Encode encodes ConfirmUploadBadRequest as json.
func (*ConfirmUploadBadRequest) MarshalJSON ¶
func (s *ConfirmUploadBadRequest) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*ConfirmUploadBadRequest) UnmarshalJSON ¶
func (s *ConfirmUploadBadRequest) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type ConfirmUploadConflict ¶
type ConfirmUploadConflict Problem
func (*ConfirmUploadConflict) Decode ¶
func (s *ConfirmUploadConflict) Decode(d *jx.Decoder) error
Decode decodes ConfirmUploadConflict from json.
func (*ConfirmUploadConflict) Encode ¶
func (s *ConfirmUploadConflict) Encode(e *jx.Encoder)
Encode encodes ConfirmUploadConflict as json.
func (*ConfirmUploadConflict) MarshalJSON ¶
func (s *ConfirmUploadConflict) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*ConfirmUploadConflict) UnmarshalJSON ¶
func (s *ConfirmUploadConflict) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type ConfirmUploadInternalServerError ¶
type ConfirmUploadInternalServerError Problem
func (*ConfirmUploadInternalServerError) Decode ¶
func (s *ConfirmUploadInternalServerError) Decode(d *jx.Decoder) error
Decode decodes ConfirmUploadInternalServerError from json.
func (*ConfirmUploadInternalServerError) Encode ¶
func (s *ConfirmUploadInternalServerError) Encode(e *jx.Encoder)
Encode encodes ConfirmUploadInternalServerError as json.
func (*ConfirmUploadInternalServerError) MarshalJSON ¶
func (s *ConfirmUploadInternalServerError) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*ConfirmUploadInternalServerError) UnmarshalJSON ¶
func (s *ConfirmUploadInternalServerError) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type ConfirmUploadNotFound ¶
type ConfirmUploadNotFound Problem
func (*ConfirmUploadNotFound) Decode ¶
func (s *ConfirmUploadNotFound) Decode(d *jx.Decoder) error
Decode decodes ConfirmUploadNotFound from json.
func (*ConfirmUploadNotFound) Encode ¶
func (s *ConfirmUploadNotFound) Encode(e *jx.Encoder)
Encode encodes ConfirmUploadNotFound as json.
func (*ConfirmUploadNotFound) MarshalJSON ¶
func (s *ConfirmUploadNotFound) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*ConfirmUploadNotFound) UnmarshalJSON ¶
func (s *ConfirmUploadNotFound) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type ConfirmUploadRes ¶
type ConfirmUploadRes interface {
// contains filtered or unexported methods
}
type CreatePresignBadRequest ¶
type CreatePresignBadRequest Problem
func (*CreatePresignBadRequest) Decode ¶
func (s *CreatePresignBadRequest) Decode(d *jx.Decoder) error
Decode decodes CreatePresignBadRequest from json.
func (*CreatePresignBadRequest) Encode ¶
func (s *CreatePresignBadRequest) Encode(e *jx.Encoder)
Encode encodes CreatePresignBadRequest as json.
func (*CreatePresignBadRequest) MarshalJSON ¶
func (s *CreatePresignBadRequest) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*CreatePresignBadRequest) UnmarshalJSON ¶
func (s *CreatePresignBadRequest) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type CreatePresignInternalServerError ¶
type CreatePresignInternalServerError Problem
func (*CreatePresignInternalServerError) Decode ¶
func (s *CreatePresignInternalServerError) Decode(d *jx.Decoder) error
Decode decodes CreatePresignInternalServerError from json.
func (*CreatePresignInternalServerError) Encode ¶
func (s *CreatePresignInternalServerError) Encode(e *jx.Encoder)
Encode encodes CreatePresignInternalServerError as json.
func (*CreatePresignInternalServerError) MarshalJSON ¶
func (s *CreatePresignInternalServerError) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*CreatePresignInternalServerError) UnmarshalJSON ¶
func (s *CreatePresignInternalServerError) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type CreatePresignRes ¶
type CreatePresignRes interface {
// contains filtered or unexported methods
}
type DeleteImageInternalServerError ¶
type DeleteImageInternalServerError Problem
func (*DeleteImageInternalServerError) Decode ¶
func (s *DeleteImageInternalServerError) Decode(d *jx.Decoder) error
Decode decodes DeleteImageInternalServerError from json.
func (*DeleteImageInternalServerError) Encode ¶
func (s *DeleteImageInternalServerError) Encode(e *jx.Encoder)
Encode encodes DeleteImageInternalServerError as json.
func (*DeleteImageInternalServerError) MarshalJSON ¶
func (s *DeleteImageInternalServerError) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*DeleteImageInternalServerError) UnmarshalJSON ¶
func (s *DeleteImageInternalServerError) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type DeleteImageNoContent ¶
type DeleteImageNoContent struct{}
DeleteImageNoContent is response for DeleteImage operation.
type DeleteImageNotFound ¶
type DeleteImageNotFound Problem
func (*DeleteImageNotFound) Decode ¶
func (s *DeleteImageNotFound) Decode(d *jx.Decoder) error
Decode decodes DeleteImageNotFound from json.
func (*DeleteImageNotFound) Encode ¶
func (s *DeleteImageNotFound) Encode(e *jx.Encoder)
Encode encodes DeleteImageNotFound as json.
func (*DeleteImageNotFound) MarshalJSON ¶
func (s *DeleteImageNotFound) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*DeleteImageNotFound) UnmarshalJSON ¶
func (s *DeleteImageNotFound) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type DeleteImageParams ¶
DeleteImageParams is parameters of deleteImage operation.
type DeleteImageRes ¶
type DeleteImageRes interface {
// contains filtered or unexported methods
}
type GetDeliveryUrlFit ¶
type GetDeliveryUrlFit string
const ( GetDeliveryUrlFitCover GetDeliveryUrlFit = "cover" GetDeliveryUrlFitContain GetDeliveryUrlFit = "contain" GetDeliveryUrlFitFill GetDeliveryUrlFit = "fill" GetDeliveryUrlFitInside GetDeliveryUrlFit = "inside" GetDeliveryUrlFitOutside GetDeliveryUrlFit = "outside" )
func (GetDeliveryUrlFit) AllValues ¶
func (GetDeliveryUrlFit) AllValues() []GetDeliveryUrlFit
AllValues returns all GetDeliveryUrlFit values.
func (GetDeliveryUrlFit) MarshalText ¶
func (s GetDeliveryUrlFit) MarshalText() ([]byte, error)
MarshalText implements encoding.TextMarshaler.
func (*GetDeliveryUrlFit) UnmarshalText ¶
func (s *GetDeliveryUrlFit) UnmarshalText(data []byte) error
UnmarshalText implements encoding.TextUnmarshaler.
func (GetDeliveryUrlFit) Validate ¶
func (s GetDeliveryUrlFit) Validate() error
type GetDeliveryUrlFormat ¶
type GetDeliveryUrlFormat string
const ( GetDeliveryUrlFormatOriginal GetDeliveryUrlFormat = "original" GetDeliveryUrlFormatWEBP GetDeliveryUrlFormat = "webp" GetDeliveryUrlFormatAvif GetDeliveryUrlFormat = "avif" GetDeliveryUrlFormatJpeg GetDeliveryUrlFormat = "jpeg" GetDeliveryUrlFormatPNG GetDeliveryUrlFormat = "png" )
func (GetDeliveryUrlFormat) AllValues ¶
func (GetDeliveryUrlFormat) AllValues() []GetDeliveryUrlFormat
AllValues returns all GetDeliveryUrlFormat values.
func (GetDeliveryUrlFormat) MarshalText ¶
func (s GetDeliveryUrlFormat) MarshalText() ([]byte, error)
MarshalText implements encoding.TextMarshaler.
func (*GetDeliveryUrlFormat) UnmarshalText ¶
func (s *GetDeliveryUrlFormat) UnmarshalText(data []byte) error
UnmarshalText implements encoding.TextUnmarshaler.
func (GetDeliveryUrlFormat) Validate ¶
func (s GetDeliveryUrlFormat) Validate() error
type GetDeliveryUrlInternalServerError ¶
type GetDeliveryUrlInternalServerError Problem
func (*GetDeliveryUrlInternalServerError) Decode ¶
func (s *GetDeliveryUrlInternalServerError) Decode(d *jx.Decoder) error
Decode decodes GetDeliveryUrlInternalServerError from json.
func (*GetDeliveryUrlInternalServerError) Encode ¶
func (s *GetDeliveryUrlInternalServerError) Encode(e *jx.Encoder)
Encode encodes GetDeliveryUrlInternalServerError as json.
func (*GetDeliveryUrlInternalServerError) MarshalJSON ¶
func (s *GetDeliveryUrlInternalServerError) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*GetDeliveryUrlInternalServerError) UnmarshalJSON ¶
func (s *GetDeliveryUrlInternalServerError) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type GetDeliveryUrlNotFound ¶
type GetDeliveryUrlNotFound Problem
func (*GetDeliveryUrlNotFound) Decode ¶
func (s *GetDeliveryUrlNotFound) Decode(d *jx.Decoder) error
Decode decodes GetDeliveryUrlNotFound from json.
func (*GetDeliveryUrlNotFound) Encode ¶
func (s *GetDeliveryUrlNotFound) Encode(e *jx.Encoder)
Encode encodes GetDeliveryUrlNotFound as json.
func (*GetDeliveryUrlNotFound) MarshalJSON ¶
func (s *GetDeliveryUrlNotFound) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*GetDeliveryUrlNotFound) UnmarshalJSON ¶
func (s *GetDeliveryUrlNotFound) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type GetDeliveryUrlOK ¶
type GetDeliveryUrlOK struct {
URL url.URL `json:"url"`
ExpiresAt OptDateTime `json:"expiresAt"`
}
func (*GetDeliveryUrlOK) Decode ¶
func (s *GetDeliveryUrlOK) Decode(d *jx.Decoder) error
Decode decodes GetDeliveryUrlOK from json.
func (*GetDeliveryUrlOK) Encode ¶
func (s *GetDeliveryUrlOK) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*GetDeliveryUrlOK) GetExpiresAt ¶
func (s *GetDeliveryUrlOK) GetExpiresAt() OptDateTime
GetExpiresAt returns the value of ExpiresAt.
func (*GetDeliveryUrlOK) GetURL ¶
func (s *GetDeliveryUrlOK) GetURL() url.URL
GetURL returns the value of URL.
func (*GetDeliveryUrlOK) MarshalJSON ¶
func (s *GetDeliveryUrlOK) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*GetDeliveryUrlOK) SetExpiresAt ¶
func (s *GetDeliveryUrlOK) SetExpiresAt(val OptDateTime)
SetExpiresAt sets the value of ExpiresAt.
func (*GetDeliveryUrlOK) SetURL ¶
func (s *GetDeliveryUrlOK) SetURL(val url.URL)
SetURL sets the value of URL.
func (*GetDeliveryUrlOK) UnmarshalJSON ¶
func (s *GetDeliveryUrlOK) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type GetDeliveryUrlParams ¶
type GetDeliveryUrlParams struct {
ID string
Variant OptString `json:",omitempty,omitzero"`
W OptInt `json:",omitempty,omitzero"`
H OptInt `json:",omitempty,omitzero"`
Fit OptGetDeliveryUrlFit `json:",omitempty,omitzero"`
Format OptGetDeliveryUrlFormat `json:",omitempty,omitzero"`
Quality OptInt `json:",omitempty,omitzero"`
Dpr OptFloat64 `json:",omitempty,omitzero"`
TtlSeconds OptInt `json:",omitempty,omitzero"`
}
GetDeliveryUrlParams is parameters of getDeliveryUrl operation.
type GetDeliveryUrlRes ¶
type GetDeliveryUrlRes interface {
// contains filtered or unexported methods
}
type GetImageInternalServerError ¶
type GetImageInternalServerError Problem
func (*GetImageInternalServerError) Decode ¶
func (s *GetImageInternalServerError) Decode(d *jx.Decoder) error
Decode decodes GetImageInternalServerError from json.
func (*GetImageInternalServerError) Encode ¶
func (s *GetImageInternalServerError) Encode(e *jx.Encoder)
Encode encodes GetImageInternalServerError as json.
func (*GetImageInternalServerError) MarshalJSON ¶
func (s *GetImageInternalServerError) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*GetImageInternalServerError) UnmarshalJSON ¶
func (s *GetImageInternalServerError) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type GetImageNotFound ¶
type GetImageNotFound Problem
func (*GetImageNotFound) Decode ¶
func (s *GetImageNotFound) Decode(d *jx.Decoder) error
Decode decodes GetImageNotFound from json.
func (*GetImageNotFound) Encode ¶
func (s *GetImageNotFound) Encode(e *jx.Encoder)
Encode encodes GetImageNotFound as json.
func (*GetImageNotFound) MarshalJSON ¶
func (s *GetImageNotFound) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*GetImageNotFound) UnmarshalJSON ¶
func (s *GetImageNotFound) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type GetImageParams ¶
type GetImageParams struct {
ID string
}
GetImageParams is parameters of getImage operation.
type GetImageRes ¶
type GetImageRes interface {
// contains filtered or unexported methods
}
type Handler ¶
type Handler interface {
// ConfirmUpload implements confirmUpload operation.
//
// Confirm upload (HEAD against S3), persist metadata.
//
// POST /v1/images/confirm
ConfirmUpload(ctx context.Context, req *ConfirmRequest) (ConfirmUploadRes, error)
// CreatePresign implements createPresign operation.
//
// Create a POST policy for uploading an image to MinIO/S3 with size validation.
//
// POST /v1/images/presign
CreatePresign(ctx context.Context, req *PresignRequest) (CreatePresignRes, error)
// DeleteImage implements deleteImage operation.
//
// Delete image (soft or hard, per policy).
//
// DELETE /v1/images/{id}
DeleteImage(ctx context.Context, params DeleteImageParams) (DeleteImageRes, error)
// GetDeliveryUrl implements getDeliveryUrl operation.
//
// Generate a signed imgproxy URL for delivery with requested params.
//
// GET /v1/images/{id}/url
GetDeliveryUrl(ctx context.Context, params GetDeliveryUrlParams) (GetDeliveryUrlRes, error)
// GetImage implements getImage operation.
//
// Get image metadata.
//
// GET /v1/images/{id}
GetImage(ctx context.Context, params GetImageParams) (GetImageRes, error)
// PromoteImages implements promoteImages operation.
//
// Promote images from a product draft to a final product.
//
// POST /v1/images/promote
PromoteImages(ctx context.Context, req *PromoteRequest) (PromoteImagesRes, error)
}
Handler handles operations described by OpenAPI v3 specification.
type Image ¶
type Image struct {
ID string `json:"id"`
OwnerType OwnerType `json:"ownerType"`
OwnerId string `json:"ownerId"`
Role ImageRole `json:"role"`
// S3 key of the original image.
Key string `json:"key"`
// Optional — direct URL if public or via proxy.
URL OptNilString `json:"url"`
Alt string `json:"alt"`
Mime string `json:"mime"`
Size int `json:"size"`
Hash OptNilString `json:"hash"`
Status ImageStatus `json:"status"`
Variants []Variant `json:"variants"`
CreatedAt time.Time `json:"createdAt"`
ModifiedAt time.Time `json:"modifiedAt"`
}
Ref: #/components/schemas/Image
func (*Image) GetCreatedAt ¶
GetCreatedAt returns the value of CreatedAt.
func (*Image) GetModifiedAt ¶
GetModifiedAt returns the value of ModifiedAt.
func (*Image) GetOwnerId ¶
GetOwnerId returns the value of OwnerId.
func (*Image) GetOwnerType ¶
GetOwnerType returns the value of OwnerType.
func (*Image) GetStatus ¶
func (s *Image) GetStatus() ImageStatus
GetStatus returns the value of Status.
func (*Image) GetVariants ¶
GetVariants returns the value of Variants.
func (*Image) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*Image) SetCreatedAt ¶
SetCreatedAt sets the value of CreatedAt.
func (*Image) SetModifiedAt ¶
SetModifiedAt sets the value of ModifiedAt.
func (*Image) SetOwnerId ¶
SetOwnerId sets the value of OwnerId.
func (*Image) SetOwnerType ¶
SetOwnerType sets the value of OwnerType.
func (*Image) SetStatus ¶
func (s *Image) SetStatus(val ImageStatus)
SetStatus sets the value of Status.
func (*Image) SetVariants ¶
SetVariants sets the value of Variants.
func (*Image) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type ImageRole ¶
type ImageRole string
Ref: #/components/schemas/ImageRole
func (ImageRole) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (ImageRole) MarshalText ¶
MarshalText implements encoding.TextMarshaler.
func (*ImageRole) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
func (*ImageRole) UnmarshalText ¶
UnmarshalText implements encoding.TextUnmarshaler.
type ImageStatus ¶
type ImageStatus string
Ref: #/components/schemas/ImageStatus
const ( ImageStatusUploaded ImageStatus = "uploaded" ImageStatusReady ImageStatus = "ready" ImageStatusDeleted ImageStatus = "deleted" )
func (ImageStatus) AllValues ¶
func (ImageStatus) AllValues() []ImageStatus
AllValues returns all ImageStatus values.
func (*ImageStatus) Decode ¶
func (s *ImageStatus) Decode(d *jx.Decoder) error
Decode decodes ImageStatus from json.
func (ImageStatus) Encode ¶
func (s ImageStatus) Encode(e *jx.Encoder)
Encode encodes ImageStatus as json.
func (ImageStatus) MarshalJSON ¶
func (s ImageStatus) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (ImageStatus) MarshalText ¶
func (s ImageStatus) MarshalText() ([]byte, error)
MarshalText implements encoding.TextMarshaler.
func (*ImageStatus) UnmarshalJSON ¶
func (s *ImageStatus) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*ImageStatus) UnmarshalText ¶
func (s *ImageStatus) UnmarshalText(data []byte) error
UnmarshalText implements encoding.TextUnmarshaler.
func (ImageStatus) Validate ¶
func (s ImageStatus) Validate() error
type Invoker ¶
type Invoker interface {
// ConfirmUpload invokes confirmUpload operation.
//
// Confirm upload (HEAD against S3), persist metadata.
//
// POST /v1/images/confirm
ConfirmUpload(ctx context.Context, request *ConfirmRequest) (ConfirmUploadRes, error)
// CreatePresign invokes createPresign operation.
//
// Create a POST policy for uploading an image to MinIO/S3 with size validation.
//
// POST /v1/images/presign
CreatePresign(ctx context.Context, request *PresignRequest) (CreatePresignRes, error)
// DeleteImage invokes deleteImage operation.
//
// Delete image (soft or hard, per policy).
//
// DELETE /v1/images/{id}
DeleteImage(ctx context.Context, params DeleteImageParams) (DeleteImageRes, error)
// GetDeliveryUrl invokes getDeliveryUrl operation.
//
// Generate a signed imgproxy URL for delivery with requested params.
//
// GET /v1/images/{id}/url
GetDeliveryUrl(ctx context.Context, params GetDeliveryUrlParams) (GetDeliveryUrlRes, error)
// GetImage invokes getImage operation.
//
// Get image metadata.
//
// GET /v1/images/{id}
GetImage(ctx context.Context, params GetImageParams) (GetImageRes, error)
// PromoteImages invokes promoteImages operation.
//
// Promote images from a product draft to a final product.
//
// POST /v1/images/promote
PromoteImages(ctx context.Context, request *PromoteRequest) (PromoteImagesRes, 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 ( ConfirmUploadOperation OperationName = "ConfirmUpload" CreatePresignOperation OperationName = "CreatePresign" DeleteImageOperation OperationName = "DeleteImage" GetDeliveryUrlOperation OperationName = "GetDeliveryUrl" GetImageOperation OperationName = "GetImage" PromoteImagesOperation OperationName = "PromoteImages" )
type OptBool ¶
OptBool is optional bool.
func NewOptBool ¶
NewOptBool returns new OptBool with value set to v.
type OptDateTime ¶
OptDateTime is optional time.Time.
func NewOptDateTime ¶
func NewOptDateTime(v time.Time) OptDateTime
NewOptDateTime returns new OptDateTime with value set to v.
func (OptDateTime) Get ¶
func (o OptDateTime) Get() (v time.Time, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptDateTime) IsSet ¶
func (o OptDateTime) IsSet() bool
IsSet returns true if OptDateTime was set.
func (OptDateTime) MarshalJSON ¶
func (s OptDateTime) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (OptDateTime) Or ¶
func (o OptDateTime) Or(d time.Time) time.Time
Or returns value if set, or given parameter if does not.
func (*OptDateTime) UnmarshalJSON ¶
func (s *OptDateTime) UnmarshalJSON(data []byte) error
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) 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) Or ¶
func (o OptFloat64) Or(d float64) float64
Or returns value if set, or given parameter if does not.
type OptGetDeliveryUrlFit ¶
type OptGetDeliveryUrlFit struct {
Value GetDeliveryUrlFit
Set bool
}
OptGetDeliveryUrlFit is optional GetDeliveryUrlFit.
func NewOptGetDeliveryUrlFit ¶
func NewOptGetDeliveryUrlFit(v GetDeliveryUrlFit) OptGetDeliveryUrlFit
NewOptGetDeliveryUrlFit returns new OptGetDeliveryUrlFit with value set to v.
func (OptGetDeliveryUrlFit) Get ¶
func (o OptGetDeliveryUrlFit) Get() (v GetDeliveryUrlFit, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptGetDeliveryUrlFit) IsSet ¶
func (o OptGetDeliveryUrlFit) IsSet() bool
IsSet returns true if OptGetDeliveryUrlFit was set.
func (OptGetDeliveryUrlFit) Or ¶
func (o OptGetDeliveryUrlFit) Or(d GetDeliveryUrlFit) GetDeliveryUrlFit
Or returns value if set, or given parameter if does not.
func (*OptGetDeliveryUrlFit) SetTo ¶
func (o *OptGetDeliveryUrlFit) SetTo(v GetDeliveryUrlFit)
SetTo sets value to v.
type OptGetDeliveryUrlFormat ¶
type OptGetDeliveryUrlFormat struct {
Value GetDeliveryUrlFormat
Set bool
}
OptGetDeliveryUrlFormat is optional GetDeliveryUrlFormat.
func NewOptGetDeliveryUrlFormat ¶
func NewOptGetDeliveryUrlFormat(v GetDeliveryUrlFormat) OptGetDeliveryUrlFormat
NewOptGetDeliveryUrlFormat returns new OptGetDeliveryUrlFormat with value set to v.
func (OptGetDeliveryUrlFormat) Get ¶
func (o OptGetDeliveryUrlFormat) Get() (v GetDeliveryUrlFormat, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptGetDeliveryUrlFormat) IsSet ¶
func (o OptGetDeliveryUrlFormat) IsSet() bool
IsSet returns true if OptGetDeliveryUrlFormat was set.
func (OptGetDeliveryUrlFormat) Or ¶
func (o OptGetDeliveryUrlFormat) Or(d GetDeliveryUrlFormat) GetDeliveryUrlFormat
Or returns value if set, or given parameter if does not.
func (*OptGetDeliveryUrlFormat) Reset ¶
func (o *OptGetDeliveryUrlFormat) Reset()
Reset unsets value.
func (*OptGetDeliveryUrlFormat) SetTo ¶
func (o *OptGetDeliveryUrlFormat) SetTo(v GetDeliveryUrlFormat)
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 OptNilString ¶
OptNilString is optional nullable string.
func NewOptNilString ¶
func NewOptNilString(v string) OptNilString
NewOptNilString returns new OptNilString with value set to v.
func (*OptNilString) Decode ¶
func (o *OptNilString) Decode(d *jx.Decoder) error
Decode decodes string from json.
func (OptNilString) Encode ¶
func (o OptNilString) Encode(e *jx.Encoder)
Encode encodes string as json.
func (OptNilString) Get ¶
func (o OptNilString) Get() (v string, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptNilString) IsNull ¶
func (o OptNilString) IsNull() bool
IsNull returns true if value is Null.
func (OptNilString) IsSet ¶
func (o OptNilString) IsSet() bool
IsSet returns true if OptNilString was set.
func (OptNilString) MarshalJSON ¶
func (s OptNilString) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (OptNilString) Or ¶
func (o OptNilString) Or(d string) string
Or returns value if set, or given parameter if does not.
func (*OptNilString) UnmarshalJSON ¶
func (s *OptNilString) UnmarshalJSON(data []byte) error
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 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 OwnerType ¶
type OwnerType string
Ref: #/components/schemas/OwnerType
func (OwnerType) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (OwnerType) MarshalText ¶
MarshalText implements encoding.TextMarshaler.
func (*OwnerType) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
func (*OwnerType) UnmarshalText ¶
UnmarshalText implements encoding.TextUnmarshaler.
type PresignRequest ¶
type PresignRequest struct {
OwnerType OwnerType `json:"ownerType"`
// Draft ID or owner ID.
OwnerId string `json:"ownerId"`
Filename string `json:"filename"`
ContentType PresignRequestContentType `json:"contentType"`
// Size in bytes.
Size int `json:"size"`
Role ImageRole `json:"role"`
}
Ref: #/components/schemas/PresignRequest
func (*PresignRequest) Decode ¶
func (s *PresignRequest) Decode(d *jx.Decoder) error
Decode decodes PresignRequest from json.
func (*PresignRequest) Encode ¶
func (s *PresignRequest) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*PresignRequest) GetContentType ¶
func (s *PresignRequest) GetContentType() PresignRequestContentType
GetContentType returns the value of ContentType.
func (*PresignRequest) GetFilename ¶
func (s *PresignRequest) GetFilename() string
GetFilename returns the value of Filename.
func (*PresignRequest) GetOwnerId ¶
func (s *PresignRequest) GetOwnerId() string
GetOwnerId returns the value of OwnerId.
func (*PresignRequest) GetOwnerType ¶
func (s *PresignRequest) GetOwnerType() OwnerType
GetOwnerType returns the value of OwnerType.
func (*PresignRequest) GetRole ¶
func (s *PresignRequest) GetRole() ImageRole
GetRole returns the value of Role.
func (*PresignRequest) GetSize ¶
func (s *PresignRequest) GetSize() int
GetSize returns the value of Size.
func (*PresignRequest) MarshalJSON ¶
func (s *PresignRequest) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*PresignRequest) SetContentType ¶
func (s *PresignRequest) SetContentType(val PresignRequestContentType)
SetContentType sets the value of ContentType.
func (*PresignRequest) SetFilename ¶
func (s *PresignRequest) SetFilename(val string)
SetFilename sets the value of Filename.
func (*PresignRequest) SetOwnerId ¶
func (s *PresignRequest) SetOwnerId(val string)
SetOwnerId sets the value of OwnerId.
func (*PresignRequest) SetOwnerType ¶
func (s *PresignRequest) SetOwnerType(val OwnerType)
SetOwnerType sets the value of OwnerType.
func (*PresignRequest) SetRole ¶
func (s *PresignRequest) SetRole(val ImageRole)
SetRole sets the value of Role.
func (*PresignRequest) SetSize ¶
func (s *PresignRequest) SetSize(val int)
SetSize sets the value of Size.
func (*PresignRequest) UnmarshalJSON ¶
func (s *PresignRequest) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*PresignRequest) Validate ¶
func (s *PresignRequest) Validate() error
type PresignRequestContentType ¶
type PresignRequestContentType string
const ( PresignRequestContentTypeImageJpeg PresignRequestContentType = "image/jpeg" PresignRequestContentTypeImagePNG PresignRequestContentType = "image/png" PresignRequestContentTypeImageWEBP PresignRequestContentType = "image/webp" PresignRequestContentTypeImageAvif PresignRequestContentType = "image/avif" )
func (PresignRequestContentType) AllValues ¶
func (PresignRequestContentType) AllValues() []PresignRequestContentType
AllValues returns all PresignRequestContentType values.
func (*PresignRequestContentType) Decode ¶
func (s *PresignRequestContentType) Decode(d *jx.Decoder) error
Decode decodes PresignRequestContentType from json.
func (PresignRequestContentType) Encode ¶
func (s PresignRequestContentType) Encode(e *jx.Encoder)
Encode encodes PresignRequestContentType as json.
func (PresignRequestContentType) MarshalJSON ¶
func (s PresignRequestContentType) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (PresignRequestContentType) MarshalText ¶
func (s PresignRequestContentType) MarshalText() ([]byte, error)
MarshalText implements encoding.TextMarshaler.
func (*PresignRequestContentType) UnmarshalJSON ¶
func (s *PresignRequestContentType) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*PresignRequestContentType) UnmarshalText ¶
func (s *PresignRequestContentType) UnmarshalText(data []byte) error
UnmarshalText implements encoding.TextUnmarshaler.
func (PresignRequestContentType) Validate ¶
func (s PresignRequestContentType) Validate() error
type PresignResponse ¶
type PresignResponse struct {
// URL to POST the file to (multipart/form-data).
UploadUrl url.URL `json:"uploadUrl"`
// Signed JWT token for confirm endpoint (contains key, ownerType, ownerId, role, etc.).
UploadToken string `json:"uploadToken"`
// TTL in seconds.
ExpiresIn int `json:"expiresIn"`
// Form fields to include with POST upload. Must be sent BEFORE the file field.
// Includes: key, Content-Type, policy, x-amz-algorithm, x-amz-credential, x-amz-date, x-amz-signature.
FormData PresignResponseFormData `json:"formData"`
}
Ref: #/components/schemas/PresignResponse
func (*PresignResponse) Decode ¶
func (s *PresignResponse) Decode(d *jx.Decoder) error
Decode decodes PresignResponse from json.
func (*PresignResponse) Encode ¶
func (s *PresignResponse) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*PresignResponse) GetExpiresIn ¶
func (s *PresignResponse) GetExpiresIn() int
GetExpiresIn returns the value of ExpiresIn.
func (*PresignResponse) GetFormData ¶
func (s *PresignResponse) GetFormData() PresignResponseFormData
GetFormData returns the value of FormData.
func (*PresignResponse) GetUploadToken ¶
func (s *PresignResponse) GetUploadToken() string
GetUploadToken returns the value of UploadToken.
func (*PresignResponse) GetUploadUrl ¶
func (s *PresignResponse) GetUploadUrl() url.URL
GetUploadUrl returns the value of UploadUrl.
func (*PresignResponse) MarshalJSON ¶
func (s *PresignResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*PresignResponse) SetExpiresIn ¶
func (s *PresignResponse) SetExpiresIn(val int)
SetExpiresIn sets the value of ExpiresIn.
func (*PresignResponse) SetFormData ¶
func (s *PresignResponse) SetFormData(val PresignResponseFormData)
SetFormData sets the value of FormData.
func (*PresignResponse) SetUploadToken ¶
func (s *PresignResponse) SetUploadToken(val string)
SetUploadToken sets the value of UploadToken.
func (*PresignResponse) SetUploadUrl ¶
func (s *PresignResponse) SetUploadUrl(val url.URL)
SetUploadUrl sets the value of UploadUrl.
func (*PresignResponse) UnmarshalJSON ¶
func (s *PresignResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type PresignResponseFormData ¶
Form fields to include with POST upload. Must be sent BEFORE the file field. Includes: key, Content-Type, policy, x-amz-algorithm, x-amz-credential, x-amz-date, x-amz-signature.
func (*PresignResponseFormData) Decode ¶
func (s *PresignResponseFormData) Decode(d *jx.Decoder) error
Decode decodes PresignResponseFormData from json.
func (PresignResponseFormData) Encode ¶
func (s PresignResponseFormData) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (PresignResponseFormData) MarshalJSON ¶
func (s PresignResponseFormData) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*PresignResponseFormData) UnmarshalJSON ¶
func (s *PresignResponseFormData) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
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 PromoteImagesBadRequest ¶
type PromoteImagesBadRequest Problem
func (*PromoteImagesBadRequest) Decode ¶
func (s *PromoteImagesBadRequest) Decode(d *jx.Decoder) error
Decode decodes PromoteImagesBadRequest from json.
func (*PromoteImagesBadRequest) Encode ¶
func (s *PromoteImagesBadRequest) Encode(e *jx.Encoder)
Encode encodes PromoteImagesBadRequest as json.
func (*PromoteImagesBadRequest) MarshalJSON ¶
func (s *PromoteImagesBadRequest) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*PromoteImagesBadRequest) UnmarshalJSON ¶
func (s *PromoteImagesBadRequest) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type PromoteImagesConflict ¶
type PromoteImagesConflict Problem
func (*PromoteImagesConflict) Decode ¶
func (s *PromoteImagesConflict) Decode(d *jx.Decoder) error
Decode decodes PromoteImagesConflict from json.
func (*PromoteImagesConflict) Encode ¶
func (s *PromoteImagesConflict) Encode(e *jx.Encoder)
Encode encodes PromoteImagesConflict as json.
func (*PromoteImagesConflict) MarshalJSON ¶
func (s *PromoteImagesConflict) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*PromoteImagesConflict) UnmarshalJSON ¶
func (s *PromoteImagesConflict) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type PromoteImagesInternalServerError ¶
type PromoteImagesInternalServerError Problem
func (*PromoteImagesInternalServerError) Decode ¶
func (s *PromoteImagesInternalServerError) Decode(d *jx.Decoder) error
Decode decodes PromoteImagesInternalServerError from json.
func (*PromoteImagesInternalServerError) Encode ¶
func (s *PromoteImagesInternalServerError) Encode(e *jx.Encoder)
Encode encodes PromoteImagesInternalServerError as json.
func (*PromoteImagesInternalServerError) MarshalJSON ¶
func (s *PromoteImagesInternalServerError) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*PromoteImagesInternalServerError) UnmarshalJSON ¶
func (s *PromoteImagesInternalServerError) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type PromoteImagesNotFound ¶
type PromoteImagesNotFound Problem
func (*PromoteImagesNotFound) Decode ¶
func (s *PromoteImagesNotFound) Decode(d *jx.Decoder) error
Decode decodes PromoteImagesNotFound from json.
func (*PromoteImagesNotFound) Encode ¶
func (s *PromoteImagesNotFound) Encode(e *jx.Encoder)
Encode encodes PromoteImagesNotFound as json.
func (*PromoteImagesNotFound) MarshalJSON ¶
func (s *PromoteImagesNotFound) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*PromoteImagesNotFound) UnmarshalJSON ¶
func (s *PromoteImagesNotFound) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type PromoteImagesOK ¶
type PromoteImagesOK struct {
Promoted []Image `json:"promoted"`
}
func (*PromoteImagesOK) Decode ¶
func (s *PromoteImagesOK) Decode(d *jx.Decoder) error
Decode decodes PromoteImagesOK from json.
func (*PromoteImagesOK) Encode ¶
func (s *PromoteImagesOK) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*PromoteImagesOK) GetPromoted ¶
func (s *PromoteImagesOK) GetPromoted() []Image
GetPromoted returns the value of Promoted.
func (*PromoteImagesOK) MarshalJSON ¶
func (s *PromoteImagesOK) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*PromoteImagesOK) SetPromoted ¶
func (s *PromoteImagesOK) SetPromoted(val []Image)
SetPromoted sets the value of Promoted.
func (*PromoteImagesOK) UnmarshalJSON ¶
func (s *PromoteImagesOK) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*PromoteImagesOK) Validate ¶
func (s *PromoteImagesOK) Validate() error
type PromoteImagesRes ¶
type PromoteImagesRes interface {
// contains filtered or unexported methods
}
type PromoteRequest ¶
type PromoteRequest struct {
DraftId string `json:"draftId"`
ProductId string `json:"productId"`
// If true — copy to products/{productId}/... and remove old objects.
Move bool `json:"move"`
// If omitted — promote all images of the draft.
Images []string `json:"images"`
}
Ref: #/components/schemas/PromoteRequest
func (*PromoteRequest) Decode ¶
func (s *PromoteRequest) Decode(d *jx.Decoder) error
Decode decodes PromoteRequest from json.
func (*PromoteRequest) Encode ¶
func (s *PromoteRequest) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*PromoteRequest) GetDraftId ¶
func (s *PromoteRequest) GetDraftId() string
GetDraftId returns the value of DraftId.
func (*PromoteRequest) GetImages ¶
func (s *PromoteRequest) GetImages() []string
GetImages returns the value of Images.
func (*PromoteRequest) GetMove ¶
func (s *PromoteRequest) GetMove() bool
GetMove returns the value of Move.
func (*PromoteRequest) GetProductId ¶
func (s *PromoteRequest) GetProductId() string
GetProductId returns the value of ProductId.
func (*PromoteRequest) MarshalJSON ¶
func (s *PromoteRequest) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*PromoteRequest) SetDraftId ¶
func (s *PromoteRequest) SetDraftId(val string)
SetDraftId sets the value of DraftId.
func (*PromoteRequest) SetImages ¶
func (s *PromoteRequest) SetImages(val []string)
SetImages sets the value of Images.
func (*PromoteRequest) SetMove ¶
func (s *PromoteRequest) SetMove(val bool)
SetMove sets the value of Move.
func (*PromoteRequest) SetProductId ¶
func (s *PromoteRequest) SetProductId(val string)
SetProductId sets the value of ProductId.
func (*PromoteRequest) UnmarshalJSON ¶
func (s *PromoteRequest) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*PromoteRequest) Validate ¶
func (s *PromoteRequest) 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 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, opts ...ServerOption) (*Server, error)
NewServer creates new Server.
func ProvideServer ¶ added in v1.0.33
func ProvideServer( handler Handler, tracerProvider trace.TracerProvider, meterProvider metric.MeterProvider, middlewares []middleware.Middleware, errorHandler ogenerrors.ErrorHandler, ) (*Server, error)
ProvideServer creates an ogen server 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 UnimplementedHandler ¶
type UnimplementedHandler struct{}
UnimplementedHandler is no-op Handler which returns http.ErrNotImplemented.
func (UnimplementedHandler) ConfirmUpload ¶
func (UnimplementedHandler) ConfirmUpload(ctx context.Context, req *ConfirmRequest) (r ConfirmUploadRes, _ error)
ConfirmUpload implements confirmUpload operation.
Confirm upload (HEAD against S3), persist metadata.
POST /v1/images/confirm
func (UnimplementedHandler) CreatePresign ¶
func (UnimplementedHandler) CreatePresign(ctx context.Context, req *PresignRequest) (r CreatePresignRes, _ error)
CreatePresign implements createPresign operation.
Create a POST policy for uploading an image to MinIO/S3 with size validation.
POST /v1/images/presign
func (UnimplementedHandler) DeleteImage ¶
func (UnimplementedHandler) DeleteImage(ctx context.Context, params DeleteImageParams) (r DeleteImageRes, _ error)
DeleteImage implements deleteImage operation.
Delete image (soft or hard, per policy).
DELETE /v1/images/{id}
func (UnimplementedHandler) GetDeliveryUrl ¶
func (UnimplementedHandler) GetDeliveryUrl(ctx context.Context, params GetDeliveryUrlParams) (r GetDeliveryUrlRes, _ error)
GetDeliveryUrl implements getDeliveryUrl operation.
Generate a signed imgproxy URL for delivery with requested params.
GET /v1/images/{id}/url
func (UnimplementedHandler) GetImage ¶
func (UnimplementedHandler) GetImage(ctx context.Context, params GetImageParams) (r GetImageRes, _ error)
GetImage implements getImage operation.
Get image metadata.
GET /v1/images/{id}
func (UnimplementedHandler) PromoteImages ¶
func (UnimplementedHandler) PromoteImages(ctx context.Context, req *PromoteRequest) (r PromoteImagesRes, _ error)
PromoteImages implements promoteImages operation.
Promote images from a product draft to a final product.
POST /v1/images/promote
type Variant ¶
type Variant struct {
Name OptString `json:"name"`
// S3 key of the variant.
Key OptString `json:"key"`
Width OptInt `json:"width"`
Height OptInt `json:"height"`
Mime OptString `json:"mime"`
Size OptInt `json:"size"`
}
Ref: #/components/schemas/Variant
func (*Variant) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*Variant) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
Source Files
¶
- oas_cfg_gen.go
- oas_client_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_server_gen.go
- oas_server_provider.gen.go
- oas_unimplemented_gen.go
- oas_validators_gen.go
- openapi_embed.gen.go