memory

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2022 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New added in v0.8.0

func New() *repo.Container

func NewAsset

func NewAsset() repo.Asset

func NewAuthRequest added in v0.6.0

func NewAuthRequest() repo.AuthRequest

func NewConfig

func NewConfig() repo.Config

func NewDataset

func NewDataset() repo.Dataset

func NewDatasetSchema

func NewDatasetSchema() repo.DatasetSchema

func NewLayer

func NewLayer() repo.Layer

func NewLock added in v0.3.0

func NewLock() repo.Lock

func NewPlugin

func NewPlugin() repo.Plugin

func NewProject

func NewProject() repo.Project

func NewProperty

func NewProperty() repo.Property

func NewPropertySchema

func NewPropertySchema() repo.PropertySchema

func NewScene

func NewScene() repo.Scene

func NewSceneLock

func NewSceneLock() repo.SceneLock

func NewTag

func NewTag() repo.Tag

func NewTeam

func NewTeam() repo.Team

func NewUser

func NewUser() repo.User

Types

type Asset

type Asset struct {
	// contains filtered or unexported fields
}

func (*Asset) Filtered added in v0.6.0

func (r *Asset) Filtered(f repo.TeamFilter) repo.Asset

func (*Asset) FindByID

func (r *Asset) FindByID(ctx context.Context, id id.AssetID) (*asset.Asset, error)

func (*Asset) FindByIDs

func (r *Asset) FindByIDs(ctx context.Context, ids id.AssetIDList) ([]*asset.Asset, error)

func (*Asset) FindByTeam

func (r *Asset) FindByTeam(ctx context.Context, id id.TeamID, filter repo.AssetFilter) ([]*asset.Asset, *usecase.PageInfo, error)

func (*Asset) Remove

func (r *Asset) Remove(ctx context.Context, id id.AssetID) error

func (*Asset) Save

func (r *Asset) Save(ctx context.Context, a *asset.Asset) error

type AuthRequest added in v0.6.0

type AuthRequest struct {
	// contains filtered or unexported fields
}

func (*AuthRequest) FindByCode added in v0.6.0

func (r *AuthRequest) FindByCode(_ context.Context, s string) (*auth.Request, error)

func (*AuthRequest) FindByID added in v0.6.0

func (r *AuthRequest) FindByID(_ context.Context, id id.AuthRequestID) (*auth.Request, error)

func (*AuthRequest) FindBySubject added in v0.6.0

func (r *AuthRequest) FindBySubject(_ context.Context, s string) (*auth.Request, error)

func (*AuthRequest) Remove added in v0.6.0

func (r *AuthRequest) Remove(_ context.Context, requestID id.AuthRequestID) error

func (*AuthRequest) Save added in v0.6.0

func (r *AuthRequest) Save(_ context.Context, request *auth.Request) error

type Config

type Config struct {
	// contains filtered or unexported fields
}

func (*Config) LockAndLoad added in v0.3.0

func (r *Config) LockAndLoad(ctx context.Context) (*config.Config, error)

func (*Config) Save

func (r *Config) Save(ctx context.Context, c *config.Config) error

func (*Config) SaveAndUnlock added in v0.3.0

func (r *Config) SaveAndUnlock(ctx context.Context, c *config.Config) error

func (*Config) Unlock added in v0.3.0

func (r *Config) Unlock(_ context.Context) error

type Dataset

type Dataset struct {
	// contains filtered or unexported fields
}

func (*Dataset) CountBySchema added in v0.8.0

func (r *Dataset) CountBySchema(ctx context.Context, id id.DatasetSchemaID) (int, error)

func (*Dataset) Filtered added in v0.6.0

func (r *Dataset) Filtered(f repo.SceneFilter) repo.Dataset

func (*Dataset) FindByID

func (r *Dataset) FindByID(ctx context.Context, id id.DatasetID) (*dataset.Dataset, error)

func (*Dataset) FindByIDs

func (r *Dataset) FindByIDs(ctx context.Context, ids id.DatasetIDList) (dataset.List, error)

func (*Dataset) FindBySchema

func (*Dataset) FindBySchemaAll

func (r *Dataset) FindBySchemaAll(ctx context.Context, id id.DatasetSchemaID) (dataset.List, error)

func (*Dataset) FindGraph

func (r *Dataset) FindGraph(ctx context.Context, i id.DatasetID, fields id.DatasetFieldIDList) (dataset.List, error)

func (*Dataset) Remove

func (r *Dataset) Remove(ctx context.Context, id id.DatasetID) error

func (*Dataset) RemoveAll

func (r *Dataset) RemoveAll(ctx context.Context, ids id.DatasetIDList) error

func (*Dataset) RemoveByScene

func (r *Dataset) RemoveByScene(ctx context.Context, sceneID id.SceneID) error

func (*Dataset) Save

func (r *Dataset) Save(ctx context.Context, d *dataset.Dataset) error

func (*Dataset) SaveAll

func (r *Dataset) SaveAll(ctx context.Context, dl dataset.List) error

type DatasetSchema

type DatasetSchema struct {
	// contains filtered or unexported fields
}

func (*DatasetSchema) Filtered added in v0.6.0

func (*DatasetSchema) FindAllDynamicByScene

func (r *DatasetSchema) FindAllDynamicByScene(ctx context.Context, s id.SceneID) (dataset.SchemaList, error)

func (*DatasetSchema) FindByID

func (*DatasetSchema) FindByIDs

func (*DatasetSchema) FindByScene

func (*DatasetSchema) FindBySceneAll

func (r *DatasetSchema) FindBySceneAll(ctx context.Context, s id.SceneID) (dataset.SchemaList, error)

func (*DatasetSchema) FindBySceneAndSource

func (r *DatasetSchema) FindBySceneAndSource(ctx context.Context, s id.SceneID, src string) (dataset.SchemaList, error)

func (*DatasetSchema) FindDynamicByID

func (r *DatasetSchema) FindDynamicByID(ctx context.Context, id id.DatasetSchemaID) (*dataset.Schema, error)

func (*DatasetSchema) Remove

func (r *DatasetSchema) Remove(ctx context.Context, id id.DatasetSchemaID) error

func (*DatasetSchema) RemoveAll

func (r *DatasetSchema) RemoveAll(ctx context.Context, ids id.DatasetSchemaIDList) error

func (*DatasetSchema) RemoveByScene

func (r *DatasetSchema) RemoveByScene(ctx context.Context, sceneID id.SceneID) error

func (*DatasetSchema) Save

func (r *DatasetSchema) Save(ctx context.Context, d *dataset.Schema) error

func (*DatasetSchema) SaveAll

func (r *DatasetSchema) SaveAll(ctx context.Context, dl dataset.SchemaList) error

type Layer

type Layer struct {
	// contains filtered or unexported fields
}

func (*Layer) Filtered added in v0.6.0

func (r *Layer) Filtered(f repo.SceneFilter) repo.Layer

func (*Layer) FindAllByDatasetSchema

func (r *Layer) FindAllByDatasetSchema(ctx context.Context, datasetSchemaID id.DatasetSchemaID) (layer.List, error)

func (*Layer) FindByID

func (r *Layer) FindByID(ctx context.Context, id id.LayerID) (layer.Layer, error)

func (*Layer) FindByIDs

func (r *Layer) FindByIDs(ctx context.Context, ids id.LayerIDList) (layer.List, error)

func (*Layer) FindByPluginAndExtension added in v0.5.0

func (r *Layer) FindByPluginAndExtension(_ context.Context, pid id.PluginID, eid *id.PluginExtensionID) (layer.List, error)

func (*Layer) FindByPluginAndExtensionOfBlocks added in v0.5.0

func (r *Layer) FindByPluginAndExtensionOfBlocks(_ context.Context, pid id.PluginID, eid *id.PluginExtensionID) (layer.List, error)

func (*Layer) FindByProperty

func (r *Layer) FindByProperty(ctx context.Context, id id.PropertyID) (layer.Layer, error)

func (*Layer) FindByScene

func (r *Layer) FindByScene(ctx context.Context, sceneID id.SceneID) (layer.List, error)

func (*Layer) FindByTag

func (r *Layer) FindByTag(ctx context.Context, tagID id.TagID) (layer.List, error)

func (*Layer) FindGroupByID

func (r *Layer) FindGroupByID(ctx context.Context, id id.LayerID) (*layer.Group, error)

func (*Layer) FindGroupByIDs

func (r *Layer) FindGroupByIDs(ctx context.Context, ids id.LayerIDList) (layer.GroupList, error)

func (*Layer) FindGroupBySceneAndLinkedDatasetSchema

func (r *Layer) FindGroupBySceneAndLinkedDatasetSchema(ctx context.Context, s id.SceneID, ds id.DatasetSchemaID) (layer.GroupList, error)

func (*Layer) FindItemByID

func (r *Layer) FindItemByID(ctx context.Context, id id.LayerID) (*layer.Item, error)

func (*Layer) FindItemByIDs

func (r *Layer) FindItemByIDs(ctx context.Context, ids id.LayerIDList) (layer.ItemList, error)

func (*Layer) FindParentByID

func (r *Layer) FindParentByID(ctx context.Context, id id.LayerID) (*layer.Group, error)

func (*Layer) FindParentsByIDs added in v0.5.0

func (r *Layer) FindParentsByIDs(_ context.Context, ids id.LayerIDList) (layer.GroupList, error)

func (*Layer) Remove

func (r *Layer) Remove(ctx context.Context, id id.LayerID) error

func (*Layer) RemoveAll

func (r *Layer) RemoveAll(ctx context.Context, ids id.LayerIDList) error

func (*Layer) RemoveByScene

func (r *Layer) RemoveByScene(ctx context.Context, sceneID id.SceneID) error

func (*Layer) Save

func (r *Layer) Save(ctx context.Context, l layer.Layer) error

func (*Layer) SaveAll

func (r *Layer) SaveAll(ctx context.Context, ll layer.List) error

func (*Layer) UpdatePlugin added in v0.5.0

func (r *Layer) UpdatePlugin(ctx context.Context, old id.PluginID, new id.PluginID) error

type Lock added in v0.3.0

type Lock struct{}

func (*Lock) Lock added in v0.3.0

func (r *Lock) Lock(_ context.Context, _ string) error

func (*Lock) Unlock added in v0.3.0

func (r *Lock) Unlock(_ context.Context, _ string) error

type Plugin

type Plugin struct {
	// contains filtered or unexported fields
}

func (*Plugin) Filtered added in v0.6.0

func (r *Plugin) Filtered(f repo.SceneFilter) repo.Plugin

func (*Plugin) FindByID

func (r *Plugin) FindByID(ctx context.Context, id id.PluginID) (*plugin.Plugin, error)

func (*Plugin) FindByIDs

func (r *Plugin) FindByIDs(ctx context.Context, ids []id.PluginID) ([]*plugin.Plugin, error)

func (*Plugin) Remove

func (r *Plugin) Remove(ctx context.Context, id id.PluginID) error

func (*Plugin) Save

func (r *Plugin) Save(ctx context.Context, p *plugin.Plugin) error

type Project

type Project struct {
	// contains filtered or unexported fields
}

func (*Project) CountByTeam

func (r *Project) CountByTeam(ctx context.Context, team id.TeamID) (c int, err error)

func (*Project) Filtered added in v0.6.0

func (r *Project) Filtered(f repo.TeamFilter) repo.Project

func (*Project) FindByID

func (r *Project) FindByID(ctx context.Context, id id.ProjectID) (*project.Project, error)

func (*Project) FindByIDs

func (r *Project) FindByIDs(ctx context.Context, ids id.ProjectIDList) ([]*project.Project, error)

func (*Project) FindByPublicName

func (r *Project) FindByPublicName(ctx context.Context, name string) (*project.Project, error)

func (*Project) FindByTeam

func (r *Project) FindByTeam(ctx context.Context, id id.TeamID, p *usecase.Pagination) ([]*project.Project, *usecase.PageInfo, error)

func (*Project) Remove

func (r *Project) Remove(ctx context.Context, id id.ProjectID) error

func (*Project) Save

func (r *Project) Save(ctx context.Context, p *project.Project) error

type Property

type Property struct {
	// contains filtered or unexported fields
}

func (*Property) Filtered added in v0.6.0

func (r *Property) Filtered(f repo.SceneFilter) repo.Property

func (*Property) FindByDataset

func (r *Property) FindByDataset(ctx context.Context, sid id.DatasetSchemaID, did id.DatasetID) (property.List, error)

func (*Property) FindByID

func (r *Property) FindByID(ctx context.Context, id id.PropertyID) (*property.Property, error)

func (*Property) FindByIDs

func (r *Property) FindByIDs(ctx context.Context, ids id.PropertyIDList) (property.List, error)

func (*Property) FindByPlugin added in v0.5.0

func (r *Property) FindByPlugin(_ context.Context, plugin id.PluginID, scene id.SceneID) (property.List, error)

func (*Property) FindBySchema added in v0.5.0

func (r *Property) FindBySchema(_ context.Context, schemas []id.PropertySchemaID, scene id.SceneID) (property.List, error)

func (*Property) FindLinkedAll

func (r *Property) FindLinkedAll(ctx context.Context, s id.SceneID) (property.List, error)

func (*Property) Remove

func (r *Property) Remove(ctx context.Context, id id.PropertyID) error

func (*Property) RemoveAll

func (r *Property) RemoveAll(ctx context.Context, ids id.PropertyIDList) error

func (*Property) RemoveByScene

func (r *Property) RemoveByScene(ctx context.Context, sceneID id.SceneID) error

func (*Property) Save

func (r *Property) Save(ctx context.Context, p *property.Property) error

func (*Property) SaveAll

func (r *Property) SaveAll(ctx context.Context, pl property.List) error

func (*Property) UpdateSchemaPlugin added in v0.5.0

func (r *Property) UpdateSchemaPlugin(ctx context.Context, old id.PluginID, new id.PluginID, scene id.SceneID) error

type PropertySchema

type PropertySchema struct {
	// contains filtered or unexported fields
}

func (*PropertySchema) Filtered added in v0.6.0

func (*PropertySchema) FindByID

func (*PropertySchema) FindByIDs

func (*PropertySchema) Remove

func (*PropertySchema) RemoveAll

func (r *PropertySchema) RemoveAll(ctx context.Context, ids []id.PropertySchemaID) error

func (*PropertySchema) Save

func (*PropertySchema) SaveAll

type Scene

type Scene struct {
	// contains filtered or unexported fields
}

func (*Scene) Filtered added in v0.6.0

func (r *Scene) Filtered(f repo.TeamFilter) repo.Scene

func (*Scene) FindByID

func (r *Scene) FindByID(ctx context.Context, id id.SceneID) (*scene.Scene, error)

func (*Scene) FindByIDs

func (r *Scene) FindByIDs(ctx context.Context, ids id.SceneIDList) (scene.List, error)

func (*Scene) FindByProject

func (r *Scene) FindByProject(ctx context.Context, id id.ProjectID) (*scene.Scene, error)

func (*Scene) FindByTeam added in v0.6.0

func (r *Scene) FindByTeam(ctx context.Context, teams ...id.TeamID) (scene.List, error)

func (*Scene) Remove

func (r *Scene) Remove(ctx context.Context, id id.SceneID) error

func (*Scene) Save

func (r *Scene) Save(ctx context.Context, s *scene.Scene) error

type Tag

type Tag struct {
	// contains filtered or unexported fields
}

func (*Tag) Filtered added in v0.6.0

func (r *Tag) Filtered(f repo.SceneFilter) repo.Tag

func (*Tag) FindByID

func (r *Tag) FindByID(ctx context.Context, tagID id.TagID) (tag.Tag, error)

func (*Tag) FindByIDs

func (r *Tag) FindByIDs(ctx context.Context, tids id.TagIDList) ([]*tag.Tag, error)

func (*Tag) FindByScene

func (r *Tag) FindByScene(ctx context.Context, sceneID id.SceneID) ([]*tag.Tag, error)

func (*Tag) FindGroupByID

func (r *Tag) FindGroupByID(ctx context.Context, tagID id.TagID) (*tag.Group, error)

func (*Tag) FindGroupByIDs

func (r *Tag) FindGroupByIDs(ctx context.Context, tagIDs id.TagIDList) ([]*tag.Group, error)

func (*Tag) FindGroupByItem

func (r *Tag) FindGroupByItem(ctx context.Context, tagID id.TagID) (*tag.Group, error)

func (*Tag) FindItemByID

func (r *Tag) FindItemByID(ctx context.Context, tagID id.TagID) (*tag.Item, error)

func (*Tag) FindItemByIDs

func (r *Tag) FindItemByIDs(ctx context.Context, tagIDs id.TagIDList) ([]*tag.Item, error)

func (*Tag) FindRootsByScene added in v0.3.0

func (r *Tag) FindRootsByScene(ctx context.Context, sceneID id.SceneID) ([]*tag.Tag, error)

func (*Tag) Remove

func (r *Tag) Remove(ctx context.Context, id id.TagID) error

func (*Tag) RemoveAll

func (r *Tag) RemoveAll(ctx context.Context, ids id.TagIDList) error

func (*Tag) RemoveByScene

func (r *Tag) RemoveByScene(ctx context.Context, sceneID id.SceneID) error

func (*Tag) Save

func (r *Tag) Save(ctx context.Context, tag tag.Tag) error

func (*Tag) SaveAll

func (r *Tag) SaveAll(ctx context.Context, tags []*tag.Tag) error

type Team

type Team struct {
	// contains filtered or unexported fields
}

func (*Team) FindByID

func (r *Team) FindByID(ctx context.Context, id id.TeamID) (*user.Team, error)

func (*Team) FindByIDs

func (r *Team) FindByIDs(ctx context.Context, ids id.TeamIDList) (user.TeamList, error)

func (*Team) FindByUser

func (r *Team) FindByUser(ctx context.Context, i id.UserID) (user.TeamList, error)

func (*Team) Remove

func (r *Team) Remove(ctx context.Context, id id.TeamID) error

func (*Team) RemoveAll

func (r *Team) RemoveAll(ctx context.Context, ids id.TeamIDList) error

func (*Team) Save

func (r *Team) Save(ctx context.Context, t *user.Team) error

func (*Team) SaveAll

func (r *Team) SaveAll(ctx context.Context, teams []*user.Team) error

type Transaction

type Transaction struct {
	// contains filtered or unexported fields
}

func NewTransaction

func NewTransaction() *Transaction

func (*Transaction) Begin

func (t *Transaction) Begin() (repo.Tx, error)

func (*Transaction) Committed added in v0.8.0

func (t *Transaction) Committed() int

func (*Transaction) SetBeginError added in v0.8.0

func (t *Transaction) SetBeginError(err error)

func (*Transaction) SetEndError added in v0.8.0

func (t *Transaction) SetEndError(err error)

type Tx

type Tx struct {
	// contains filtered or unexported fields
}

func (*Tx) Commit

func (t *Tx) Commit()

func (*Tx) End

func (t *Tx) End(_ context.Context) error

func (*Tx) IsCommitted added in v0.8.0

func (t *Tx) IsCommitted() bool

type User

type User struct {
	// contains filtered or unexported fields
}

func (*User) FindByAuth0Sub

func (r *User) FindByAuth0Sub(ctx context.Context, auth0sub string) (*user.User, error)

func (*User) FindByEmail

func (r *User) FindByEmail(ctx context.Context, email string) (*user.User, error)

func (*User) FindByID

func (r *User) FindByID(ctx context.Context, id id.UserID) (*user.User, error)

func (*User) FindByIDs

func (r *User) FindByIDs(ctx context.Context, ids id.UserIDList) ([]*user.User, error)

func (*User) FindByName added in v0.6.0

func (r *User) FindByName(ctx context.Context, name string) (*user.User, error)

func (*User) FindByNameOrEmail

func (r *User) FindByNameOrEmail(ctx context.Context, nameOrEmail string) (*user.User, error)

func (*User) FindByPasswordResetRequest added in v0.6.0

func (r *User) FindByPasswordResetRequest(ctx context.Context, token string) (*user.User, error)

func (*User) FindByVerification added in v0.6.0

func (r *User) FindByVerification(ctx context.Context, code string) (*user.User, error)

func (*User) Remove

func (r *User) Remove(ctx context.Context, user id.UserID) error

func (*User) Save

func (r *User) Save(ctx context.Context, u *user.User) error

Jump to

Keyboard shortcuts

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