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

func (c *Client) CreateWorkflowTransitions(ctx context.Context, request *CreateWorkflowTransitionsReq) (*CreateWorkflowTransitionsOK, error)

CreateWorkflowTransitions invokes createWorkflowTransitions operation.

Create workflow transitions.

POST /workflow/transitions

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 Condition

type Condition struct {
	Type          OptString            `json:"type"`
	Negated       OptBool              `json:"negated"`
	Configuration OptRuleConfiguration `json:"configuration"`
}

Level 3 - Individual condition. Ref: #/components/schemas/Condition

func (*Condition) Decode

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

Decode decodes Condition from json.

func (*Condition) Encode

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

Encode implements json.Marshaler.

func (Condition) Equal

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

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

func (*Condition) GetConfiguration

func (s *Condition) GetConfiguration() OptRuleConfiguration

GetConfiguration returns the value of Configuration.

func (*Condition) GetNegated

func (s *Condition) GetNegated() OptBool

GetNegated returns the value of Negated.

func (*Condition) GetType

func (s *Condition) GetType() OptString

GetType returns the value of Type.

func (Condition) Hash

func (a Condition) Hash() uint64

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

func (*Condition) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*Condition) SetConfiguration

func (s *Condition) SetConfiguration(val OptRuleConfiguration)

SetConfiguration sets the value of Configuration.

func (*Condition) SetNegated

func (s *Condition) SetNegated(val OptBool)

SetNegated sets the value of Negated.

func (*Condition) SetType

func (s *Condition) SetType(val OptString)

SetType sets the value of Type.

func (*Condition) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (*Condition) Validate

func (s *Condition) Validate() error

type ConditionGroup

type ConditionGroup struct {
	Operator  OptConditionGroupOperator `json:"operator"`
	Condition OptCondition              `json:"condition"`
}

Level 2 - Group of conditions. Ref: #/components/schemas/ConditionGroup

func (*ConditionGroup) Decode

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

Decode decodes ConditionGroup from json.

func (*ConditionGroup) Encode

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

Encode implements json.Marshaler.

func (ConditionGroup) Equal

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

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

func (*ConditionGroup) GetCondition

func (s *ConditionGroup) GetCondition() OptCondition

GetCondition returns the value of Condition.

func (*ConditionGroup) GetOperator

func (s *ConditionGroup) GetOperator() OptConditionGroupOperator

GetOperator returns the value of Operator.

func (ConditionGroup) Hash

func (a ConditionGroup) Hash() uint64

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

func (*ConditionGroup) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*ConditionGroup) SetCondition

func (s *ConditionGroup) SetCondition(val OptCondition)

SetCondition sets the value of Condition.

func (*ConditionGroup) SetOperator

func (s *ConditionGroup) SetOperator(val OptConditionGroupOperator)

SetOperator sets the value of Operator.

func (*ConditionGroup) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (*ConditionGroup) Validate

func (s *ConditionGroup) Validate() error

type ConditionGroupOperator

type ConditionGroupOperator string
const (
	ConditionGroupOperatorAND ConditionGroupOperator = "AND"
	ConditionGroupOperatorOR  ConditionGroupOperator = "OR"
)

func (ConditionGroupOperator) AllValues

AllValues returns all ConditionGroupOperator values.

func (*ConditionGroupOperator) Decode

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

Decode decodes ConditionGroupOperator from json.

func (ConditionGroupOperator) Encode

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

Encode encodes ConditionGroupOperator as json.

func (ConditionGroupOperator) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (ConditionGroupOperator) MarshalText

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

MarshalText implements encoding.TextMarshaler.

func (*ConditionGroupOperator) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (*ConditionGroupOperator) UnmarshalText

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

UnmarshalText implements encoding.TextUnmarshaler.

func (ConditionGroupOperator) Validate

func (s ConditionGroupOperator) Validate() error

type CreateWorkflowTransitionsOK

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

func (*CreateWorkflowTransitionsOK) Decode

Decode decodes CreateWorkflowTransitionsOK from json.

func (*CreateWorkflowTransitionsOK) Encode

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

Encode implements json.Marshaler.

func (*CreateWorkflowTransitionsOK) GetCreated

func (s *CreateWorkflowTransitionsOK) GetCreated() OptInt

GetCreated returns the value of Created.

func (*CreateWorkflowTransitionsOK) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*CreateWorkflowTransitionsOK) SetCreated

func (s *CreateWorkflowTransitionsOK) SetCreated(val OptInt)

SetCreated sets the value of Created.

func (*CreateWorkflowTransitionsOK) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

type CreateWorkflowTransitionsReq

type CreateWorkflowTransitionsReq struct {
	Transitions []WorkflowTransition `json:"transitions"`
}

func (*CreateWorkflowTransitionsReq) Decode

Decode decodes CreateWorkflowTransitionsReq from json.

func (*CreateWorkflowTransitionsReq) Encode

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

Encode implements json.Marshaler.

func (*CreateWorkflowTransitionsReq) GetTransitions

func (s *CreateWorkflowTransitionsReq) GetTransitions() []WorkflowTransition

GetTransitions returns the value of Transitions.

func (*CreateWorkflowTransitionsReq) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*CreateWorkflowTransitionsReq) SetTransitions

func (s *CreateWorkflowTransitionsReq) SetTransitions(val []WorkflowTransition)

SetTransitions sets the value of Transitions.

func (*CreateWorkflowTransitionsReq) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (*CreateWorkflowTransitionsReq) Validate

func (s *CreateWorkflowTransitionsReq) Validate() error

type ErrorHandler

type ErrorHandler = ogenerrors.ErrorHandler

ErrorHandler is error handler.

type Handler

type Handler interface {
	// CreateWorkflowTransitions implements createWorkflowTransitions operation.
	//
	// Create workflow transitions.
	//
	// POST /workflow/transitions
	CreateWorkflowTransitions(ctx context.Context, req *CreateWorkflowTransitionsReq) (*CreateWorkflowTransitionsOK, error)
}

Handler handles operations described by OpenAPI v3 specification.

type Invoker

type Invoker interface {
	// CreateWorkflowTransitions invokes createWorkflowTransitions operation.
	//
	// Create workflow transitions.
	//
	// POST /workflow/transitions
	CreateWorkflowTransitions(ctx context.Context, request *CreateWorkflowTransitionsReq) (*CreateWorkflowTransitionsOK, 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 (
	CreateWorkflowTransitionsOperation OperationName = "CreateWorkflowTransitions"
)

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 OptCondition

type OptCondition struct {
	Value Condition
	Set   bool
}

OptCondition is optional Condition.

func NewOptCondition

func NewOptCondition(v Condition) OptCondition

NewOptCondition returns new OptCondition with value set to v.

func (*OptCondition) Decode

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

Decode decodes Condition from json.

func (OptCondition) Encode

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

Encode encodes Condition as json.

func (OptCondition) Get

func (o OptCondition) Get() (v Condition, ok bool)

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

func (OptCondition) IsSet

func (o OptCondition) IsSet() bool

IsSet returns true if OptCondition was set.

func (OptCondition) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (OptCondition) Or

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

func (*OptCondition) Reset

func (o *OptCondition) Reset()

Reset unsets value.

func (*OptCondition) SetTo

func (o *OptCondition) SetTo(v Condition)

SetTo sets value to v.

func (*OptCondition) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

type OptConditionGroup

type OptConditionGroup struct {
	Value ConditionGroup
	Set   bool
}

OptConditionGroup is optional ConditionGroup.

func NewOptConditionGroup

func NewOptConditionGroup(v ConditionGroup) OptConditionGroup

NewOptConditionGroup returns new OptConditionGroup with value set to v.

func (*OptConditionGroup) Decode

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

Decode decodes ConditionGroup from json.

func (OptConditionGroup) Encode

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

Encode encodes ConditionGroup as json.

func (OptConditionGroup) Get

func (o OptConditionGroup) Get() (v ConditionGroup, ok bool)

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

func (OptConditionGroup) IsSet

func (o OptConditionGroup) IsSet() bool

IsSet returns true if OptConditionGroup was set.

func (OptConditionGroup) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (OptConditionGroup) Or

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

func (*OptConditionGroup) Reset

func (o *OptConditionGroup) Reset()

Reset unsets value.

func (*OptConditionGroup) SetTo

func (o *OptConditionGroup) SetTo(v ConditionGroup)

SetTo sets value to v.

func (*OptConditionGroup) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

type OptConditionGroupOperator

type OptConditionGroupOperator struct {
	Value ConditionGroupOperator
	Set   bool
}

OptConditionGroupOperator is optional ConditionGroupOperator.

func NewOptConditionGroupOperator

func NewOptConditionGroupOperator(v ConditionGroupOperator) OptConditionGroupOperator

NewOptConditionGroupOperator returns new OptConditionGroupOperator with value set to v.

func (*OptConditionGroupOperator) Decode

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

Decode decodes ConditionGroupOperator from json.

func (OptConditionGroupOperator) Encode

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

Encode encodes ConditionGroupOperator as json.

func (OptConditionGroupOperator) Get

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

func (OptConditionGroupOperator) IsSet

func (o OptConditionGroupOperator) IsSet() bool

IsSet returns true if OptConditionGroupOperator was set.

func (OptConditionGroupOperator) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (OptConditionGroupOperator) Or

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

func (*OptConditionGroupOperator) Reset

func (o *OptConditionGroupOperator) Reset()

Reset unsets value.

func (*OptConditionGroupOperator) SetTo

SetTo sets value to v.

func (*OptConditionGroupOperator) UnmarshalJSON

func (s *OptConditionGroupOperator) 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 OptParameter

type OptParameter struct {
	Value Parameter
	Set   bool
}

OptParameter is optional Parameter.

func NewOptParameter

func NewOptParameter(v Parameter) OptParameter

NewOptParameter returns new OptParameter with value set to v.

func (*OptParameter) Decode

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

Decode decodes Parameter from json.

func (OptParameter) Encode

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

Encode encodes Parameter as json.

func (OptParameter) Get

func (o OptParameter) Get() (v Parameter, ok bool)

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

func (OptParameter) IsSet

func (o OptParameter) IsSet() bool

IsSet returns true if OptParameter was set.

func (OptParameter) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (OptParameter) Or

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

func (*OptParameter) Reset

func (o *OptParameter) Reset()

Reset unsets value.

func (*OptParameter) SetTo

func (o *OptParameter) SetTo(v Parameter)

SetTo sets value to v.

func (*OptParameter) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

type OptParameterGroup

type OptParameterGroup struct {
	Value ParameterGroup
	Set   bool
}

OptParameterGroup is optional ParameterGroup.

func NewOptParameterGroup

func NewOptParameterGroup(v ParameterGroup) OptParameterGroup

NewOptParameterGroup returns new OptParameterGroup with value set to v.

func (*OptParameterGroup) Decode

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

Decode decodes ParameterGroup from json.

func (OptParameterGroup) Encode

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

Encode encodes ParameterGroup as json.

func (OptParameterGroup) Get

func (o OptParameterGroup) Get() (v ParameterGroup, ok bool)

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

func (OptParameterGroup) IsSet

func (o OptParameterGroup) IsSet() bool

IsSet returns true if OptParameterGroup was set.

func (OptParameterGroup) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (OptParameterGroup) Or

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

func (*OptParameterGroup) Reset

func (o *OptParameterGroup) Reset()

Reset unsets value.

func (*OptParameterGroup) SetTo

func (o *OptParameterGroup) SetTo(v ParameterGroup)

SetTo sets value to v.

func (*OptParameterGroup) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

type OptParameterValue

type OptParameterValue struct {
	Value ParameterValue
	Set   bool
}

OptParameterValue is optional ParameterValue.

func NewOptParameterValue

func NewOptParameterValue(v ParameterValue) OptParameterValue

NewOptParameterValue returns new OptParameterValue with value set to v.

func (*OptParameterValue) Decode

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

Decode decodes ParameterValue from json.

func (OptParameterValue) Encode

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

Encode encodes ParameterValue as json.

func (OptParameterValue) Get

func (o OptParameterValue) Get() (v ParameterValue, ok bool)

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

func (OptParameterValue) IsSet

func (o OptParameterValue) IsSet() bool

IsSet returns true if OptParameterValue was set.

func (OptParameterValue) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (OptParameterValue) Or

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

func (*OptParameterValue) Reset

func (o *OptParameterValue) Reset()

Reset unsets value.

func (*OptParameterValue) SetTo

func (o *OptParameterValue) SetTo(v ParameterValue)

SetTo sets value to v.

func (*OptParameterValue) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

type OptParameterValueMetadata

type OptParameterValueMetadata struct {
	Value ParameterValueMetadata
	Set   bool
}

OptParameterValueMetadata is optional ParameterValueMetadata.

func NewOptParameterValueMetadata

func NewOptParameterValueMetadata(v ParameterValueMetadata) OptParameterValueMetadata

NewOptParameterValueMetadata returns new OptParameterValueMetadata with value set to v.

func (*OptParameterValueMetadata) Decode

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

Decode decodes ParameterValueMetadata from json.

func (OptParameterValueMetadata) Encode

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

Encode encodes ParameterValueMetadata as json.

func (OptParameterValueMetadata) Get

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

func (OptParameterValueMetadata) IsSet

func (o OptParameterValueMetadata) IsSet() bool

IsSet returns true if OptParameterValueMetadata was set.

func (OptParameterValueMetadata) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (OptParameterValueMetadata) Or

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

func (*OptParameterValueMetadata) Reset

func (o *OptParameterValueMetadata) Reset()

Reset unsets value.

func (*OptParameterValueMetadata) SetTo

SetTo sets value to v.

func (*OptParameterValueMetadata) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

type OptRuleConfiguration

type OptRuleConfiguration struct {
	Value RuleConfiguration
	Set   bool
}

OptRuleConfiguration is optional RuleConfiguration.

func NewOptRuleConfiguration

func NewOptRuleConfiguration(v RuleConfiguration) OptRuleConfiguration

NewOptRuleConfiguration returns new OptRuleConfiguration with value set to v.

func (*OptRuleConfiguration) Decode

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

Decode decodes RuleConfiguration from json.

func (OptRuleConfiguration) Encode

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

Encode encodes RuleConfiguration as json.

func (OptRuleConfiguration) Get

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

func (OptRuleConfiguration) IsSet

func (o OptRuleConfiguration) IsSet() bool

IsSet returns true if OptRuleConfiguration was set.

func (OptRuleConfiguration) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (OptRuleConfiguration) Or

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

func (*OptRuleConfiguration) Reset

func (o *OptRuleConfiguration) Reset()

Reset unsets value.

func (*OptRuleConfiguration) SetTo

SetTo sets value to v.

func (*OptRuleConfiguration) UnmarshalJSON

func (s *OptRuleConfiguration) 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 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 Parameter

type Parameter struct {
	Key   OptString         `json:"key"`
	Value OptParameterValue `json:"value"`
}

Level 6 - Individual parameter. Ref: #/components/schemas/Parameter

func (*Parameter) Decode

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

Decode decodes Parameter from json.

func (*Parameter) Encode

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

Encode implements json.Marshaler.

func (Parameter) Equal

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

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

func (*Parameter) GetKey

func (s *Parameter) GetKey() OptString

GetKey returns the value of Key.

func (*Parameter) GetValue

func (s *Parameter) GetValue() OptParameterValue

GetValue returns the value of Value.

func (Parameter) Hash

func (a Parameter) Hash() uint64

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

func (*Parameter) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*Parameter) SetKey

func (s *Parameter) SetKey(val OptString)

SetKey sets the value of Key.

func (*Parameter) SetValue

func (s *Parameter) SetValue(val OptParameterValue)

SetValue sets the value of Value.

func (*Parameter) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (*Parameter) Validate

func (s *Parameter) Validate() error

type ParameterGroup

type ParameterGroup struct {
	GroupName OptString    `json:"groupName"`
	Parameter OptParameter `json:"parameter"`
}

Level 5 - Group of parameters. Ref: #/components/schemas/ParameterGroup

func (*ParameterGroup) Decode

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

Decode decodes ParameterGroup from json.

func (*ParameterGroup) Encode

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

Encode implements json.Marshaler.

func (ParameterGroup) Equal

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

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

func (*ParameterGroup) GetGroupName

func (s *ParameterGroup) GetGroupName() OptString

GetGroupName returns the value of GroupName.

func (*ParameterGroup) GetParameter

func (s *ParameterGroup) GetParameter() OptParameter

GetParameter returns the value of Parameter.

func (ParameterGroup) Hash

func (a ParameterGroup) Hash() uint64

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

func (*ParameterGroup) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*ParameterGroup) SetGroupName

func (s *ParameterGroup) SetGroupName(val OptString)

SetGroupName sets the value of GroupName.

func (*ParameterGroup) SetParameter

func (s *ParameterGroup) SetParameter(val OptParameter)

SetParameter sets the value of Parameter.

func (*ParameterGroup) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (*ParameterGroup) Validate

func (s *ParameterGroup) Validate() error

type ParameterValue

type ParameterValue struct {
	StringValue  OptString                 `json:"stringValue"`
	NumberValue  OptFloat64                `json:"numberValue"`
	BooleanValue OptBool                   `json:"booleanValue"`
	Metadata     OptParameterValueMetadata `json:"metadata"`
}

Level 7 - Parameter value (deepest level). Ref: #/components/schemas/ParameterValue

func (*ParameterValue) Decode

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

Decode decodes ParameterValue from json.

func (*ParameterValue) Encode

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

Encode implements json.Marshaler.

func (ParameterValue) Equal

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

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

func (*ParameterValue) GetBooleanValue

func (s *ParameterValue) GetBooleanValue() OptBool

GetBooleanValue returns the value of BooleanValue.

func (*ParameterValue) GetMetadata

func (s *ParameterValue) GetMetadata() OptParameterValueMetadata

GetMetadata returns the value of Metadata.

func (*ParameterValue) GetNumberValue

func (s *ParameterValue) GetNumberValue() OptFloat64

GetNumberValue returns the value of NumberValue.

func (*ParameterValue) GetStringValue

func (s *ParameterValue) GetStringValue() OptString

GetStringValue returns the value of StringValue.

func (ParameterValue) Hash

func (a ParameterValue) Hash() uint64

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

func (*ParameterValue) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*ParameterValue) SetBooleanValue

func (s *ParameterValue) SetBooleanValue(val OptBool)

SetBooleanValue sets the value of BooleanValue.

func (*ParameterValue) SetMetadata

func (s *ParameterValue) SetMetadata(val OptParameterValueMetadata)

SetMetadata sets the value of Metadata.

func (*ParameterValue) SetNumberValue

func (s *ParameterValue) SetNumberValue(val OptFloat64)

SetNumberValue sets the value of NumberValue.

func (*ParameterValue) SetStringValue

func (s *ParameterValue) SetStringValue(val OptString)

SetStringValue sets the value of StringValue.

func (*ParameterValue) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (*ParameterValue) Validate

func (s *ParameterValue) Validate() error

type ParameterValueMetadata

type ParameterValueMetadata map[string]string

func (*ParameterValueMetadata) Decode

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

Decode decodes ParameterValueMetadata from json.

func (ParameterValueMetadata) Encode

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

Encode implements json.Marshaler.

func (ParameterValueMetadata) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*ParameterValueMetadata) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

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 RuleConfiguration

type RuleConfiguration struct {
	RuleKey        OptString         `json:"ruleKey"`
	ParameterGroup OptParameterGroup `json:"parameterGroup"`
}

Level 4 - Rule configuration. Ref: #/components/schemas/RuleConfiguration

func (*RuleConfiguration) Decode

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

Decode decodes RuleConfiguration from json.

func (*RuleConfiguration) Encode

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

Encode implements json.Marshaler.

func (RuleConfiguration) Equal

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

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

func (*RuleConfiguration) GetParameterGroup

func (s *RuleConfiguration) GetParameterGroup() OptParameterGroup

GetParameterGroup returns the value of ParameterGroup.

func (*RuleConfiguration) GetRuleKey

func (s *RuleConfiguration) GetRuleKey() OptString

GetRuleKey returns the value of RuleKey.

func (RuleConfiguration) Hash

func (a RuleConfiguration) Hash() uint64

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

func (*RuleConfiguration) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*RuleConfiguration) SetParameterGroup

func (s *RuleConfiguration) SetParameterGroup(val OptParameterGroup)

SetParameterGroup sets the value of ParameterGroup.

func (*RuleConfiguration) SetRuleKey

func (s *RuleConfiguration) SetRuleKey(val OptString)

SetRuleKey sets the value of RuleKey.

func (*RuleConfiguration) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (*RuleConfiguration) Validate

func (s *RuleConfiguration) Validate() error

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

CreateWorkflowTransitions implements createWorkflowTransitions operation.

Create workflow transitions.

POST /workflow/transitions

type WorkflowTransition

type WorkflowTransition struct {
	ID           string            `json:"id"`
	Name         string            `json:"name"`
	FromStatusId OptString         `json:"fromStatusId"`
	ToStatusId   OptString         `json:"toStatusId"`
	Conditions   OptConditionGroup `json:"conditions"`
}

Level 1 - Workflow transition definition. Ref: #/components/schemas/WorkflowTransition

func (*WorkflowTransition) Decode

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

Decode decodes WorkflowTransition from json.

func (*WorkflowTransition) Encode

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

Encode implements json.Marshaler.

func (WorkflowTransition) Equal

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

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

func (*WorkflowTransition) GetConditions

func (s *WorkflowTransition) GetConditions() OptConditionGroup

GetConditions returns the value of Conditions.

func (*WorkflowTransition) GetFromStatusId

func (s *WorkflowTransition) GetFromStatusId() OptString

GetFromStatusId returns the value of FromStatusId.

func (*WorkflowTransition) GetID

func (s *WorkflowTransition) GetID() string

GetID returns the value of ID.

func (*WorkflowTransition) GetName

func (s *WorkflowTransition) GetName() string

GetName returns the value of Name.

func (*WorkflowTransition) GetToStatusId

func (s *WorkflowTransition) GetToStatusId() OptString

GetToStatusId returns the value of ToStatusId.

func (WorkflowTransition) Hash

func (a WorkflowTransition) Hash() uint64

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

func (*WorkflowTransition) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*WorkflowTransition) SetConditions

func (s *WorkflowTransition) SetConditions(val OptConditionGroup)

SetConditions sets the value of Conditions.

func (*WorkflowTransition) SetFromStatusId

func (s *WorkflowTransition) SetFromStatusId(val OptString)

SetFromStatusId sets the value of FromStatusId.

func (*WorkflowTransition) SetID

func (s *WorkflowTransition) SetID(val string)

SetID sets the value of ID.

func (*WorkflowTransition) SetName

func (s *WorkflowTransition) SetName(val string)

SetName sets the value of Name.

func (*WorkflowTransition) SetToStatusId

func (s *WorkflowTransition) SetToStatusId(val OptString)

SetToStatusId sets the value of ToStatusId.

func (*WorkflowTransition) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (*WorkflowTransition) Validate

func (s *WorkflowTransition) Validate() error

Jump to

Keyboard shortcuts

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