Documentation ¶
Overview ¶
Licensed to Elasticsearch B.V. under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. Elasticsearch B.V. licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Identifier ¶ added in v0.0.10
Identifier generates the non-unique identifier for the type, disregarding it being a e.g. a list or pointer, and will thus be the same for both *Foo and Foo. Use Type's UID for a unique identifier.
Types ¶
type Field ¶
type Field struct { Name string Embedded bool // Embedded struct in Go typing Inlined bool // Inlined struct in serialization Doc string Default string Validation []string Markers markers.MarkerValues Type *Type }
Field describes a field in a struct.
type GroupVersionDetails ¶
type GroupVersionDetails struct { schema.GroupVersion Doc string Kinds []string Types TypeMap }
GroupVersionDetails encapsulates details about a discovered API group.
func (GroupVersionDetails) GroupVersionString ¶
func (gvd GroupVersionDetails) GroupVersionString() string
func (GroupVersionDetails) SortedKinds ¶ added in v0.0.5
func (gvd GroupVersionDetails) SortedKinds() []string
func (GroupVersionDetails) SortedTypes ¶
func (gvd GroupVersionDetails) SortedTypes() []*Type
func (GroupVersionDetails) TypeForKind ¶
func (gvd GroupVersionDetails) TypeForKind(k string) *Type
type Kind ¶
type Kind int
Kind describes the kind of the type (alias, array, etc.)
func (Kind) MarshalJSON ¶
func (*Kind) UnmarshalJSON ¶
type Type ¶
type Type struct { UID string `json:"uid"` Name string `json:"name"` Package string `json:"package"` Doc string `json:"doc"` Default string `json:"default"` Validation []string `json:"validation"` Markers markers.MarkerValues `json:"markers"` GVK *schema.GroupVersionKind `json:"gvk"` Kind Kind `json:"kind"` Imported bool `json:"imported"` UnderlyingType *Type `json:"underlyingType"` // for aliases, slices and pointers KeyType *Type `json:"keyType"` // for maps ValueType *Type `json:"valueType"` // for maps Fields Fields `json:"fields"` // for structs References []*Type `json:"-"` // other types that refer to this type EnumValues []EnumValue `json:"enumValues"` // for enum values of aliased string types }
Type describes a declared type
func (*Type) ContainsInlinedTypes ¶ added in v0.0.9
func (*Type) SortedReferences ¶ added in v0.0.3
type TypeMap ¶ added in v0.0.9
TypeMap is a map of Type elements
func (TypeMap) InlineTypes ¶ added in v0.0.9
func (TypeMap) PropagateMarkers ¶ added in v0.0.11
func (types TypeMap) PropagateMarkers()
PropagateMarkers propagates markers to struct fields and certain types, from their underlying types.