model

package
v0.0.0-...-d78187d Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Model

type Model struct {
	fixture.CommonType

	// Field1 description
	//schema:example mystring
	//schema:default def
	Field1 string `json:"field1"`

	//openapi:format uri
	Field2 int `json:"field2"`
	Field3 float32
	Field4 time.Time         `json:"timestamp"`
	Field5 *refPrivat        `json:"field5"`
	Field6 RefExported       `json:"field6"`
	Field7 []string          `json:"field7"`
	Field8 map[string]string `json:"field8"`
	// contains filtered or unexported fields
}

Model is a fixture for rendering models

type Problem

type Problem struct {
	// Type identify problem type RFC-9457#3.1.1
	//schema:format uri
	Type string `json:"type,omitempty"`

	// Status is the http status code and must be consistent with the server status code RFC-9457#3.1.2
	Status *int `json:"status,omitempty"`

	// Title is short humanreadable summary RFC-9457#3.1.3
	Title string `json:"title,omitempty"`

	// Detail is humanreadable explanation of the specific occurence of the problem RFC-9457#3.1.4
	Detail string `json:"detail,omitempty"`

	// Instance identifies the specific instance of the problem RFC-9457#3.1.5
	Instance string `json:"instance,omitempty"`

	// Err is containing wrapped error and will not be serialized to JSON
	Err error `json:"-"`
}

Problem is simple implementation of RFC9457

type RefExported

type RefExported struct {
	RE string `jsong:"re"`
}

Jump to

Keyboard shortcuts

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