Documentation ¶
Index ¶
- Variables
- func FromCesiumResourcePropsDocument(r CesiumResourcePropsDocument) workspacesettings.CesiumResourceProps
- func FromResourceDocument(r *ResourceDocument) *workspacesettings.Resource
- func FromResourceListDocument(wr *ResourceListDocument) *workspacesettings.ResourceList
- func FromResources(rd []*ResourceDocument) []*workspacesettings.Resource
- func FromUrlResourcePropsDocument(r UrlResourcePropsDocument) workspacesettings.UrlResourceProps
- func ModelFrom(obj Document) (res any, err error)
- func NewConsumer[T Model[U], U any]() *mongox.SliceFuncConsumer[T, U]
- type AndConditionDocument
- type AssetAndFileConsumer
- type AssetAndFileDocument
- type AssetConsumer
- type AssetDocument
- type AssetFileDocument
- type AssetFilesConsumer
- type AssetFilesDocument
- type AssetFilesPageDocument
- type AssetUploadConsumer
- type AssetUploadDocument
- type BasicConditionDocument
- type BoolConditionDocument
- type CesiumResourcePropsDocument
- type ColumnDocument
- type CommentDocument
- type Document
- type EventConsumer
- type EventDocument
- type FieldDocument
- type FieldGeometryEditorPropertyDocument
- type FieldGeometryObjectPropertyDocument
- type FieldGroupPropertyDocument
- type FieldIntegerPropertyDocument
- type FieldNumberPropertyDocument
- type FieldReferencePropertyDocument
- type FieldSelectPropertyDocument
- type FieldSelectorDocument
- type FieldTagPropertyDocument
- type FieldTagValueDocument
- type FieldTextPropertyDocument
- type FilterDocument
- type GroupConsumer
- type GroupDocument
- type IntegrationConsumer
- type IntegrationDocument
- type ItemConsumer
- type ItemDocument
- type ItemFieldDocument
- type Model
- type ModelConsumer
- type ModelDocument
- type MultipleConditionDocument
- type NullableConditionDocument
- type NumberConditionDocument
- type OrConditionDocument
- type ProjectConsumer
- type ProjectDocument
- type ProjectPublicationDocument
- type RequestConsumer
- type RequestDocument
- type RequestItem
- type ResourceDocument
- type ResourceListDocument
- type SchemaConsumer
- type SchemaDocument
- type SortDocument
- type StringConditionDocument
- type TerrainResourceDocument
- type ThreadConsumer
- type ThreadDocument
- type TileResourceDocument
- type TimeConditionDocument
- type Type
- type TypePropertyDocument
- type UrlResourcePropsDocument
- type ValueDocument
- type VersionedItemConsumer
- type ViewConsumer
- type ViewDocument
- type WebhookDocument
- type WorkspaceSettingsConsumer
- type WorkspaceSettingsDocument
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func FromCesiumResourcePropsDocument ¶
func FromCesiumResourcePropsDocument(r CesiumResourcePropsDocument) workspacesettings.CesiumResourceProps
func FromResourceDocument ¶
func FromResourceDocument(r *ResourceDocument) *workspacesettings.Resource
func FromResourceListDocument ¶
func FromResourceListDocument(wr *ResourceListDocument) *workspacesettings.ResourceList
func FromResources ¶
func FromResources(rd []*ResourceDocument) []*workspacesettings.Resource
func FromUrlResourcePropsDocument ¶
func FromUrlResourcePropsDocument(r UrlResourcePropsDocument) workspacesettings.UrlResourceProps
func NewConsumer ¶
func NewConsumer[T Model[U], U any]() *mongox.SliceFuncConsumer[T, U]
Types ¶
type AndConditionDocument ¶
type AndConditionDocument struct {
Conditions []FilterDocument
}
type AssetAndFileConsumer ¶
type AssetAndFileConsumer = mongox.SliceConsumer[*AssetAndFileDocument]
type AssetAndFileDocument ¶
type AssetAndFileDocument struct { ID string File *AssetFileDocument FlatFiles bool }
type AssetConsumer ¶
type AssetConsumer = mongox.SliceFuncConsumer[*AssetDocument, *asset.Asset]
func NewAssetConsumer ¶
func NewAssetConsumer() *AssetConsumer
type AssetDocument ¶
type AssetFileDocument ¶
type AssetFileDocument struct { Name string Size uint64 ContentType string Path string Children []*AssetFileDocument }
func NewFile ¶
func NewFile(f *asset.File) *AssetFileDocument
func (*AssetFileDocument) Model ¶
func (f *AssetFileDocument) Model() *asset.File
type AssetFilesConsumer ¶
type AssetFilesConsumer struct {
// contains filtered or unexported fields
}
func (*AssetFilesConsumer) Result ¶
func (a *AssetFilesConsumer) Result() AssetFilesDocument
type AssetFilesDocument ¶
type AssetFilesDocument []*AssetFilesPageDocument
func (AssetFilesDocument) Model ¶
func (d AssetFilesDocument) Model() []*asset.File
type AssetFilesPageDocument ¶
type AssetFilesPageDocument struct { AssetID string Page int Files []*AssetFileDocument }
type AssetUploadConsumer ¶
type AssetUploadConsumer = mongox.SliceFuncConsumer[*AssetUploadDocument, *asset.Upload]
func NewAssetUploadConsumer ¶
func NewAssetUploadConsumer() *AssetUploadConsumer
type AssetUploadDocument ¶
type AssetUploadDocument struct { UUID string `bson:"uuid"` Project string `bson:"project"` FileName string `bson:"filename"` ExpiresAt time.Time `bson:"expires_at"` ContentLength int64 `bson:"content_length"` }
func NewAssetUpload ¶
func NewAssetUpload(u *asset.Upload) *AssetUploadDocument
type BasicConditionDocument ¶
type BasicConditionDocument struct { Field FieldSelectorDocument Op string Value any }
type BoolConditionDocument ¶
type BoolConditionDocument struct { Field FieldSelectorDocument Op string Value bool }
type CesiumResourcePropsDocument ¶
type CesiumResourcePropsDocument struct { Name string URL string Image string CesiumIonAssetID string CesiumIonAccessToken string }
func ToCesiumResourcePropsDocument ¶
func ToCesiumResourcePropsDocument(r workspacesettings.CesiumResourceProps) CesiumResourcePropsDocument
type ColumnDocument ¶
type ColumnDocument struct { Field FieldSelectorDocument Visible bool }
func NewColumn ¶
func NewColumn(i view.Column) ColumnDocument
func (*ColumnDocument) Model ¶
func (d *ColumnDocument) Model() view.Column
type CommentDocument ¶
func NewComment ¶
func NewComment(c *thread.Comment) *CommentDocument
func (*CommentDocument) Model ¶
func (c *CommentDocument) Model() *thread.Comment
type EventConsumer ¶
type EventConsumer = mongox.SliceFuncConsumer[*EventDocument, *event.Event[any]]
func NewEventConsumer ¶
func NewEventConsumer() *EventConsumer
type EventDocument ¶
type FieldDocument ¶
type FieldGeometryEditorPropertyDocument ¶
type FieldGeometryEditorPropertyDocument struct {
SupportedTypes []string
}
type FieldGeometryObjectPropertyDocument ¶
type FieldGeometryObjectPropertyDocument struct {
SupportedTypes []string
}
type FieldGroupPropertyDocument ¶
type FieldGroupPropertyDocument struct {
Group string
}
type FieldSelectPropertyDocument ¶
type FieldSelectPropertyDocument struct {
Values []string
}
type FieldSelectorDocument ¶
func NewFieldSelector ¶
func NewFieldSelector(i view.FieldSelector) FieldSelectorDocument
func (FieldSelectorDocument) Model ¶
func (d FieldSelectorDocument) Model() view.FieldSelector
type FieldTagPropertyDocument ¶
type FieldTagPropertyDocument struct {
Tags []FieldTagValueDocument
}
type FieldTagValueDocument ¶
type FieldTextPropertyDocument ¶
type FieldTextPropertyDocument struct {
MaxLength *int
}
type FilterDocument ¶
type FilterDocument struct { ConditionType string AndCondition *AndConditionDocument OrCondition *OrConditionDocument BasicCondition *BasicConditionDocument NullableCondition *NullableConditionDocument MultipleCondition *MultipleConditionDocument BoolCondition *BoolConditionDocument StringCondition *StringConditionDocument NumberCondition *NumberConditionDocument TimeCondition *TimeConditionDocument }
func NewFilter ¶
func NewFilter(i *view.Condition) *FilterDocument
func (*FilterDocument) Model ¶
func (d *FilterDocument) Model() *view.Condition
type GroupConsumer ¶
type GroupConsumer = mongox.SliceFuncConsumer[*GroupDocument, *group.Group]
func NewGroupConsumer ¶
func NewGroupConsumer() *GroupConsumer
type GroupDocument ¶
type IntegrationConsumer ¶
type IntegrationConsumer = mongox.SliceFuncConsumer[*IntegrationDocument, *integration.Integration]
func NewIntegrationConsumer ¶
func NewIntegrationConsumer() *IntegrationConsumer
type IntegrationDocument ¶
type IntegrationDocument struct { ID string Name string Description string LogoUrl string Type string Token string Developer string Webhook []WebhookDocument UpdatedAt time.Time }
func NewIntegration ¶
func NewIntegration(i *integration.Integration) (*IntegrationDocument, string)
func (*IntegrationDocument) Model ¶
func (d *IntegrationDocument) Model() (*integration.Integration, error)
type ItemConsumer ¶
type ItemConsumer = mongox.SliceFuncConsumer[*ItemDocument, *item.Item]
func NewItemConsumer ¶
func NewItemConsumer() *ItemConsumer
type ItemDocument ¶
type ItemDocument struct { ID string Project string Schema string Thread string ModelID string Fields []ItemFieldDocument Timestamp time.Time User *string Integration *string Assets []string `bson:"assets,omitempty"` MetadataItem *string IsMetadata bool OriginalItem *string UpdatedByUser *string UpdatedByIntegration *string }
type ItemFieldDocument ¶
type ModelConsumer ¶
type ModelConsumer = mongox.SliceFuncConsumer[*ModelDocument, *model.Model]
func NewModelConsumer ¶
func NewModelConsumer() *ModelConsumer
type ModelDocument ¶
type MultipleConditionDocument ¶
type MultipleConditionDocument struct { Field FieldSelectorDocument Op string Value []any }
type NullableConditionDocument ¶
type NullableConditionDocument struct { Field FieldSelectorDocument Op string }
type NumberConditionDocument ¶
type NumberConditionDocument struct { Field FieldSelectorDocument Op string Value float64 }
type OrConditionDocument ¶
type OrConditionDocument struct {
Conditions []FilterDocument
}
type ProjectConsumer ¶
type ProjectConsumer = mongox.SliceFuncConsumer[*ProjectDocument, *project.Project]
func NewProjectConsumer ¶
func NewProjectConsumer() *ProjectConsumer
type ProjectDocument ¶
type ProjectDocument struct { ID string UpdatedAt time.Time Name string Description string Alias string ImageURL string Workspace string Publication *ProjectPublicationDocument RequestRoles []string }
func NewProject ¶
func NewProject(project *project.Project) (*ProjectDocument, string)
type ProjectPublicationDocument ¶
func NewProjectPublication ¶
func NewProjectPublication(p *project.Publication) *ProjectPublicationDocument
func (*ProjectPublicationDocument) Model ¶
func (d *ProjectPublicationDocument) Model() *project.Publication
type RequestConsumer ¶
type RequestConsumer = mongox.SliceFuncConsumer[*RequestDocument, *request.Request]
func NewRequestConsumer ¶
func NewRequestConsumer() *RequestConsumer
type RequestDocument ¶
type RequestDocument struct { ID string Workspace string Project string Items []RequestItem Title string Description string CreatedBy string Reviewers []string State string UpdatedAt time.Time ApprovedAt *time.Time ClosedAt *time.Time Thread string }
func NewRequest ¶
func NewRequest(r *request.Request) (*RequestDocument, string)
func NewRequests ¶
func NewRequests(requests request.List) ([]*RequestDocument, []string)
type RequestItem ¶
type ResourceDocument ¶
type ResourceDocument struct { ResourceType string Tile *TileResourceDocument Terrain *TerrainResourceDocument }
func ToResourceDocument ¶
func ToResourceDocument(r *workspacesettings.Resource) *ResourceDocument
func ToResources ¶
func ToResources(rs []*workspacesettings.Resource) []*ResourceDocument
type ResourceListDocument ¶
type ResourceListDocument struct { Resources []*ResourceDocument SelectedResource *string Enabled *bool // only in terrains }
func ToResourceListDocument ¶
func ToResourceListDocument(wr *workspacesettings.ResourceList) *ResourceListDocument
type SchemaConsumer ¶
type SchemaConsumer = mongox.SliceFuncConsumer[*SchemaDocument, *schema.Schema]
func NewSchemaConsumer ¶
func NewSchemaConsumer() *SchemaConsumer
type SchemaDocument ¶
type SchemaDocument struct { ID string Workspace string Project string Fields []FieldDocument TitleField *string }
type SortDocument ¶
type SortDocument struct { Field FieldSelectorDocument Direction string }
func NewSort ¶
func NewSort(i *view.Sort) *SortDocument
func (*SortDocument) Model ¶
func (d *SortDocument) Model() *view.Sort
type StringConditionDocument ¶
type StringConditionDocument struct { Field FieldSelectorDocument Op string Value string }
type TerrainResourceDocument ¶
type TerrainResourceDocument struct { ID string Type string Props CesiumResourcePropsDocument }
func ToTerrainResourceDocument ¶
func ToTerrainResourceDocument(r *workspacesettings.TerrainResource) *TerrainResourceDocument
type ThreadConsumer ¶
type ThreadConsumer = mongox.SliceFuncConsumer[*ThreadDocument, *thread.Thread]
func NewThreadConsumer ¶
func NewThreadConsumer() *ThreadConsumer
type ThreadDocument ¶
type ThreadDocument struct { ID string Workspace string Comments []*CommentDocument }
func NewThreads ¶
func NewThreads(a thread.List) ([]ThreadDocument, []string)
type TileResourceDocument ¶
type TileResourceDocument struct { ID string Type string Props UrlResourcePropsDocument }
func ToTileResourceDocument ¶
func ToTileResourceDocument(r *workspacesettings.TileResource) *TileResourceDocument
type TimeConditionDocument ¶
type TimeConditionDocument struct { Field FieldSelectorDocument Op string Value time.Time }
type TypePropertyDocument ¶
type TypePropertyDocument struct { Type string Text *FieldTextPropertyDocument `bson:",omitempty"` TextArea *FieldTextPropertyDocument `bson:",omitempty"` RichText *FieldTextPropertyDocument `bson:",omitempty"` Markdown *FieldTextPropertyDocument `bson:",omitempty"` Select *FieldSelectPropertyDocument `bson:",omitempty"` Tag *FieldTagPropertyDocument `bson:",omitempty"` Number *FieldNumberPropertyDocument `bson:",omitempty"` Integer *FieldIntegerPropertyDocument `bson:",omitempty"` Reference *FieldReferencePropertyDocument `bson:",omitempty"` Group *FieldGroupPropertyDocument `bson:",omitempty"` GeometryObject *FieldGeometryObjectPropertyDocument `bson:",omitempty"` GeometryEditor *FieldGeometryEditorPropertyDocument `bson:",omitempty"` }
type UrlResourcePropsDocument ¶
func ToUrlResourcePropsDocument ¶
func ToUrlResourcePropsDocument(r workspacesettings.UrlResourceProps) UrlResourcePropsDocument
type ValueDocument ¶
func NewMultipleValue ¶
func NewMultipleValue(v *value.Multiple) *ValueDocument
func NewOptionalValue ¶
func NewOptionalValue(v *value.Optional) *ValueDocument
func NewValue ¶
func NewValue(v *value.Value) *ValueDocument
func (*ValueDocument) MultipleValue ¶
func (d *ValueDocument) MultipleValue() *value.Multiple
func (*ValueDocument) OptionalValue ¶
func (d *ValueDocument) OptionalValue() *value.Optional
func (*ValueDocument) Value ¶
func (d *ValueDocument) Value() *value.Value
type VersionedItemConsumer ¶
type VersionedItemConsumer = mongox.SliceFuncConsumer[*mongogit.Document[*ItemDocument], *version.Value[*item.Item]]
func NewVersionedItemConsumer ¶
func NewVersionedItemConsumer() *VersionedItemConsumer
type ViewConsumer ¶
type ViewConsumer = mongox.SliceFuncConsumer[*ViewDocument, *view.View]
func NewViewConsumer ¶
func NewViewConsumer() *ViewConsumer
type ViewDocument ¶
type ViewDocument struct { ID string Name string User string Project string ModelId string Schema string Sort *SortDocument Filter *FilterDocument Columns []ColumnDocument Order int UpdatedAt time.Time }
type WebhookDocument ¶
type WorkspaceSettingsConsumer ¶
type WorkspaceSettingsConsumer = mongox.SliceFuncConsumer[*WorkspaceSettingsDocument, *workspacesettings.WorkspaceSettings]
func NewWorkspaceSettingsConsumer ¶
func NewWorkspaceSettingsConsumer() *WorkspaceSettingsConsumer
type WorkspaceSettingsDocument ¶
type WorkspaceSettingsDocument struct { ID string Tiles *ResourceListDocument Terrains *ResourceListDocument }
func NewWorkspaceSettings ¶
func NewWorkspaceSettings(ws *workspacesettings.WorkspaceSettings) (*WorkspaceSettingsDocument, string)
func (*WorkspaceSettingsDocument) Model ¶
func (wsd *WorkspaceSettingsDocument) Model() (*workspacesettings.WorkspaceSettings, error)
Click to show internal directories.
Click to hide internal directories.