Documentation ¶
Index ¶
- func And(filter interface{}, key string, f interface{}) interface{}
- func NewDatasetSchemas(datasetSchemas []*dataset.Schema, f scene.IDList) ([]interface{}, []string)
- func NewDatasets(datasets []*dataset.Dataset, f scene.IDList) ([]interface{}, []string)
- func NewLayers(layers layer.List, f scene.IDList) ([]interface{}, []string)
- func NewProperties(properties []*property.Property, f scene.IDList) ([]interface{}, []string)
- func NewPropertySchemas(ps []*property.Schema, f scene.IDList) ([]interface{}, []string)
- func NewTags(tags []*tag.Tag, f scene.IDList) ([]interface{}, []string)
- func ToModelInfobox(ib *LayerInfoboxDocument) (*layer.Infobox, error)
- func ToModelPropertySchemaField(f *PropertySchemaFieldDocument) (*property.SchemaField, error)
- type AssetConsumer
- type AssetDocument
- type Auth
- type AuthRequestConsumer
- type AuthRequestDocument
- type BatchConsumer
- type Client
- func (c *Client) BeginTransaction() (repo.Tx, error)
- func (c *Client) Collection(col string) *mongo.Collection
- func (c *Client) Count(ctx context.Context, col string, filter interface{}) (int64, error)
- func (c *Client) CreateIndex(ctx context.Context, col string, keys []string) []string
- func (c *Client) CreateUniqueIndex(ctx context.Context, col string, keys, uniqueKeys []string) []string
- func (c *Client) Find(ctx context.Context, col string, filter interface{}, consumer Consumer) error
- func (c *Client) FindOne(ctx context.Context, col string, filter interface{}, consumer Consumer) error
- func (c *Client) Paginate(ctx context.Context, col string, filter interface{}, sort *string, ...) (*usecase.PageInfo, error)
- func (c *Client) RemoveAll(ctx context.Context, col string, f interface{}) error
- func (c *Client) RemoveOne(ctx context.Context, col string, f interface{}) error
- func (c *Client) SaveAll(ctx context.Context, col string, ids []string, updates []interface{}) error
- func (c *Client) SaveOne(ctx context.Context, col string, id string, replacement interface{}) error
- func (c *Client) UpdateMany(ctx context.Context, col string, filter, update interface{}) error
- func (c *Client) UpdateManyMany(ctx context.Context, col string, updates []Update) error
- func (c *Client) WithCollection(col string) *ClientCollection
- type ClientCollection
- func (c *ClientCollection) Collection() *mongo.Collection
- func (c *ClientCollection) Count(ctx context.Context, filter interface{}) (int64, error)
- func (c *ClientCollection) CreateIndex(ctx context.Context, keys []string) []string
- func (c *ClientCollection) CreateUniqueIndex(ctx context.Context, keys, uniqueKeys []string) []string
- func (c *ClientCollection) Find(ctx context.Context, filter interface{}, consumer Consumer) error
- func (c *ClientCollection) FindOne(ctx context.Context, filter interface{}, consumer Consumer) error
- func (c *ClientCollection) Paginate(ctx context.Context, filter interface{}, sort *string, p *usecase.Pagination, ...) (*usecase.PageInfo, error)
- func (c *ClientCollection) RemoveAll(ctx context.Context, f interface{}) error
- func (c *ClientCollection) RemoveOne(ctx context.Context, f interface{}) error
- func (c *ClientCollection) SaveAll(ctx context.Context, ids []string, updates []interface{}) error
- func (c *ClientCollection) SaveOne(ctx context.Context, id string, replacement interface{}) error
- func (c *ClientCollection) UpdateMany(ctx context.Context, filter interface{}, update interface{}) error
- func (c *ClientCollection) UpdateManyMany(ctx context.Context, updates []Update) error
- type CodeChallengeDocument
- type ConfigDocument
- type Consumer
- type DatasetBatchConsumer
- type DatasetConsumer
- type DatasetDocument
- type DatasetExtendedDocument
- type DatasetFieldDocument
- type DatasetMapConsumer
- type DatasetSchemaConsumer
- type DatasetSchemaDocument
- type DatasetSchemaFieldDocument
- type FuncConsumer
- type LayerConsumer
- type LayerDocument
- type LayerGroupDocument
- type LayerInfoboxDocument
- type LayerInfoboxFieldDocument
- type LayerItemDocument
- type LayerTagDocument
- type LayerTagListDocument
- type Pagination
- type PasswordResetDocument
- type PluginConsumer
- type PluginDocument
- type PluginExtensionDocument
- type ProjectConsumer
- type ProjectDocument
- type PropertyBatchConsumer
- type PropertyConditonDocument
- type PropertyConsumer
- type PropertyDocument
- type PropertyFieldDocument
- type PropertyItemDocument
- type PropertyLinkDocument
- type PropertyLinkableFieldsDocument
- type PropertySchemaConsumer
- type PropertySchemaDocument
- type PropertySchemaFieldChoiceDocument
- type PropertySchemaFieldDocument
- type PropertySchemaFieldPointerDocument
- type PropertySchemaGroupDocument
- type SceneClusterDocument
- type SceneConsumer
- type SceneDocument
- type SceneIDConsumer
- type SceneIDDocument
- type SceneLockConsumer
- type SceneLockDocument
- type ScenePluginDocument
- type SceneWidgetDocument
- type TagConsumer
- type TagDocument
- type TagGroupDocument
- type TagItemDocument
- type TeamConsumer
- type TeamDocument
- type TeamMemberDocument
- type Tx
- type Update
- type UserConsumer
- type UserDocument
- type UserVerificationDoc
- type WidgetAlignSystemDocument
- type WidgetAreaDocument
- type WidgetExtendableDocument
- type WidgetLayoutDocument
- type WidgetLocationDocument
- type WidgetSectionDocument
- type WidgetZoneDocument
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewDatasetSchemas ¶
func NewDatasets ¶
func NewProperties ¶
func NewPropertySchemas ¶
func ToModelInfobox ¶
func ToModelInfobox(ib *LayerInfoboxDocument) (*layer.Infobox, error)
func ToModelPropertySchemaField ¶
func ToModelPropertySchemaField(f *PropertySchemaFieldDocument) (*property.SchemaField, error)
Types ¶
type AssetConsumer ¶
type AssetDocument ¶
type AuthRequestConsumer ¶ added in v0.6.0
type AuthRequestDocument ¶ added in v0.6.0
type AuthRequestDocument struct { ID string ClientID string Subject string Code string State string ResponseType string Scopes []string Audiences []string RedirectURI string Nonce string CodeChallenge *CodeChallengeDocument CreatedAt time.Time AuthorizedAt *time.Time }
func NewAuthRequest ¶ added in v0.6.0
func NewAuthRequest(req *auth.Request) (*AuthRequestDocument, string)
type BatchConsumer ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) BeginTransaction ¶ added in v0.3.0
func (*Client) Collection ¶
func (c *Client) Collection(col string) *mongo.Collection
func (*Client) CreateIndex ¶
func (*Client) CreateUniqueIndex ¶ added in v0.6.0
func (*Client) UpdateMany ¶ added in v0.5.0
func (*Client) UpdateManyMany ¶ added in v0.5.0
func (*Client) WithCollection ¶
func (c *Client) WithCollection(col string) *ClientCollection
type ClientCollection ¶
func (*ClientCollection) Collection ¶
func (c *ClientCollection) Collection() *mongo.Collection
func (*ClientCollection) Count ¶
func (c *ClientCollection) Count(ctx context.Context, filter interface{}) (int64, error)
func (*ClientCollection) CreateIndex ¶
func (c *ClientCollection) CreateIndex(ctx context.Context, keys []string) []string
func (*ClientCollection) CreateUniqueIndex ¶ added in v0.6.0
func (c *ClientCollection) CreateUniqueIndex(ctx context.Context, keys, uniqueKeys []string) []string
func (*ClientCollection) Find ¶
func (c *ClientCollection) Find(ctx context.Context, filter interface{}, consumer Consumer) error
func (*ClientCollection) FindOne ¶
func (c *ClientCollection) FindOne(ctx context.Context, filter interface{}, consumer Consumer) error
func (*ClientCollection) Paginate ¶
func (c *ClientCollection) Paginate(ctx context.Context, filter interface{}, sort *string, p *usecase.Pagination, consumer Consumer) (*usecase.PageInfo, error)
func (*ClientCollection) RemoveAll ¶
func (c *ClientCollection) RemoveAll(ctx context.Context, f interface{}) error
func (*ClientCollection) RemoveOne ¶
func (c *ClientCollection) RemoveOne(ctx context.Context, f interface{}) error
func (*ClientCollection) SaveAll ¶
func (c *ClientCollection) SaveAll(ctx context.Context, ids []string, updates []interface{}) error
func (*ClientCollection) SaveOne ¶
func (c *ClientCollection) SaveOne(ctx context.Context, id string, replacement interface{}) error
func (*ClientCollection) UpdateMany ¶ added in v0.5.0
func (c *ClientCollection) UpdateMany(ctx context.Context, filter interface{}, update interface{}) error
func (*ClientCollection) UpdateManyMany ¶ added in v0.5.0
func (c *ClientCollection) UpdateManyMany(ctx context.Context, updates []Update) error
type CodeChallengeDocument ¶ added in v0.6.0
type ConfigDocument ¶ added in v0.3.0
func NewConfig ¶ added in v0.3.0
func NewConfig(c config.Config) ConfigDocument
func (*ConfigDocument) Model ¶ added in v0.3.0
func (c *ConfigDocument) Model() *config.Config
type DatasetBatchConsumer ¶
type DatasetConsumer ¶
type DatasetDocument ¶
type DatasetDocument struct { ID string Source string Schema string Fields []*DatasetFieldDocument Scene string }
func NewDataset ¶
func NewDataset(dataset *dataset.Dataset) (*DatasetDocument, string)
type DatasetExtendedDocument ¶
type DatasetExtendedDocument struct { DatasetDocument Graph []*DatasetExtendedDocument Depth int }
type DatasetFieldDocument ¶
type DatasetMapConsumer ¶
type DatasetSchemaConsumer ¶
type DatasetSchemaDocument ¶
type DatasetSchemaDocument struct { ID string Source string Name string Fields []*DatasetSchemaFieldDocument RepresentativeField *string Scene string Dynamic bool }
func NewDatasetSchema ¶
func NewDatasetSchema(dataset *dataset.Schema) (*DatasetSchemaDocument, string)
type FuncConsumer ¶
type LayerConsumer ¶
type LayerDocument ¶
type LayerDocument struct { ID string Name string Visible bool Scene string Plugin *string Extension *string Property *string Infobox *LayerInfoboxDocument Item *LayerItemDocument Group *LayerGroupDocument Tags LayerTagListDocument }
func (*LayerDocument) ModelGroup ¶
func (d *LayerDocument) ModelGroup() (*layer.Group, error)
type LayerGroupDocument ¶
type LayerInfoboxDocument ¶
type LayerInfoboxDocument struct { Property string Fields []LayerInfoboxFieldDocument }
type LayerItemDocument ¶
type LayerItemDocument struct {
LinkedDataset *string
}
type LayerTagDocument ¶ added in v0.3.0
type LayerTagDocument struct { ID string Group bool Tags []LayerTagDocument }
func NewLayerTag ¶ added in v0.3.0
func NewLayerTag(t layer.Tag) *LayerTagDocument
func (*LayerTagDocument) Model ¶ added in v0.3.0
func (d *LayerTagDocument) Model() layer.Tag
type LayerTagListDocument ¶ added in v0.3.0
type LayerTagListDocument []LayerTagDocument
func NewLayerTagList ¶ added in v0.3.0
func NewLayerTagList(list *layer.TagList) LayerTagListDocument
func (*LayerTagListDocument) Model ¶ added in v0.3.0
func (d *LayerTagListDocument) Model() *layer.TagList
type Pagination ¶ added in v0.6.0
func PaginationFrom ¶ added in v0.6.0
func PaginationFrom(pagination *usecase.Pagination) *Pagination
func (*Pagination) Parameters ¶ added in v0.6.0
func (p *Pagination) Parameters() (limit int64, op string, cursor *string, err error)
func (*Pagination) SortDirection ¶ added in v0.6.0
func (p *Pagination) SortDirection() int
type PasswordResetDocument ¶ added in v0.6.0
func (*PasswordResetDocument) Model ¶ added in v0.6.0
func (d *PasswordResetDocument) Model() *user1.PasswordReset
type PluginConsumer ¶
type PluginDocument ¶
type PluginExtensionDocument ¶
type ProjectConsumer ¶
type ProjectDocument ¶
type ProjectDocument struct { ID string Archived bool IsBasicAuthActive bool BasicAuthUsername string BasicAuthPassword string UpdatedAt time.Time PublishedAt time.Time Name string Description string Alias string ImageURL string PublicTitle string PublicDescription string PublicImage string PublicNoIndex bool Team string Visualizer string PublishmentStatus string }
func NewProject ¶
func NewProject(project *project.Project) (*ProjectDocument, string)
type PropertyBatchConsumer ¶
type PropertyConsumer ¶
type PropertyDocument ¶
type PropertyDocument struct { ID string Scene string Schema string `bson:",omitempty"` // compatibility SchemaPlugin string SchemaName string Items []*PropertyItemDocument }
func NewProperty ¶
func NewProperty(property *property.Property) (*PropertyDocument, string)
type PropertyFieldDocument ¶
type PropertyFieldDocument struct { Field string Type string Links []*PropertyLinkDocument Value interface{} }
type PropertyItemDocument ¶
type PropertyItemDocument struct { Type string ID string SchemaGroup string Groups []*PropertyItemDocument Fields []*PropertyFieldDocument }
type PropertyLinkDocument ¶
type PropertyLinkableFieldsDocument ¶
type PropertyLinkableFieldsDocument struct { LatLng *PropertySchemaFieldPointerDocument URL *PropertySchemaFieldPointerDocument }
func ToDocPropertyLinkableFields ¶
func ToDocPropertyLinkableFields(l property.LinkableFields) *PropertyLinkableFieldsDocument
type PropertySchemaConsumer ¶
type PropertySchemaDocument ¶
type PropertySchemaDocument struct { ID string Scene *string `bson:",omitempty"` Version int Groups []*PropertySchemaGroupDocument LinkableFields *PropertyLinkableFieldsDocument }
func NewPropertySchema ¶
func NewPropertySchema(m *property.Schema) (*PropertySchemaDocument, string)
type PropertySchemaFieldDocument ¶
type PropertySchemaFieldDocument struct { ID string Type string Name map[string]string Description map[string]string Prefix string Suffix string DefaultValue interface{} UI *string Min *float64 Max *float64 Choices []PropertySchemaFieldChoiceDocument }
func NewPropertySchemaField ¶
func NewPropertySchemaField(f *property.SchemaField) *PropertySchemaFieldDocument
type PropertySchemaFieldPointerDocument ¶ added in v0.5.0
type PropertySchemaGroupDocument ¶
type PropertySchemaGroupDocument struct { ID string Fields []*PropertySchemaFieldDocument List bool IsAvailableIf *PropertyConditonDocument Title map[string]string }
func (*PropertySchemaGroupDocument) Model ¶ added in v0.4.0
func (d *PropertySchemaGroupDocument) Model() (*property.SchemaGroup, error)
type SceneClusterDocument ¶ added in v0.3.0
type SceneConsumer ¶
type SceneDocument ¶
type SceneDocument struct { ID string Project string Team string RootLayer string Widgets []SceneWidgetDocument AlignSystem *WidgetAlignSystemDocument Plugins []ScenePluginDocument UpdateAt time.Time Property string Clusters []SceneClusterDocument }
type SceneIDConsumer ¶
type SceneIDDocument ¶
type SceneIDDocument struct {
ID string
}
type SceneLockConsumer ¶
type SceneLockDocument ¶
func NewSceneLock ¶
func NewSceneLock(sceneID id.SceneID, lock scene.LockMode) *SceneLockDocument
type ScenePluginDocument ¶
type SceneWidgetDocument ¶
type TagConsumer ¶
type TagDocument ¶
type TagDocument struct { ID string Label string Scene string Item *TagItemDocument Group *TagGroupDocument }
func (*TagDocument) ModelGroup ¶
func (d *TagDocument) ModelGroup() (*tag.Group, error)
type TagGroupDocument ¶
type TagGroupDocument struct {
Tags []string
}
type TagItemDocument ¶
type TeamConsumer ¶
type TeamDocument ¶
type TeamDocument struct { ID string Name string Members map[string]TeamMemberDocument Personal bool }
type TeamMemberDocument ¶
type TeamMemberDocument struct {
Role string
}
type Update ¶ added in v0.5.0
type Update struct { Filter interface{} Update interface{} ArrayFilters []interface{} }
type UserConsumer ¶
type UserDocument ¶
type UserVerificationDoc ¶ added in v0.6.0
type WidgetAlignSystemDocument ¶
type WidgetAlignSystemDocument struct { Inner *WidgetZoneDocument Outer *WidgetZoneDocument }
func NewWidgetAlignSystem ¶
func NewWidgetAlignSystem(was *scene.WidgetAlignSystem) *WidgetAlignSystemDocument
func (*WidgetAlignSystemDocument) Model ¶
func (d *WidgetAlignSystemDocument) Model() *scene.WidgetAlignSystem
type WidgetAreaDocument ¶
func NewWidgetArea ¶
func NewWidgetArea(a *scene.WidgetArea) *WidgetAreaDocument
func (*WidgetAreaDocument) Model ¶
func (a *WidgetAreaDocument) Model() *scene.WidgetArea
type WidgetLayoutDocument ¶
type WidgetLayoutDocument struct { Extendable *WidgetExtendableDocument Extended bool Floating bool DefaultLocation *WidgetLocationDocument }
func NewWidgetLayout ¶
func NewWidgetLayout(l *plugin.WidgetLayout) *WidgetLayoutDocument
func (*WidgetLayoutDocument) Model ¶
func (d *WidgetLayoutDocument) Model() *plugin.WidgetLayout
type WidgetLocationDocument ¶
func NewWidgetLocation ¶
func NewWidgetLocation(l *plugin.WidgetLocation) *WidgetLocationDocument
func (*WidgetLocationDocument) Model ¶
func (d *WidgetLocationDocument) Model() *plugin.WidgetLocation
type WidgetSectionDocument ¶
type WidgetSectionDocument struct { Top *WidgetAreaDocument Middle *WidgetAreaDocument Bottom *WidgetAreaDocument }
func NewWidgetSection ¶
func NewWidgetSection(s *scene.WidgetSection) *WidgetSectionDocument
func (*WidgetSectionDocument) Model ¶
func (d *WidgetSectionDocument) Model() *scene.WidgetSection
type WidgetZoneDocument ¶
type WidgetZoneDocument struct { Left *WidgetSectionDocument Center *WidgetSectionDocument Right *WidgetSectionDocument }
func NewWidgetZone ¶
func NewWidgetZone(z *scene.WidgetZone) *WidgetZoneDocument
func (*WidgetZoneDocument) Model ¶
func (d *WidgetZoneDocument) Model() *scene.WidgetZone
Click to show internal directories.
Click to hide internal directories.