internal

package
v0.0.28 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AnyOfNumberBooleanContainer internalAnyOfNumberBoolean

Functions

func GetTestingServer added in v0.0.26

func GetTestingServer() *httptest.Server

GetTestingServer creates and returns a httptest.Server instance for testing purposes.

func ToPointer added in v0.0.26

func ToPointer[T any](value T) *T

Types

type AnyOfNumberVehicle added in v0.0.26

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

AnyOfNumberVehicle represents a AnyOfNumberVehicle struct. This is a container for any-of cases.

func (*AnyOfNumberVehicle) AsNumber added in v0.0.26

func (s *AnyOfNumberVehicle) AsNumber() (
	*int,
	bool)

func (*AnyOfNumberVehicle) AsVehicle added in v0.0.26

func (s *AnyOfNumberVehicle) AsVehicle() (
	*Vehicle[bool],
	bool)

func (AnyOfNumberVehicle) MarshalJSON added in v0.0.26

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

MarshalJSON implements the json.Marshaller interface for AnyOfNumberVehicle. It customizes the JSON marshaling process for AnyOfNumberVehicle objects.

func (AnyOfNumberVehicle) String added in v0.0.26

func (s AnyOfNumberVehicle) String() string

String converts the AnyOfNumberVehicle object to a string representation.

func (*AnyOfNumberVehicle) UnmarshalJSON added in v0.0.26

func (s *AnyOfNumberVehicle) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for AnyOfNumberVehicle. It customizes the JSON unmarshalling process for AnyOfNumberVehicle objects.

type Atom added in v0.0.26

type Atom struct {
	NumberOfElectrons int `json:"number_of_electrons"`
	NumberOfProtons   int `json:"number_of_protons"`
}

func (*Atom) UnmarshalJSON added in v0.0.26

func (a *Atom) UnmarshalJSON(input []byte) error

type Bike added in v0.0.26

type Bike struct {
	Id       int                  `json:"id"`
	Roof     *string              `json:"roof"`
	AirLevel types.Optional[Atom] `json:"air_level"`
	Type     *string              `json:"type"`
}

func (*Bike) UnmarshalJSON added in v0.0.26

func (b *Bike) UnmarshalJSON(input []byte) error

type Car added in v0.0.26

type Car struct {
	Id   int     `json:"id"`
	Roof *string `json:"roof"`
	Type *string `json:"type"`
}

func (*Car) UnmarshalJSON added in v0.0.26

func (c *Car) UnmarshalJSON(input []byte) error

type MonthNameEnum

type MonthNameEnum string

MonthNameEnum is a string enum. An enum representing the months of a year

const (
	MonthNameEnum_JANUARY  MonthNameEnum = "January"
	MonthNameEnum_FEBRUARY MonthNameEnum = "February"
	MonthNameEnum_MARCH    MonthNameEnum = "March"
)

type MonthNumberEnum

type MonthNumberEnum int

MonthNumberEnum is an int enum. An enum representing the months of a year

const (
	MonthNumberEnum_JANUARY  MonthNumberEnum = 1
	MonthNumberEnum_FEBRUARY MonthNumberEnum = 2
	MonthNumberEnum_MARCH    MonthNumberEnum = 3
)

type Truck added in v0.0.26

type Truck struct {
	Id     int     `json:"id"`
	Weight string  `json:"weight"`
	Roof   *string `json:"roof"`
}

func (*Truck) UnmarshalJSON added in v0.0.26

func (c *Truck) UnmarshalJSON(input []byte) error

type Vehicle added in v0.0.26

type Vehicle[T any] struct {
	Year                 int          `json:"year"`
	Make                 *string      `json:"make"`
	Model                *string      `json:"model"`
	AdditionalProperties map[string]T `json:"_"`
}

func (Vehicle[T]) MarshalJSON added in v0.0.26

func (v Vehicle[T]) MarshalJSON() (
	[]byte,
	error)

func (*Vehicle[T]) UnmarshalJSON added in v0.0.26

func (v *Vehicle[T]) UnmarshalJSON(input []byte) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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