Documentation
¶
Index ¶
- Constants
- func ReadFromHTTP(cl *http.Client, url string) ([]byte, error)
- type Contact
- type Enumerate
- type EnumerateValue
- type EnumerateValueSlices
- type Enums
- func (e *Enums) All() iter.Seq2[string, *Enumerate]
- func (e *Enums) Keys() []string
- func (e *Enums) Len() int
- func (e *Enums) Maps() map[string]*Enumerate
- func (e *Enums) MarshalJSON() ([]byte, error)
- func (e *Enums) Set(key string, value *Enumerate) *Enums
- func (e *Enums) UnmarshalJSON(data []byte) error
- func (e *Enums) Value(key string) *Enumerate
- func (e *Enums) Values() iter.Seq[*Enumerate]
- type Info
- type Loader
- type T
Constants ¶
View Source
const ( TypeInteger = "integer" TypeString = "string" )
View Source
const Version = "1.0.0"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Enumerate ¶
type Enumerate struct {
Type string `json:"type"` // 枚举数据类型, string, integer
Format string `json:"format"` // 枚举类型真实类型, string: 就是string, integer: 真实的整数类型,
Description string `json:"description"` // 枚举注释
Explain string `json:"explain"` // 枚举详细解释
Oneof []*EnumerateValue `json:"oneof"` // 枚举项
}
type EnumerateValue ¶
type EnumerateValueSlices ¶
type EnumerateValueSlices []*EnumerateValue
func (EnumerateValueSlices) Explain ¶
func (vs EnumerateValueSlices) Explain() string
Explain convert to explain string format [0:aaa,1:bbb,3:ccc]
type Enums ¶
type Enums struct {
// contains filtered or unexported fields
}
func (*Enums) MarshalJSON ¶
func (*Enums) UnmarshalJSON ¶
type Info ¶
type Info struct {
Version string `json:"version,omitempty" yaml:"version,omitempty"`
Title string `json:"title,omitempty" yaml:"title,omitempty"`
Summary string `json:"summary,omitempty" yaml:"summary,omitempty"`
Description string `json:"description,omitempty" yaml:"description,omitempty"`
Contact *Contact `json:"contact,omitempty" yaml:"contact,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.