Documentation
¶
Index ¶
- Variables
- func GetOpenAPISpecJSON() ([]byte, error)
- type Application
- type ApplicationOptionalClaims
- type Nullable
- func (n Nullable[T]) Get() (T, error)
- func (n Nullable[T]) IsNull() bool
- func (n Nullable[T]) IsSpecified() bool
- func (n Nullable[T]) MarshalJSON() ([]byte, error)
- func (n Nullable[T]) MustGet() T
- func (n *Nullable[T]) Set(value T)
- func (n *Nullable[T]) SetNull()
- func (n *Nullable[T]) SetUnspecified()
- func (n *Nullable[T]) UnmarshalJSON(data []byte) error
- type OptionalClaims
Constants ¶
This section is empty.
Variables ¶
var ErrNullableIsNull = errors.New("nullable value is null")
ErrNullableIsNull is returned when trying to get a value from a null Nullable.
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 ¶
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 ¶
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 ¶
NewNullNullable creates a Nullable that is explicitly null.
func NewNullableWithValue ¶
NewNullableWithValue creates a Nullable with the given value.
func (Nullable[T]) IsSpecified ¶
IsSpecified returns true if the field was provided (either null or a value).
func (Nullable[T]) MarshalJSON ¶
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]) 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 ¶
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.