models

package
v2.1.1770+incompatible Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type BadRequestError

type BadRequestError struct {
	Message  string            `json:"message"`
	Location ErrorLocation     `json:"location"`
	Errors   []ValidationError `json:"errors,omitempty"`
}

func (BadRequestError) MarshalJSON

func (obj BadRequestError) MarshalJSON() ([]byte, error)

func (*BadRequestError) UnmarshalJSON

func (obj *BadRequestError) UnmarshalJSON(data []byte) error

type Choice

type Choice string
const (
	ChoiceFirstChoice  Choice = "FIRST_CHOICE"
	ChoiceSecondChoice Choice = "SECOND_CHOICE"
	ChoiceThirdChoice  Choice = "THIRD_CHOICE"
)

func (*Choice) UnmarshalJSON

func (self *Choice) UnmarshalJSON(b []byte) error

type ErrorLocation

type ErrorLocation string
const (
	ErrorLocationQuery  ErrorLocation = "query"
	ErrorLocationHeader ErrorLocation = "header"
	ErrorLocationBody   ErrorLocation = "body"
)

func (*ErrorLocation) UnmarshalJSON

func (self *ErrorLocation) UnmarshalJSON(b []byte) error

type Everything

type Everything struct {
	BodyField      Message         `json:"body_field"`
	FloatQuery     float32         `json:"float_query"`
	BoolQuery      bool            `json:"bool_query"`
	UuidHeader     uuid.UUID       `json:"uuid_header"`
	DatetimeHeader civil.DateTime  `json:"datetime_header"`
	DateUrl        civil.Date      `json:"date_url"`
	DecimalUrl     decimal.Decimal `json:"decimal_url"`
}

func (Everything) MarshalJSON

func (obj Everything) MarshalJSON() ([]byte, error)

func (*Everything) UnmarshalJSON

func (obj *Everything) UnmarshalJSON(data []byte) error

type InternalServerError

type InternalServerError struct {
	Message string `json:"message"`
}

func (InternalServerError) MarshalJSON

func (obj InternalServerError) MarshalJSON() ([]byte, error)

func (*InternalServerError) UnmarshalJSON

func (obj *InternalServerError) UnmarshalJSON(data []byte) error

type Message

type Message struct {
	IntField    int    `json:"int_field"`
	StringField string `json:"string_field"`
}

func (Message) MarshalJSON

func (obj Message) MarshalJSON() ([]byte, error)

func (*Message) UnmarshalJSON

func (obj *Message) UnmarshalJSON(data []byte) error

type NotFoundError

type NotFoundError struct {
	Message string `json:"message"`
}

func (NotFoundError) MarshalJSON

func (obj NotFoundError) MarshalJSON() ([]byte, error)

func (*NotFoundError) UnmarshalJSON

func (obj *NotFoundError) UnmarshalJSON(data []byte) error

type Parameters

type Parameters struct {
	IntField             int             `json:"int_field"`
	LongField            int64           `json:"long_field"`
	FloatField           float32         `json:"float_field"`
	DoubleField          float64         `json:"double_field"`
	DecimalField         decimal.Decimal `json:"decimal_field"`
	BoolField            bool            `json:"bool_field"`
	StringField          string          `json:"string_field"`
	StringOptField       *string         `json:"string_opt_field,omitempty"`
	StringDefaultedField string          `json:"string_defaulted_field"`
	StringArrayField     []string        `json:"string_array_field"`
	UuidField            uuid.UUID       `json:"uuid_field"`
	DateField            civil.Date      `json:"date_field"`
	DateArrayField       []civil.Date    `json:"date_array_field"`
	DatetimeField        civil.DateTime  `json:"datetime_field"`
	EnumField            Choice          `json:"enum_field"`
}

func (Parameters) MarshalJSON

func (obj Parameters) MarshalJSON() ([]byte, error)

func (*Parameters) UnmarshalJSON

func (obj *Parameters) UnmarshalJSON(data []byte) error

type UrlParameters

type UrlParameters struct {
	IntField      int             `json:"int_field"`
	LongField     int64           `json:"long_field"`
	FloatField    float32         `json:"float_field"`
	DoubleField   float64         `json:"double_field"`
	DecimalField  decimal.Decimal `json:"decimal_field"`
	BoolField     bool            `json:"bool_field"`
	StringField   string          `json:"string_field"`
	UuidField     uuid.UUID       `json:"uuid_field"`
	DateField     civil.Date      `json:"date_field"`
	DatetimeField civil.DateTime  `json:"datetime_field"`
	EnumField     Choice          `json:"enum_field"`
}

func (UrlParameters) MarshalJSON

func (obj UrlParameters) MarshalJSON() ([]byte, error)

func (*UrlParameters) UnmarshalJSON

func (obj *UrlParameters) UnmarshalJSON(data []byte) error

type ValidationError

type ValidationError struct {
	Path    string  `json:"path"`
	Code    string  `json:"code"`
	Message *string `json:"message,omitempty"`
}

func (ValidationError) MarshalJSON

func (obj ValidationError) MarshalJSON() ([]byte, error)

func (*ValidationError) UnmarshalJSON

func (obj *ValidationError) UnmarshalJSON(data []byte) error

Jump to

Keyboard shortcuts

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