output

package
v0.0.0-...-bb4e2af Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNullableIsNull = errors.New("nullable value is null")

ErrNullableIsNull is returned when trying to get a value from a null Nullable.

View Source
var ErrNullableNotSpecified = errors.New("nullable value is not specified")

ErrNullableNotSpecified is returned when trying to get a value from an unspecified Nullable.

Functions

func GetOpenAPISpecJSON

func GetOpenAPISpecJSON() ([]byte, error)

GetOpenAPISpecJSON returns the raw OpenAPI spec as JSON bytes.

Types

type Application

type Application struct {
	Name *string `json:"name,omitempty" form:"name,omitempty"`
	// Optional claims configuration
	OptionalClaims Nullable[ApplicationOptionalClaims] `json:"optionalClaims,omitempty" form:"optionalClaims,omitempty"`
}

#/components/schemas/Application

func (*Application) ApplyDefaults

func (s *Application) ApplyDefaults()

ApplyDefaults sets default values for fields that are nil.

type ApplicationOptionalClaims

type ApplicationOptionalClaims struct {
	OptionalClaims *OptionalClaims
}

#/components/schemas/Application/properties/optionalClaims Optional claims configuration

func (*ApplicationOptionalClaims) ApplyDefaults

func (u *ApplicationOptionalClaims) ApplyDefaults()

ApplyDefaults sets default values for fields that are nil.

func (ApplicationOptionalClaims) MarshalJSON

func (u ApplicationOptionalClaims) MarshalJSON() ([]byte, error)

func (*ApplicationOptionalClaims) UnmarshalJSON

func (u *ApplicationOptionalClaims) UnmarshalJSON(data []byte) error

type Nullable

type Nullable[T any] map[bool]T

Nullable is a generic type that can distinguish between: - Field not provided (unspecified) - Field explicitly set to null - Field has a value

This is implemented as a map[bool]T where: - Empty map: unspecified - map[false]T: explicitly null - map[true]T: has a value

func NewNullNullable

func NewNullNullable[T any]() Nullable[T]

NewNullNullable creates a Nullable that is explicitly null.

func NewNullableWithValue

func NewNullableWithValue[T any](value T) Nullable[T]

NewNullableWithValue creates a Nullable with the given value.

func (Nullable[T]) Get

func (n Nullable[T]) Get() (T, error)

Get returns the value if set, or an error if null or unspecified.

func (Nullable[T]) IsNull

func (n Nullable[T]) IsNull() bool

IsNull returns true if the field is explicitly null.

func (Nullable[T]) IsSpecified

func (n Nullable[T]) IsSpecified() bool

IsSpecified returns true if the field was provided (either null or a value).

func (Nullable[T]) MarshalJSON

func (n Nullable[T]) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler.

func (Nullable[T]) MustGet

func (n Nullable[T]) MustGet() T

MustGet returns the value or panics if null or unspecified.

func (*Nullable[T]) Set

func (n *Nullable[T]) Set(value T)

Set assigns a value.

func (*Nullable[T]) SetNull

func (n *Nullable[T]) SetNull()

SetNull marks the field as explicitly null.

func (*Nullable[T]) SetUnspecified

func (n *Nullable[T]) SetUnspecified()

SetUnspecified clears the field (as if it was never set).

func (*Nullable[T]) UnmarshalJSON

func (n *Nullable[T]) UnmarshalJSON(data []byte) error

UnmarshalJSON implements json.Unmarshaler.

type OptionalClaims

type OptionalClaims struct {
	IDToken     *string `json:"idToken,omitempty" form:"idToken,omitempty"`
	AccessToken *string `json:"accessToken,omitempty" form:"accessToken,omitempty"`
}

#/components/schemas/OptionalClaims

func (*OptionalClaims) ApplyDefaults

func (s *OptionalClaims) ApplyDefaults()

ApplyDefaults sets default values for fields that are nil.

Jump to

Keyboard shortcuts

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