Documentation
¶
Index ¶
- Constants
- type AnnotationsCollector
- func (c *AnnotationsCollector) Collect(s raml.Shape) map[metadata.GJsonPath]metadata.Annotations
- func (c *AnnotationsCollector) Visit(ctx string, s raml.Shape)
- func (c *AnnotationsCollector) VisitArrayShape(ctx string, s *raml.ArrayShape) any
- func (c *AnnotationsCollector) VisitObjectShape(ctx string, s *raml.ObjectShape) any
- func (c *AnnotationsCollector) VisitUnionShape(ctx string, s *raml.UnionShape) any
- type Collector
- func (c *Collector) Collect(isLocal bool) error
- func (c *Collector) MakeMetadataInstanceFromExtension(id string, definedBy *raml.ArrayShape, values map[string]interface{}, ...) *metadata.Entity
- func (c *Collector) MakeMetadataTypeFromShape(id string, shape *raml.BaseShape) (*metadata.Entity, error)
- func (c *Collector) SetRaml(r *raml.RAML)
- type MetadataRegistry
Constants ¶
View Source
const MetadataPrefix = "cti."
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AnnotationsCollector ¶
type AnnotationsCollector struct {
// contains filtered or unexported fields
}
func NewAnnotationsCollector ¶
func NewAnnotationsCollector() *AnnotationsCollector
func (*AnnotationsCollector) Collect ¶
func (c *AnnotationsCollector) Collect(s raml.Shape) map[metadata.GJsonPath]metadata.Annotations
func (*AnnotationsCollector) Visit ¶
func (c *AnnotationsCollector) Visit(ctx string, s raml.Shape)
func (*AnnotationsCollector) VisitArrayShape ¶
func (c *AnnotationsCollector) VisitArrayShape(ctx string, s *raml.ArrayShape) any
func (*AnnotationsCollector) VisitObjectShape ¶
func (c *AnnotationsCollector) VisitObjectShape(ctx string, s *raml.ObjectShape) any
func (*AnnotationsCollector) VisitUnionShape ¶
func (c *AnnotationsCollector) VisitUnionShape(ctx string, s *raml.UnionShape) any
type Collector ¶
type Collector struct { // Local Registry holds entities that are declared by the package. LocalRegistry *MetadataRegistry // Global Registry holds all entities collected during the session. May include both local and external entities. GlobalRegistry *MetadataRegistry // contains filtered or unexported fields }
func (*Collector) MakeMetadataInstanceFromExtension ¶
func (*Collector) MakeMetadataTypeFromShape ¶
type MetadataRegistry ¶
type MetadataRegistry struct { // TODO: Too many indexes that are not efficient on operations other than add. Types metadata.EntitiesMap Instances metadata.EntitiesMap FragmentEntities map[string]metadata.Entities Index metadata.EntitiesMap }
func NewMetadataRegistry ¶ added in v0.33.0
func NewMetadataRegistry() *MetadataRegistry
func (*MetadataRegistry) Add ¶ added in v0.33.0
func (r *MetadataRegistry) Add(originalPath string, entity *metadata.Entity) error
func (*MetadataRegistry) Clone ¶
func (r *MetadataRegistry) Clone() *MetadataRegistry
Click to show internal directories.
Click to hide internal directories.