models

package
v0.0.0-...-9e80a2d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 12, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dataset

type Dataset struct {
	ID              primitive.ObjectID     `json:"id,omitempty"`
	Title           string                 `json:"title,omitempty" validate:"required"`
	ParentTemplates []primitive.ObjectID   `json:"parentTemplates,omitempty" validate:"required"`
	Data            map[string]interface{} `json:"data,omitempty" validate:"required"`
}

Arbitrary set of data used to build customizable Charts. Expectations & restrictions can be set by assigning a parent template via its ID to the Dataset instance

type DatasetTemplate

type DatasetTemplate struct {
	ID     primitive.ObjectID     `json:"id,omitempty"`
	Title  string                 `json:"title,omitempty" validate:"required"`
	Schema map[string]interface{} `json:"schema,omitempty" validate:"required"`
}

Struct containing properties that compliant datasets will have. DatasetTemplate.Schema is simply json schema unmarshaled into map[string]interface{}. A Dataset's compliance to a DatasetTemplate is determined by validation via a json-schema library

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL