Documentation ¶
Overview ¶
Code generated with example-data.json DO NOT EDIT.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ExampleData = map[string]json.RawMessage{}/* 2092 elements not displayed */
ExampleData is a generated value from the OpenSlides example data.
It is a map from key (fqfield) to the value encoded to json.
Functions ¶
Types ¶
type AttributeGenericRelation ¶
type AttributeGenericRelation struct { To ToGeneric `yaml:"to"` // contains filtered or unexported fields }
AttributeGenericRelation is a generic-relation or generic-relation-list field.
func (AttributeGenericRelation) List ¶ added in v0.2.0
func (r AttributeGenericRelation) List() bool
List tells, if the object is a generic-relation-list.
func (AttributeGenericRelation) ToCollections ¶ added in v0.2.0
func (r AttributeGenericRelation) ToCollections() []ToCollectionField
ToCollections returns all collection, where the generic field could point to.
type AttributeRelation ¶
type AttributeRelation struct { To To `yaml:"to"` // contains filtered or unexported fields }
AttributeRelation is a relation or relation-list field.
func (AttributeRelation) List ¶ added in v0.2.0
func (r AttributeRelation) List() bool
List returns true, if object is an attribute-relation-list
func (AttributeRelation) ToCollections ¶ added in v0.2.0
func (r AttributeRelation) ToCollections() []ToCollectionField
ToCollections returns the names of the collections there the attribute points to. It is allways a slice with one element.
type AttributeTemplate ¶
type AttributeTemplate struct { Replacement string `yaml:"replacement"` Fields Field `yaml:"fields"` }
AttributeTemplate represents a template field.
type Field ¶ added in v0.2.0
type Field struct { Type string // contains filtered or unexported fields }
Field of a model.
func (*Field) Relation ¶ added in v0.2.0
Relation returns the relation object if the Field is a relation or a template with a relation. In other cases, it returns nil.
func (*Field) UnmarshalYAML ¶ added in v0.2.0
UnmarshalYAML decodes a model attribute from yaml.
type Model ¶
Model replresents one model from models.yml.
func (*Model) UnmarshalYAML ¶
UnmarshalYAML decodes a yaml model to models.Model.
type Relation ¶
type Relation interface { ToCollections() []ToCollectionField List() bool }
Relation represents some kind of relation between fields.
type To ¶
type To struct {
CollectionField ToCollectionField
}
To is shows a Relation where to point to.
func (*To) UnmarshalYAML ¶
UnmarshalYAML decodes the models.yml to a To object.
type ToCollectionField ¶ added in v0.2.0
type ToCollectionField struct { Collection string `yaml:"collection"` ToField ToField `yaml:"field"` }
ToCollectionField represents a field and a collection
func (*ToCollectionField) UnmarshalYAML ¶ added in v0.2.0
func (t *ToCollectionField) UnmarshalYAML(value *yaml.Node) error
UnmarshalYAML decodes the models.yml to a To object.
type ToField ¶
ToField is
func (*ToField) UnmarshalYAML ¶
UnmarshalYAML decodes the models.yml to a ToField object.
type ToGeneric ¶
type ToGeneric struct {
CollectionFields []ToCollectionField
}
ToGeneric is like a To object, but for generic relations.
func (*ToGeneric) UnmarshalYAML ¶ added in v0.2.0
UnmarshalYAML unmarshalls data to a ToGeneric object.
Directories ¶
Path | Synopsis |
---|---|
This tool generates the example data by loading the json file from the openslides repo.
|
This tool generates the example data by loading the json file from the openslides repo. |