api

package
v1.18.0 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2025 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithServerURL

func WithServerURL(ctx context.Context, u *url.URL) context.Context

WithServerURL sets context key to override server URL.

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) CreateIntegrationItems

func (c *Client) CreateIntegrationItems(ctx context.Context, request *CreateIntegrationItemsReq) (*CreateIntegrationItemsOK, error)

CreateIntegrationItems invokes createIntegrationItems operation.

Create items with all field types.

POST /integration/test

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 ComprehensiveItem

type ComprehensiveItem struct {
	// Unique identifier.
	ID string `json:"id"`
	// Item name.
	Name string `json:"name"`
	// Priority level.
	Priority int `json:"priority"`
	// Active status.
	Active bool `json:"active"`
	// Optional description.
	Description OptString `json:"description"`
	// Optional score.
	Score OptFloat64 `json:"score"`
	// External system ID (nullable).
	ExternalId OptNilString `json:"externalId"`
	// Item status.
	Status OptComprehensiveItemStatus `json:"status"`
	// Optional category.
	Category OptComprehensiveItemCategory `json:"category"`
	// List of tags.
	Tags []string `json:"tags"`
	// Optional labels.
	Labels []string `json:"labels"`
	// Key-value metadata.
	Metadata OptComprehensiveItemMetadata `json:"metadata"`
	// Optional custom fields.
	CustomFields OptComprehensiveItemCustomFields `json:"customFields"`
	// Item owner.
	Owner OptUser `json:"owner"`
	// Optional assignee.
	Assignee OptUser `json:"assignee"`
	// List of watchers.
	Watchers []User `json:"watchers"`
	// Item configuration.
	Configuration OptConfiguration `json:"configuration"`
}

Item with all field type categories. Ref: #/components/schemas/ComprehensiveItem

func (*ComprehensiveItem) Decode

func (s *ComprehensiveItem) Decode(d *jx.Decoder) error

Decode decodes ComprehensiveItem from json.

func (*ComprehensiveItem) Encode

func (s *ComprehensiveItem) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (ComprehensiveItem) Equal

func (a ComprehensiveItem) Equal(b ComprehensiveItem, depth int) bool

Equal compares two ComprehensiveItem instances for equality. The depth parameter prevents infinite recursion on nested objects.

func (*ComprehensiveItem) GetActive

func (s *ComprehensiveItem) GetActive() bool

GetActive returns the value of Active.

func (*ComprehensiveItem) GetAssignee

func (s *ComprehensiveItem) GetAssignee() OptUser

GetAssignee returns the value of Assignee.

func (*ComprehensiveItem) GetCategory

GetCategory returns the value of Category.

func (*ComprehensiveItem) GetConfiguration

func (s *ComprehensiveItem) GetConfiguration() OptConfiguration

GetConfiguration returns the value of Configuration.

func (*ComprehensiveItem) GetCustomFields

GetCustomFields returns the value of CustomFields.

func (*ComprehensiveItem) GetDescription

func (s *ComprehensiveItem) GetDescription() OptString

GetDescription returns the value of Description.

func (*ComprehensiveItem) GetExternalId

func (s *ComprehensiveItem) GetExternalId() OptNilString

GetExternalId returns the value of ExternalId.

func (*ComprehensiveItem) GetID

func (s *ComprehensiveItem) GetID() string

GetID returns the value of ID.

func (*ComprehensiveItem) GetLabels

func (s *ComprehensiveItem) GetLabels() []string

GetLabels returns the value of Labels.

func (*ComprehensiveItem) GetMetadata

GetMetadata returns the value of Metadata.

func (*ComprehensiveItem) GetName

func (s *ComprehensiveItem) GetName() string

GetName returns the value of Name.

func (*ComprehensiveItem) GetOwner

func (s *ComprehensiveItem) GetOwner() OptUser

GetOwner returns the value of Owner.

func (*ComprehensiveItem) GetPriority

func (s *ComprehensiveItem) GetPriority() int

GetPriority returns the value of Priority.

func (*ComprehensiveItem) GetScore

func (s *ComprehensiveItem) GetScore() OptFloat64

GetScore returns the value of Score.

func (*ComprehensiveItem) GetStatus

GetStatus returns the value of Status.

func (*ComprehensiveItem) GetTags

func (s *ComprehensiveItem) GetTags() []string

GetTags returns the value of Tags.

func (*ComprehensiveItem) GetWatchers

func (s *ComprehensiveItem) GetWatchers() []User

GetWatchers returns the value of Watchers.

func (ComprehensiveItem) Hash

func (a ComprehensiveItem) Hash() uint64

Hash computes a hash value for ComprehensiveItem using FNV-1a. Equal objects must produce equal hashes.

func (*ComprehensiveItem) MarshalJSON

func (s *ComprehensiveItem) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ComprehensiveItem) SetActive

func (s *ComprehensiveItem) SetActive(val bool)

SetActive sets the value of Active.

func (*ComprehensiveItem) SetAssignee

func (s *ComprehensiveItem) SetAssignee(val OptUser)

SetAssignee sets the value of Assignee.

func (*ComprehensiveItem) SetCategory

func (s *ComprehensiveItem) SetCategory(val OptComprehensiveItemCategory)

SetCategory sets the value of Category.

func (*ComprehensiveItem) SetConfiguration

func (s *ComprehensiveItem) SetConfiguration(val OptConfiguration)

SetConfiguration sets the value of Configuration.

func (*ComprehensiveItem) SetCustomFields

func (s *ComprehensiveItem) SetCustomFields(val OptComprehensiveItemCustomFields)

SetCustomFields sets the value of CustomFields.

func (*ComprehensiveItem) SetDescription

func (s *ComprehensiveItem) SetDescription(val OptString)

SetDescription sets the value of Description.

func (*ComprehensiveItem) SetExternalId

func (s *ComprehensiveItem) SetExternalId(val OptNilString)

SetExternalId sets the value of ExternalId.

func (*ComprehensiveItem) SetID

func (s *ComprehensiveItem) SetID(val string)

SetID sets the value of ID.

func (*ComprehensiveItem) SetLabels

func (s *ComprehensiveItem) SetLabels(val []string)

SetLabels sets the value of Labels.

func (*ComprehensiveItem) SetMetadata

func (s *ComprehensiveItem) SetMetadata(val OptComprehensiveItemMetadata)

SetMetadata sets the value of Metadata.

func (*ComprehensiveItem) SetName

func (s *ComprehensiveItem) SetName(val string)

SetName sets the value of Name.

func (*ComprehensiveItem) SetOwner

func (s *ComprehensiveItem) SetOwner(val OptUser)

SetOwner sets the value of Owner.

func (*ComprehensiveItem) SetPriority

func (s *ComprehensiveItem) SetPriority(val int)

SetPriority sets the value of Priority.

func (*ComprehensiveItem) SetScore

func (s *ComprehensiveItem) SetScore(val OptFloat64)

SetScore sets the value of Score.

func (*ComprehensiveItem) SetStatus

SetStatus sets the value of Status.

func (*ComprehensiveItem) SetTags

func (s *ComprehensiveItem) SetTags(val []string)

SetTags sets the value of Tags.

func (*ComprehensiveItem) SetWatchers

func (s *ComprehensiveItem) SetWatchers(val []User)

SetWatchers sets the value of Watchers.

func (*ComprehensiveItem) UnmarshalJSON

func (s *ComprehensiveItem) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*ComprehensiveItem) Validate

func (s *ComprehensiveItem) Validate() error

type ComprehensiveItemCategory

type ComprehensiveItemCategory string

Optional category.

const (
	ComprehensiveItemCategoryFeature ComprehensiveItemCategory = "feature"
	ComprehensiveItemCategoryBug     ComprehensiveItemCategory = "bug"
	ComprehensiveItemCategoryTask    ComprehensiveItemCategory = "task"
)

func (ComprehensiveItemCategory) AllValues

AllValues returns all ComprehensiveItemCategory values.

func (*ComprehensiveItemCategory) Decode

func (s *ComprehensiveItemCategory) Decode(d *jx.Decoder) error

Decode decodes ComprehensiveItemCategory from json.

func (ComprehensiveItemCategory) Encode

func (s ComprehensiveItemCategory) Encode(e *jx.Encoder)

Encode encodes ComprehensiveItemCategory as json.

func (ComprehensiveItemCategory) MarshalJSON

func (s ComprehensiveItemCategory) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (ComprehensiveItemCategory) MarshalText

func (s ComprehensiveItemCategory) MarshalText() ([]byte, error)

MarshalText implements encoding.TextMarshaler.

func (*ComprehensiveItemCategory) UnmarshalJSON

func (s *ComprehensiveItemCategory) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*ComprehensiveItemCategory) UnmarshalText

func (s *ComprehensiveItemCategory) UnmarshalText(data []byte) error

UnmarshalText implements encoding.TextUnmarshaler.

func (ComprehensiveItemCategory) Validate

func (s ComprehensiveItemCategory) Validate() error

type ComprehensiveItemCustomFields

type ComprehensiveItemCustomFields map[string]string

Optional custom fields.

func (*ComprehensiveItemCustomFields) Decode

Decode decodes ComprehensiveItemCustomFields from json.

func (ComprehensiveItemCustomFields) Encode

Encode implements json.Marshaler.

func (ComprehensiveItemCustomFields) MarshalJSON

func (s ComprehensiveItemCustomFields) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ComprehensiveItemCustomFields) UnmarshalJSON

func (s *ComprehensiveItemCustomFields) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type ComprehensiveItemMetadata

type ComprehensiveItemMetadata map[string]string

Key-value metadata.

func (*ComprehensiveItemMetadata) Decode

func (s *ComprehensiveItemMetadata) Decode(d *jx.Decoder) error

Decode decodes ComprehensiveItemMetadata from json.

func (ComprehensiveItemMetadata) Encode

func (s ComprehensiveItemMetadata) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (ComprehensiveItemMetadata) MarshalJSON

func (s ComprehensiveItemMetadata) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ComprehensiveItemMetadata) UnmarshalJSON

func (s *ComprehensiveItemMetadata) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type ComprehensiveItemStatus

type ComprehensiveItemStatus string

Item status.

const (
	ComprehensiveItemStatusDraft     ComprehensiveItemStatus = "draft"
	ComprehensiveItemStatusPublished ComprehensiveItemStatus = "published"
	ComprehensiveItemStatusArchived  ComprehensiveItemStatus = "archived"
)

func (ComprehensiveItemStatus) AllValues

AllValues returns all ComprehensiveItemStatus values.

func (*ComprehensiveItemStatus) Decode

func (s *ComprehensiveItemStatus) Decode(d *jx.Decoder) error

Decode decodes ComprehensiveItemStatus from json.

func (ComprehensiveItemStatus) Encode

func (s ComprehensiveItemStatus) Encode(e *jx.Encoder)

Encode encodes ComprehensiveItemStatus as json.

func (ComprehensiveItemStatus) MarshalJSON

func (s ComprehensiveItemStatus) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (ComprehensiveItemStatus) MarshalText

func (s ComprehensiveItemStatus) MarshalText() ([]byte, error)

MarshalText implements encoding.TextMarshaler.

func (*ComprehensiveItemStatus) UnmarshalJSON

func (s *ComprehensiveItemStatus) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*ComprehensiveItemStatus) UnmarshalText

func (s *ComprehensiveItemStatus) UnmarshalText(data []byte) error

UnmarshalText implements encoding.TextUnmarshaler.

func (ComprehensiveItemStatus) Validate

func (s ComprehensiveItemStatus) Validate() error

type Configuration

type Configuration struct {
	Version  OptString                `json:"version"`
	Settings OptConfigurationSettings `json:"settings"`
	Features []Feature                `json:"features"`
}

Complex configuration with nested objects and maps. Ref: #/components/schemas/Configuration

func (*Configuration) Decode

func (s *Configuration) Decode(d *jx.Decoder) error

Decode decodes Configuration from json.

func (*Configuration) Encode

func (s *Configuration) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (Configuration) Equal

func (a Configuration) Equal(b Configuration, depth int) bool

Equal compares two Configuration instances for equality. The depth parameter prevents infinite recursion on nested objects.

func (*Configuration) GetFeatures

func (s *Configuration) GetFeatures() []Feature

GetFeatures returns the value of Features.

func (*Configuration) GetSettings

func (s *Configuration) GetSettings() OptConfigurationSettings

GetSettings returns the value of Settings.

func (*Configuration) GetVersion

func (s *Configuration) GetVersion() OptString

GetVersion returns the value of Version.

func (Configuration) Hash

func (a Configuration) Hash() uint64

Hash computes a hash value for Configuration using FNV-1a. Equal objects must produce equal hashes.

func (*Configuration) MarshalJSON

func (s *Configuration) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*Configuration) SetFeatures

func (s *Configuration) SetFeatures(val []Feature)

SetFeatures sets the value of Features.

func (*Configuration) SetSettings

func (s *Configuration) SetSettings(val OptConfigurationSettings)

SetSettings sets the value of Settings.

func (*Configuration) SetVersion

func (s *Configuration) SetVersion(val OptString)

SetVersion sets the value of Version.

func (*Configuration) UnmarshalJSON

func (s *Configuration) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type ConfigurationSettings

type ConfigurationSettings map[string]string

func (*ConfigurationSettings) Decode

func (s *ConfigurationSettings) Decode(d *jx.Decoder) error

Decode decodes ConfigurationSettings from json.

func (ConfigurationSettings) Encode

func (s ConfigurationSettings) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (ConfigurationSettings) MarshalJSON

func (s ConfigurationSettings) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ConfigurationSettings) UnmarshalJSON

func (s *ConfigurationSettings) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type CreateIntegrationItemsOK

type CreateIntegrationItemsOK struct {
	Created OptInt `json:"created"`
}

func (*CreateIntegrationItemsOK) Decode

func (s *CreateIntegrationItemsOK) Decode(d *jx.Decoder) error

Decode decodes CreateIntegrationItemsOK from json.

func (*CreateIntegrationItemsOK) Encode

func (s *CreateIntegrationItemsOK) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*CreateIntegrationItemsOK) GetCreated

func (s *CreateIntegrationItemsOK) GetCreated() OptInt

GetCreated returns the value of Created.

func (*CreateIntegrationItemsOK) MarshalJSON

func (s *CreateIntegrationItemsOK) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*CreateIntegrationItemsOK) SetCreated

func (s *CreateIntegrationItemsOK) SetCreated(val OptInt)

SetCreated sets the value of Created.

func (*CreateIntegrationItemsOK) UnmarshalJSON

func (s *CreateIntegrationItemsOK) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type CreateIntegrationItemsReq

type CreateIntegrationItemsReq struct {
	Items []ComprehensiveItem `json:"items"`
}

func (*CreateIntegrationItemsReq) Decode

func (s *CreateIntegrationItemsReq) Decode(d *jx.Decoder) error

Decode decodes CreateIntegrationItemsReq from json.

func (*CreateIntegrationItemsReq) Encode

func (s *CreateIntegrationItemsReq) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*CreateIntegrationItemsReq) GetItems

GetItems returns the value of Items.

func (*CreateIntegrationItemsReq) MarshalJSON

func (s *CreateIntegrationItemsReq) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*CreateIntegrationItemsReq) SetItems

func (s *CreateIntegrationItemsReq) SetItems(val []ComprehensiveItem)

SetItems sets the value of Items.

func (*CreateIntegrationItemsReq) UnmarshalJSON

func (s *CreateIntegrationItemsReq) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*CreateIntegrationItemsReq) Validate

func (s *CreateIntegrationItemsReq) Validate() error

type ErrorHandler

type ErrorHandler = ogenerrors.ErrorHandler

ErrorHandler is error handler.

type Feature

type Feature struct {
	Name       OptString            `json:"name"`
	Enabled    OptBool              `json:"enabled"`
	Parameters OptFeatureParameters `json:"parameters"`
}

Feature flag. Ref: #/components/schemas/Feature

func (*Feature) Decode

func (s *Feature) Decode(d *jx.Decoder) error

Decode decodes Feature from json.

func (*Feature) Encode

func (s *Feature) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (Feature) Equal

func (a Feature) Equal(b Feature, depth int) bool

Equal compares two Feature instances for equality. The depth parameter prevents infinite recursion on nested objects.

func (*Feature) GetEnabled

func (s *Feature) GetEnabled() OptBool

GetEnabled returns the value of Enabled.

func (*Feature) GetName

func (s *Feature) GetName() OptString

GetName returns the value of Name.

func (*Feature) GetParameters

func (s *Feature) GetParameters() OptFeatureParameters

GetParameters returns the value of Parameters.

func (Feature) Hash

func (a Feature) Hash() uint64

Hash computes a hash value for Feature using FNV-1a. Equal objects must produce equal hashes.

func (*Feature) MarshalJSON

func (s *Feature) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*Feature) SetEnabled

func (s *Feature) SetEnabled(val OptBool)

SetEnabled sets the value of Enabled.

func (*Feature) SetName

func (s *Feature) SetName(val OptString)

SetName sets the value of Name.

func (*Feature) SetParameters

func (s *Feature) SetParameters(val OptFeatureParameters)

SetParameters sets the value of Parameters.

func (*Feature) UnmarshalJSON

func (s *Feature) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type FeatureParameters

type FeatureParameters map[string]string

func (*FeatureParameters) Decode

func (s *FeatureParameters) Decode(d *jx.Decoder) error

Decode decodes FeatureParameters from json.

func (FeatureParameters) Encode

func (s FeatureParameters) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (FeatureParameters) MarshalJSON

func (s FeatureParameters) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*FeatureParameters) UnmarshalJSON

func (s *FeatureParameters) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type Handler

type Handler interface {
	// CreateIntegrationItems implements createIntegrationItems operation.
	//
	// Create items with all field types.
	//
	// POST /integration/test
	CreateIntegrationItems(ctx context.Context, req *CreateIntegrationItemsReq) (*CreateIntegrationItemsOK, error)
}

Handler handles operations described by OpenAPI v3 specification.

type Invoker

type Invoker interface {
	// CreateIntegrationItems invokes createIntegrationItems operation.
	//
	// Create items with all field types.
	//
	// POST /integration/test
	CreateIntegrationItems(ctx context.Context, request *CreateIntegrationItemsReq) (*CreateIntegrationItemsOK, 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

func LabelerFromContext(ctx context.Context) (*Labeler, bool)

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) Add

func (l *Labeler) Add(attrs ...attribute.KeyValue)

Add attributes to the Labeler.

func (*Labeler) AttributeSet

func (l *Labeler) AttributeSet() attribute.Set

AttributeSet returns the attributes added to the Labeler as an attribute.Set.

type Middleware

type Middleware = middleware.Middleware

Middleware is middleware type.

type OperationName

type OperationName = string

OperationName is the ogen operation name

const (
	CreateIntegrationItemsOperation OperationName = "CreateIntegrationItems"
)

type OptBool

type OptBool struct {
	Value bool
	Set   bool
}

OptBool is optional bool.

func NewOptBool

func NewOptBool(v bool) OptBool

NewOptBool returns new OptBool with value set to v.

func (*OptBool) Decode

func (o *OptBool) Decode(d *jx.Decoder) error

Decode decodes bool from json.

func (OptBool) Encode

func (o OptBool) Encode(e *jx.Encoder)

Encode encodes bool as json.

func (OptBool) Get

func (o OptBool) Get() (v bool, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptBool) IsSet

func (o OptBool) IsSet() bool

IsSet returns true if OptBool was set.

func (OptBool) MarshalJSON

func (s OptBool) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptBool) Or

func (o OptBool) Or(d bool) bool

Or returns value if set, or given parameter if does not.

func (*OptBool) Reset

func (o *OptBool) Reset()

Reset unsets value.

func (*OptBool) SetTo

func (o *OptBool) SetTo(v bool)

SetTo sets value to v.

func (*OptBool) UnmarshalJSON

func (s *OptBool) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptComprehensiveItemCategory

type OptComprehensiveItemCategory struct {
	Value ComprehensiveItemCategory
	Set   bool
}

OptComprehensiveItemCategory is optional ComprehensiveItemCategory.

func NewOptComprehensiveItemCategory

func NewOptComprehensiveItemCategory(v ComprehensiveItemCategory) OptComprehensiveItemCategory

NewOptComprehensiveItemCategory returns new OptComprehensiveItemCategory with value set to v.

func (*OptComprehensiveItemCategory) Decode

Decode decodes ComprehensiveItemCategory from json.

func (OptComprehensiveItemCategory) Encode

Encode encodes ComprehensiveItemCategory as json.

func (OptComprehensiveItemCategory) Get

Get returns value and boolean that denotes whether value was set.

func (OptComprehensiveItemCategory) IsSet

IsSet returns true if OptComprehensiveItemCategory was set.

func (OptComprehensiveItemCategory) MarshalJSON

func (s OptComprehensiveItemCategory) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptComprehensiveItemCategory) Or

Or returns value if set, or given parameter if does not.

func (*OptComprehensiveItemCategory) Reset

func (o *OptComprehensiveItemCategory) Reset()

Reset unsets value.

func (*OptComprehensiveItemCategory) SetTo

SetTo sets value to v.

func (*OptComprehensiveItemCategory) UnmarshalJSON

func (s *OptComprehensiveItemCategory) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptComprehensiveItemCustomFields

type OptComprehensiveItemCustomFields struct {
	Value ComprehensiveItemCustomFields
	Set   bool
}

OptComprehensiveItemCustomFields is optional ComprehensiveItemCustomFields.

func NewOptComprehensiveItemCustomFields

func NewOptComprehensiveItemCustomFields(v ComprehensiveItemCustomFields) OptComprehensiveItemCustomFields

NewOptComprehensiveItemCustomFields returns new OptComprehensiveItemCustomFields with value set to v.

func (*OptComprehensiveItemCustomFields) Decode

Decode decodes ComprehensiveItemCustomFields from json.

func (OptComprehensiveItemCustomFields) Encode

Encode encodes ComprehensiveItemCustomFields as json.

func (OptComprehensiveItemCustomFields) Get

Get returns value and boolean that denotes whether value was set.

func (OptComprehensiveItemCustomFields) IsSet

IsSet returns true if OptComprehensiveItemCustomFields was set.

func (OptComprehensiveItemCustomFields) MarshalJSON

func (s OptComprehensiveItemCustomFields) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptComprehensiveItemCustomFields) Or

Or returns value if set, or given parameter if does not.

func (*OptComprehensiveItemCustomFields) Reset

Reset unsets value.

func (*OptComprehensiveItemCustomFields) SetTo

SetTo sets value to v.

func (*OptComprehensiveItemCustomFields) UnmarshalJSON

func (s *OptComprehensiveItemCustomFields) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptComprehensiveItemMetadata

type OptComprehensiveItemMetadata struct {
	Value ComprehensiveItemMetadata
	Set   bool
}

OptComprehensiveItemMetadata is optional ComprehensiveItemMetadata.

func NewOptComprehensiveItemMetadata

func NewOptComprehensiveItemMetadata(v ComprehensiveItemMetadata) OptComprehensiveItemMetadata

NewOptComprehensiveItemMetadata returns new OptComprehensiveItemMetadata with value set to v.

func (*OptComprehensiveItemMetadata) Decode

Decode decodes ComprehensiveItemMetadata from json.

func (OptComprehensiveItemMetadata) Encode

Encode encodes ComprehensiveItemMetadata as json.

func (OptComprehensiveItemMetadata) Get

Get returns value and boolean that denotes whether value was set.

func (OptComprehensiveItemMetadata) IsSet

IsSet returns true if OptComprehensiveItemMetadata was set.

func (OptComprehensiveItemMetadata) MarshalJSON

func (s OptComprehensiveItemMetadata) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptComprehensiveItemMetadata) Or

Or returns value if set, or given parameter if does not.

func (*OptComprehensiveItemMetadata) Reset

func (o *OptComprehensiveItemMetadata) Reset()

Reset unsets value.

func (*OptComprehensiveItemMetadata) SetTo

SetTo sets value to v.

func (*OptComprehensiveItemMetadata) UnmarshalJSON

func (s *OptComprehensiveItemMetadata) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptComprehensiveItemStatus

type OptComprehensiveItemStatus struct {
	Value ComprehensiveItemStatus
	Set   bool
}

OptComprehensiveItemStatus is optional ComprehensiveItemStatus.

func NewOptComprehensiveItemStatus

func NewOptComprehensiveItemStatus(v ComprehensiveItemStatus) OptComprehensiveItemStatus

NewOptComprehensiveItemStatus returns new OptComprehensiveItemStatus with value set to v.

func (*OptComprehensiveItemStatus) Decode

Decode decodes ComprehensiveItemStatus from json.

func (OptComprehensiveItemStatus) Encode

func (o OptComprehensiveItemStatus) Encode(e *jx.Encoder)

Encode encodes ComprehensiveItemStatus as json.

func (OptComprehensiveItemStatus) Get

Get returns value and boolean that denotes whether value was set.

func (OptComprehensiveItemStatus) IsSet

func (o OptComprehensiveItemStatus) IsSet() bool

IsSet returns true if OptComprehensiveItemStatus was set.

func (OptComprehensiveItemStatus) MarshalJSON

func (s OptComprehensiveItemStatus) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptComprehensiveItemStatus) Or

Or returns value if set, or given parameter if does not.

func (*OptComprehensiveItemStatus) Reset

func (o *OptComprehensiveItemStatus) Reset()

Reset unsets value.

func (*OptComprehensiveItemStatus) SetTo

SetTo sets value to v.

func (*OptComprehensiveItemStatus) UnmarshalJSON

func (s *OptComprehensiveItemStatus) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptConfiguration

type OptConfiguration struct {
	Value Configuration
	Set   bool
}

OptConfiguration is optional Configuration.

func NewOptConfiguration

func NewOptConfiguration(v Configuration) OptConfiguration

NewOptConfiguration returns new OptConfiguration with value set to v.

func (*OptConfiguration) Decode

func (o *OptConfiguration) Decode(d *jx.Decoder) error

Decode decodes Configuration from json.

func (OptConfiguration) Encode

func (o OptConfiguration) Encode(e *jx.Encoder)

Encode encodes Configuration as json.

func (OptConfiguration) Get

func (o OptConfiguration) Get() (v Configuration, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptConfiguration) IsSet

func (o OptConfiguration) IsSet() bool

IsSet returns true if OptConfiguration was set.

func (OptConfiguration) MarshalJSON

func (s OptConfiguration) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptConfiguration) Or

Or returns value if set, or given parameter if does not.

func (*OptConfiguration) Reset

func (o *OptConfiguration) Reset()

Reset unsets value.

func (*OptConfiguration) SetTo

func (o *OptConfiguration) SetTo(v Configuration)

SetTo sets value to v.

func (*OptConfiguration) UnmarshalJSON

func (s *OptConfiguration) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptConfigurationSettings

type OptConfigurationSettings struct {
	Value ConfigurationSettings
	Set   bool
}

OptConfigurationSettings is optional ConfigurationSettings.

func NewOptConfigurationSettings

func NewOptConfigurationSettings(v ConfigurationSettings) OptConfigurationSettings

NewOptConfigurationSettings returns new OptConfigurationSettings with value set to v.

func (*OptConfigurationSettings) Decode

func (o *OptConfigurationSettings) Decode(d *jx.Decoder) error

Decode decodes ConfigurationSettings from json.

func (OptConfigurationSettings) Encode

func (o OptConfigurationSettings) Encode(e *jx.Encoder)

Encode encodes ConfigurationSettings as json.

func (OptConfigurationSettings) Get

Get returns value and boolean that denotes whether value was set.

func (OptConfigurationSettings) IsSet

func (o OptConfigurationSettings) IsSet() bool

IsSet returns true if OptConfigurationSettings was set.

func (OptConfigurationSettings) MarshalJSON

func (s OptConfigurationSettings) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptConfigurationSettings) Or

Or returns value if set, or given parameter if does not.

func (*OptConfigurationSettings) Reset

func (o *OptConfigurationSettings) Reset()

Reset unsets value.

func (*OptConfigurationSettings) SetTo

SetTo sets value to v.

func (*OptConfigurationSettings) UnmarshalJSON

func (s *OptConfigurationSettings) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptFeatureParameters

type OptFeatureParameters struct {
	Value FeatureParameters
	Set   bool
}

OptFeatureParameters is optional FeatureParameters.

func NewOptFeatureParameters

func NewOptFeatureParameters(v FeatureParameters) OptFeatureParameters

NewOptFeatureParameters returns new OptFeatureParameters with value set to v.

func (*OptFeatureParameters) Decode

func (o *OptFeatureParameters) Decode(d *jx.Decoder) error

Decode decodes FeatureParameters from json.

func (OptFeatureParameters) Encode

func (o OptFeatureParameters) Encode(e *jx.Encoder)

Encode encodes FeatureParameters as json.

func (OptFeatureParameters) Get

Get returns value and boolean that denotes whether value was set.

func (OptFeatureParameters) IsSet

func (o OptFeatureParameters) IsSet() bool

IsSet returns true if OptFeatureParameters was set.

func (OptFeatureParameters) MarshalJSON

func (s OptFeatureParameters) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptFeatureParameters) Or

Or returns value if set, or given parameter if does not.

func (*OptFeatureParameters) Reset

func (o *OptFeatureParameters) Reset()

Reset unsets value.

func (*OptFeatureParameters) SetTo

SetTo sets value to v.

func (*OptFeatureParameters) UnmarshalJSON

func (s *OptFeatureParameters) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptFloat64

type OptFloat64 struct {
	Value float64
	Set   bool
}

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) Reset

func (o *OptFloat64) Reset()

Reset unsets value.

func (*OptFloat64) SetTo

func (o *OptFloat64) SetTo(v float64)

SetTo sets value to v.

func (*OptFloat64) UnmarshalJSON

func (s *OptFloat64) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptInt

type OptInt struct {
	Value int
	Set   bool
}

OptInt is optional int.

func NewOptInt

func NewOptInt(v int) OptInt

NewOptInt returns new OptInt with value set to v.

func (*OptInt) Decode

func (o *OptInt) Decode(d *jx.Decoder) error

Decode decodes int from json.

func (OptInt) Encode

func (o OptInt) Encode(e *jx.Encoder)

Encode encodes int as json.

func (OptInt) Get

func (o OptInt) Get() (v int, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptInt) IsSet

func (o OptInt) IsSet() bool

IsSet returns true if OptInt was set.

func (OptInt) MarshalJSON

func (s OptInt) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptInt) Or

func (o OptInt) Or(d int) int

Or returns value if set, or given parameter if does not.

func (*OptInt) Reset

func (o *OptInt) Reset()

Reset unsets value.

func (*OptInt) SetTo

func (o *OptInt) SetTo(v int)

SetTo sets value to v.

func (*OptInt) UnmarshalJSON

func (s *OptInt) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptNilString

type OptNilString struct {
	Value string
	Set   bool
	Null  bool
}

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) Reset

func (o *OptNilString) Reset()

Reset unsets value.

func (*OptNilString) SetTo

func (o *OptNilString) SetTo(v string)

SetTo sets value to v.

func (*OptNilString) SetToNull

func (o *OptNilString) SetToNull()

SetToNull sets value to null.

func (*OptNilString) UnmarshalJSON

func (s *OptNilString) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptString

type OptString struct {
	Value string
	Set   bool
}

OptString is optional string.

func NewOptString

func NewOptString(v string) OptString

NewOptString returns new OptString with value set to v.

func (*OptString) Decode

func (o *OptString) Decode(d *jx.Decoder) error

Decode decodes string from json.

func (OptString) Encode

func (o OptString) Encode(e *jx.Encoder)

Encode encodes string as json.

func (OptString) Get

func (o OptString) Get() (v string, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptString) IsSet

func (o OptString) IsSet() bool

IsSet returns true if OptString was set.

func (OptString) MarshalJSON

func (s OptString) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptString) Or

func (o OptString) Or(d string) string

Or returns value if set, or given parameter if does not.

func (*OptString) Reset

func (o *OptString) Reset()

Reset unsets value.

func (*OptString) SetTo

func (o *OptString) SetTo(v string)

SetTo sets value to v.

func (*OptString) UnmarshalJSON

func (s *OptString) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptUser

type OptUser struct {
	Value User
	Set   bool
}

OptUser is optional User.

func NewOptUser

func NewOptUser(v User) OptUser

NewOptUser returns new OptUser with value set to v.

func (*OptUser) Decode

func (o *OptUser) Decode(d *jx.Decoder) error

Decode decodes User from json.

func (OptUser) Encode

func (o OptUser) Encode(e *jx.Encoder)

Encode encodes User as json.

func (OptUser) Get

func (o OptUser) Get() (v User, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptUser) IsSet

func (o OptUser) IsSet() bool

IsSet returns true if OptUser was set.

func (OptUser) MarshalJSON

func (s OptUser) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptUser) Or

func (o OptUser) Or(d User) User

Or returns value if set, or given parameter if does not.

func (*OptUser) Reset

func (o *OptUser) Reset()

Reset unsets value.

func (*OptUser) SetTo

func (o *OptUser) SetTo(v User)

SetTo sets value to v.

func (*OptUser) UnmarshalJSON

func (s *OptUser) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type Option

type Option interface {
	ServerOption
	ClientOption
}

Option is config option.

func WithAttributes

func WithAttributes(attributes ...attribute.KeyValue) Option

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 Route

type Route struct {
	// contains filtered or unexported fields
}

Route is route object.

func (Route) Args

func (r Route) Args() []string

Args returns parsed arguments.

func (Route) Name

func (r Route) Name() string

Name returns ogen operation name.

It is guaranteed to be unique and not empty.

func (Route) OperationID

func (r Route) OperationID() string

OperationID returns OpenAPI operationId.

func (Route) PathPattern

func (r Route) PathPattern() string

PathPattern returns OpenAPI path.

func (Route) Summary

func (r Route) Summary() string

Summary returns OpenAPI summary.

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 (*Server) FindPath

func (s *Server) FindPath(method string, u *url.URL) (r Route, _ bool)

FindPath finds Route for given method and URL.

func (*Server) FindRoute

func (s *Server) FindRoute(method, path string) (Route, bool)

FindRoute finds Route for given method and path.

Note: this method does not unescape path or handle reserved characters in path properly. Use FindPath instead.

func (*Server) ServeHTTP

func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP serves http request as defined by OpenAPI v3 specification, calling handler that matches the path or returning not found error.

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) CreateIntegrationItems

CreateIntegrationItems implements createIntegrationItems operation.

Create items with all field types.

POST /integration/test

type User

type User struct {
	Username string    `json:"username"`
	Email    OptString `json:"email"`
	FullName OptString `json:"fullName"`
	Verified OptBool   `json:"verified"`
}

User information. Ref: #/components/schemas/User

func (*User) Decode

func (s *User) Decode(d *jx.Decoder) error

Decode decodes User from json.

func (*User) Encode

func (s *User) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (User) Equal

func (a User) Equal(b User, depth int) bool

Equal compares two User instances for equality. The depth parameter prevents infinite recursion on nested objects.

func (*User) GetEmail

func (s *User) GetEmail() OptString

GetEmail returns the value of Email.

func (*User) GetFullName

func (s *User) GetFullName() OptString

GetFullName returns the value of FullName.

func (*User) GetUsername

func (s *User) GetUsername() string

GetUsername returns the value of Username.

func (*User) GetVerified

func (s *User) GetVerified() OptBool

GetVerified returns the value of Verified.

func (User) Hash

func (a User) Hash() uint64

Hash computes a hash value for User using FNV-1a. Equal objects must produce equal hashes.

func (*User) MarshalJSON

func (s *User) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*User) SetEmail

func (s *User) SetEmail(val OptString)

SetEmail sets the value of Email.

func (*User) SetFullName

func (s *User) SetFullName(val OptString)

SetFullName sets the value of FullName.

func (*User) SetUsername

func (s *User) SetUsername(val string)

SetUsername sets the value of Username.

func (*User) SetVerified

func (s *User) SetVerified(val OptBool)

SetVerified sets the value of Verified.

func (*User) UnmarshalJSON

func (s *User) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

Jump to

Keyboard shortcuts

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