Documentation ¶
Index ¶
- Variables
- func DatasetGraphLoaderFrom(r Dataset) dataset.GraphLoader
- func DatasetLoaderFrom(r Dataset) dataset.Loader
- func IterateProjectsByTeam(repo Project, ctx context.Context, tid id.TeamID, batch int, ...) error
- func LayerLoaderBySceneFrom(r Layer) layer.LoaderByScene
- func LayerLoaderFrom(r Layer) layer.Loader
- func PluginLoaderFrom(r Plugin) plugin.Loader
- func PropertyLoaderFrom(r Property) property.Loader
- func PropertySchemaLoaderFrom(r PropertySchema) property.SchemaLoader
- func TagLoaderFrom(r Tag) tag.Loader
- func TagSceneLoaderFrom(r Tag, scenes []id.SceneID) tag.SceneLoader
- type Asset
- type AssetFilter
- type AuthRequest
- type Config
- type Container
- type Dataset
- type DatasetSchema
- type Layer
- type Lock
- type Plugin
- type Project
- type Property
- type PropertySchema
- type Scene
- type SceneFilter
- type SceneLock
- type Tag
- type Team
- type TeamFilter
- type Transaction
- type Tx
- type User
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrFailedToLock = errors.New("failed to lock") ErrAlreadyLocked = errors.New("already locked") ErrNotLocked = errors.New("not locked") )
View Source
var (
ErrOperationDenied = errors.New("operation denied")
)
Functions ¶
func DatasetGraphLoaderFrom ¶
func DatasetGraphLoaderFrom(r Dataset) dataset.GraphLoader
func DatasetLoaderFrom ¶
func IterateProjectsByTeam ¶
func LayerLoaderBySceneFrom ¶
func LayerLoaderBySceneFrom(r Layer) layer.LoaderByScene
func LayerLoaderFrom ¶
func PluginLoaderFrom ¶
func PropertyLoaderFrom ¶
func PropertySchemaLoaderFrom ¶
func PropertySchemaLoaderFrom(r PropertySchema) property.SchemaLoader
func TagLoaderFrom ¶ added in v0.5.0
func TagSceneLoaderFrom ¶ added in v0.5.0
func TagSceneLoaderFrom(r Tag, scenes []id.SceneID) tag.SceneLoader
Types ¶
type Asset ¶
type Asset interface { Filtered(TeamFilter) Asset FindByTeam(context.Context, id.TeamID, AssetFilter) ([]*asset.Asset, *usecase.PageInfo, error) FindByID(context.Context, id.AssetID) (*asset.Asset, error) FindByIDs(context.Context, id.AssetIDList) ([]*asset.Asset, error) Save(context.Context, *asset.Asset) error Remove(context.Context, id.AssetID) error }
type AssetFilter ¶ added in v0.6.0
type AssetFilter struct { Sort *asset.SortType Keyword *string Pagination *usecase.Pagination }
type AuthRequest ¶ added in v0.6.0
type AuthRequest interface { FindByID(context.Context, id.AuthRequestID) (*auth.Request, error) FindByCode(context.Context, string) (*auth.Request, error) FindBySubject(context.Context, string) (*auth.Request, error) Save(context.Context, *auth.Request) error Remove(context.Context, id.AuthRequestID) error }
type Container ¶
type Container struct { Asset Asset AuthRequest AuthRequest Config Config DatasetSchema DatasetSchema Dataset Dataset Layer Layer Lock Lock Plugin Plugin Project Project PropertySchema PropertySchema Property Property Scene Scene SceneLock SceneLock Tag Tag Team Team Transaction Transaction User User }
func (*Container) Filtered ¶ added in v0.6.0
func (c *Container) Filtered(team TeamFilter, scene SceneFilter) *Container
type Dataset ¶
type Dataset interface { Filtered(SceneFilter) Dataset FindByID(context.Context, id.DatasetID) (*dataset.Dataset, error) FindByIDs(context.Context, id.DatasetIDList) (dataset.List, error) FindBySchema(context.Context, id.DatasetSchemaID, *usecase.Pagination) (dataset.List, *usecase.PageInfo, error) CountBySchema(context.Context, id.DatasetSchemaID) (int, error) FindBySchemaAll(context.Context, id.DatasetSchemaID) (dataset.List, error) FindGraph(context.Context, id.DatasetID, id.DatasetFieldIDList) (dataset.List, error) Save(context.Context, *dataset.Dataset) error SaveAll(context.Context, dataset.List) error Remove(context.Context, id.DatasetID) error RemoveAll(context.Context, id.DatasetIDList) error RemoveByScene(context.Context, id.SceneID) error }
type DatasetSchema ¶
type DatasetSchema interface { Filtered(SceneFilter) DatasetSchema FindByID(context.Context, id.DatasetSchemaID) (*dataset.Schema, error) FindByIDs(context.Context, id.DatasetSchemaIDList) (dataset.SchemaList, error) FindByScene(context.Context, id.SceneID, *usecase.Pagination) (dataset.SchemaList, *usecase.PageInfo, error) FindBySceneAll(context.Context, id.SceneID) (dataset.SchemaList, error) FindBySceneAndSource(context.Context, id.SceneID, string) (dataset.SchemaList, error) FindDynamicByID(context.Context, id.DatasetSchemaID) (*dataset.Schema, error) FindAllDynamicByScene(context.Context, id.SceneID) (dataset.SchemaList, error) Save(context.Context, *dataset.Schema) error SaveAll(context.Context, dataset.SchemaList) error Remove(context.Context, id.DatasetSchemaID) error RemoveAll(context.Context, id.DatasetSchemaIDList) error RemoveByScene(context.Context, id.SceneID) error }
type Layer ¶
type Layer interface { Filtered(SceneFilter) Layer FindByID(context.Context, id.LayerID) (layer.Layer, error) FindByIDs(context.Context, id.LayerIDList) (layer.List, error) FindItemByID(context.Context, id.LayerID) (*layer.Item, error) FindItemByIDs(context.Context, id.LayerIDList) (layer.ItemList, error) FindAllByDatasetSchema(context.Context, id.DatasetSchemaID) (layer.List, error) FindGroupByID(context.Context, id.LayerID) (*layer.Group, error) FindGroupByIDs(context.Context, id.LayerIDList) (layer.GroupList, error) FindGroupBySceneAndLinkedDatasetSchema(context.Context, id.SceneID, id.DatasetSchemaID) (layer.GroupList, error) FindParentByID(context.Context, id.LayerID) (*layer.Group, error) FindParentsByIDs(context.Context, id.LayerIDList) (layer.GroupList, error) FindByPluginAndExtension(context.Context, id.PluginID, *id.PluginExtensionID) (layer.List, error) FindByPluginAndExtensionOfBlocks(context.Context, id.PluginID, *id.PluginExtensionID) (layer.List, error) FindByProperty(context.Context, id.PropertyID) (layer.Layer, error) FindByScene(context.Context, id.SceneID) (layer.List, error) FindByTag(context.Context, id.TagID) (layer.List, error) Save(context.Context, layer.Layer) error SaveAll(context.Context, layer.List) error UpdatePlugin(context.Context, id.PluginID, id.PluginID) error Remove(context.Context, id.LayerID) error RemoveAll(context.Context, id.LayerIDList) error RemoveByScene(context.Context, id.SceneID) error }
type Project ¶
type Project interface { Filtered(TeamFilter) Project FindByIDs(context.Context, id.ProjectIDList) ([]*project.Project, error) FindByID(context.Context, id.ProjectID) (*project.Project, error) FindByTeam(context.Context, id.TeamID, *usecase.Pagination) ([]*project.Project, *usecase.PageInfo, error) FindByPublicName(context.Context, string) (*project.Project, error) CountByTeam(context.Context, id.TeamID) (int, error) Save(context.Context, *project.Project) error Remove(context.Context, id.ProjectID) error }
type Property ¶
type Property interface { Filtered(SceneFilter) Property FindByID(context.Context, id.PropertyID) (*property.Property, error) FindByIDs(context.Context, id.PropertyIDList) (property.List, error) FindLinkedAll(context.Context, id.SceneID) (property.List, error) FindByDataset(context.Context, id.DatasetSchemaID, id.DatasetID) (property.List, error) FindBySchema(context.Context, []id.PropertySchemaID, id.SceneID) (property.List, error) FindByPlugin(context.Context, id.PluginID, id.SceneID) (property.List, error) Save(context.Context, *property.Property) error SaveAll(context.Context, property.List) error UpdateSchemaPlugin(context.Context, id.PluginID, id.PluginID, id.SceneID) error Remove(context.Context, id.PropertyID) error RemoveAll(context.Context, id.PropertyIDList) error RemoveByScene(context.Context, id.SceneID) error }
type PropertySchema ¶
type PropertySchema interface { Filtered(SceneFilter) PropertySchema FindByID(context.Context, id.PropertySchemaID) (*property.Schema, error) FindByIDs(context.Context, []id.PropertySchemaID) (property.SchemaList, error) Save(context.Context, *property.Schema) error SaveAll(context.Context, property.SchemaList) error Remove(context.Context, id.PropertySchemaID) error RemoveAll(context.Context, []id.PropertySchemaID) error }
type Scene ¶
type Scene interface { Filtered(TeamFilter) Scene FindByID(context.Context, id.SceneID) (*scene.Scene, error) FindByIDs(context.Context, id.SceneIDList) (scene.List, error) FindByTeam(context.Context, ...id.TeamID) (scene.List, error) FindByProject(context.Context, id.ProjectID) (*scene.Scene, error) Save(context.Context, *scene.Scene) error Remove(context.Context, id.SceneID) error }
type SceneFilter ¶ added in v0.6.0
func SceneFilterFromOperator ¶ added in v0.6.0
func SceneFilterFromOperator(o *usecase.Operator) SceneFilter
func (SceneFilter) Clone ¶ added in v0.6.0
func (f SceneFilter) Clone() SceneFilter
func (SceneFilter) Merge ¶ added in v0.6.0
func (f SceneFilter) Merge(g SceneFilter) SceneFilter
type Tag ¶
type Tag interface { Filtered(SceneFilter) Tag FindByID(context.Context, id.TagID) (tag.Tag, error) FindByIDs(context.Context, id.TagIDList) ([]*tag.Tag, error) FindByScene(context.Context, id.SceneID) ([]*tag.Tag, error) FindItemByID(context.Context, id.TagID) (*tag.Item, error) FindItemByIDs(context.Context, id.TagIDList) ([]*tag.Item, error) FindGroupByID(context.Context, id.TagID) (*tag.Group, error) FindGroupByIDs(context.Context, id.TagIDList) ([]*tag.Group, error) FindRootsByScene(context.Context, id.SceneID) ([]*tag.Tag, error) FindGroupByItem(context.Context, id.TagID) (*tag.Group, error) Save(context.Context, tag.Tag) error SaveAll(context.Context, []*tag.Tag) error Remove(context.Context, id.TagID) error RemoveAll(context.Context, id.TagIDList) error RemoveByScene(context.Context, id.SceneID) error }
type Team ¶
type Team interface { FindByUser(context.Context, id.UserID) (user.TeamList, error) FindByIDs(context.Context, id.TeamIDList) (user.TeamList, error) FindByID(context.Context, id.TeamID) (*user.Team, error) Save(context.Context, *user.Team) error SaveAll(context.Context, []*user.Team) error Remove(context.Context, id.TeamID) error RemoveAll(context.Context, id.TeamIDList) error }
type TeamFilter ¶ added in v0.6.0
type TeamFilter struct { Readable user.TeamIDList Writable user.TeamIDList }
func TeamFilterFromOperator ¶ added in v0.6.0
func TeamFilterFromOperator(o *usecase.Operator) TeamFilter
func (TeamFilter) Clone ¶ added in v0.6.0
func (f TeamFilter) Clone() TeamFilter
func (TeamFilter) Merge ¶ added in v0.6.0
func (f TeamFilter) Merge(g TeamFilter) TeamFilter
type Transaction ¶
type Tx ¶
type Tx interface { // Commit informs Tx to commit when End() is called. // If this was not called once, rollback is done when End() is called. Commit() // End finishes the transaction and do commit if Commit() was called once, or else do rollback. // This method is supposed to be called in the uscase layer using defer. End(context.Context) error IsCommitted() bool }
type User ¶
type User interface { FindByIDs(context.Context, id.UserIDList) ([]*user.User, error) FindByID(context.Context, id.UserID) (*user.User, error) FindByAuth0Sub(context.Context, string) (*user.User, error) FindByEmail(context.Context, string) (*user.User, error) FindByName(context.Context, string) (*user.User, error) FindByNameOrEmail(context.Context, string) (*user.User, error) FindByVerification(context.Context, string) (*user.User, error) FindByPasswordResetRequest(context.Context, string) (*user.User, error) Save(context.Context, *user.User) error Remove(context.Context, id.UserID) error }
Click to show internal directories.
Click to hide internal directories.