package
0.0.9
Repository: https://github.com/grafana/cog.git
Documentation: pkg.go.dev

# Functions

No description provided by the author
No description provided by the author

# Structs

AddFields rewrites the definition of an object to add new fields.
AddObject adds a new object to a schema.
AnonymousEnumToExplicitType turns "anonymous enums" into a named object.
AnonymousStructsToNamed turns "anonymous structs" into a named object.
AppendCommentObjects appends the given comment to every object definition.
No description provided by the author
DisjunctionInferMapping infers the discriminator field and mapping used to describe a disjunction of references.
DisjunctionOfAnonymousStructsToExplicit looks for anonymous structs used as branches of disjunctions and turns them into explicitly named types.
DisjunctionToType transforms disjunction into a struct, mapping disjunction branches to an optional and nullable field in that struct.
No description provided by the author
DisjunctionWithNullToOptional simplifies disjunctions with two branches, where one is `null`.
DuplicateObject duplicates the source object.
No description provided by the author
FieldsSetDefault sets the default value for the given fields.
FieldsSetNotRequired rewrites the definition of given fields to mark them as nullable and not required.
FieldsSetRequired rewrites the definition of given fields to mark them as not nullable and required.
FilterSchemas filters a schema to only include the allowed objects and their dependencies.
FlattenDisjunctions will traverse all the branches every given disjunctions and, for each disjunction it finds, flatten it into the top-level type.
No description provided by the author
No description provided by the author
InlineObjectsWithTypes inlines objects of the given types.
NameAnonymousStruct rewrites the definition of a struct field typed as an anonymous struct to instead refer to a named type.
NotRequiredFieldAsNullableType identifies all the struct fields marked as not `Required` and rewrites their `Type` to be `Nullable`.
No description provided by the author
Omit rewrites schemas to omit the configured objects.
PrefixEnumValues prefixes enum members with the name of the enum object in which they are defined.
PrefixObjectNames adds the given prefix to every object's name.
No description provided by the author
RenameNumericEnumValues turns any numeric enum member name to an alphanumeric name.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
SchemaSetIdentifier overwrites the Metadata.Identifier field of a schema.
SetDatasourceToDataquery uses dashboard.DataSourceRef reference for the datasource field in each dataquery.
UndiscriminatedDisjunctionToAny turns any undiscriminated disjunction into the `any` type.
Unspec removes the Kubernetes-style envelope added by kindsys.
No description provided by the author

# Interfaces

No description provided by the author

# Type aliases

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author