memory

package
v0.0.0-...-6d13978 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2024 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MockIntegrationNow

func MockIntegrationNow(r repo.Integration, t time.Time) func()

func MockModelNow

func MockModelNow(r repo.Model, t time.Time) func()

func MockNow

func MockNow(r *repo.Container, t time.Time) func()

func MockProjectNow

func MockProjectNow(r repo.Project, t time.Time) func()

func MockSchemaNow

func MockSchemaNow(r repo.Schema, t time.Time) func()

func MockViewNow

func MockViewNow(r repo.View, t time.Time) func()

func New

func New() *repo.Container

func NewAsset

func NewAsset() repo.Asset

func NewEvent

func NewEvent() repo.Event

func NewGroup

func NewGroup() repo.Group

func NewIntegration

func NewIntegration() repo.Integration

func NewItem

func NewItem() repo.Item

func NewLock

func NewLock() repo.Lock

func NewModel

func NewModel() repo.Model

func NewProject

func NewProject() repo.Project

func NewRequest

func NewRequest() repo.Request

func NewSchema

func NewSchema() repo.Schema

func NewThread

func NewThread() repo.Thread

func NewView

func NewView() repo.View

func NewWorkspaceSettings

func NewWorkspaceSettings() repo.WorkspaceSettings

func SetIntegrationError

func SetIntegrationError(r repo.Integration, err error)

func SetItemError

func SetItemError(r repo.Item, err error)

func SetModelError

func SetModelError(r repo.Model, err error)

func SetProjectError

func SetProjectError(r repo.Project, err error)

func SetRequestError

func SetRequestError(r repo.Request, err error)

func SetSchemaError

func SetSchemaError(r repo.Schema, err error)

func SetThreadError

func SetThreadError(r repo.Thread, err error)

func SetViewError

func SetViewError(r repo.View, err error)

Types

type Asset

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

func (*Asset) Delete

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

func (*Asset) Filtered

func (r *Asset) Filtered(f repo.ProjectFilter) 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) FindByProject

func (r *Asset) FindByProject(ctx context.Context, id id.ProjectID, filter repo.AssetFilter) ([]*asset.Asset, *usecasex.PageInfo, error)

func (*Asset) Save

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

type AssetFile

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

func NewAssetFile

func NewAssetFile() *AssetFile

func (*AssetFile) FindByID

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

func (*AssetFile) FindByIDs

func (r *AssetFile) FindByIDs(ctx context.Context, ids id.AssetIDList) (map[id.AssetID]*asset.File, error)

func (*AssetFile) Save

func (r *AssetFile) Save(ctx context.Context, id id.AssetID, file *asset.File) error

func (*AssetFile) SaveFlat

func (r *AssetFile) SaveFlat(ctx context.Context, id id.AssetID, parent *asset.File, files []*asset.File) error

type Event

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

func (*Event) FindByID

func (r *Event) FindByID(_ context.Context, iId id.EventID) (*event.Event[any], error)

func (*Event) Save

func (r *Event) Save(_ context.Context, ev *event.Event[any]) error

func (*Event) SaveAll

func (r *Event) SaveAll(_ context.Context, ev event.List) error

type Group

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

func (*Group) Filtered

func (r *Group) Filtered(filter repo.ProjectFilter) repo.Group

func (*Group) FindByID

func (r *Group) FindByID(ctx context.Context, groupID id.GroupID) (*group.Group, error)

func (*Group) FindByIDs

func (r *Group) FindByIDs(ctx context.Context, list id.GroupIDList) (group.List, error)

func (*Group) FindByKey

func (r *Group) FindByKey(ctx context.Context, pid id.ProjectID, key string) (*group.Group, error)

func (*Group) FindByProject

func (r *Group) FindByProject(ctx context.Context, pid id.ProjectID) (group.List, error)

func (*Group) Remove

func (r *Group) Remove(ctx context.Context, groupID id.GroupID) error

func (*Group) Save

func (r *Group) Save(ctx context.Context, g *group.Group) error

func (*Group) SaveAll

func (r *Group) SaveAll(ctx context.Context, groups group.List) error

type Integration

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

func (*Integration) FindByID

func (*Integration) FindByIDs

func (*Integration) FindByToken

func (r *Integration) FindByToken(_ context.Context, token string) (*integration.Integration, error)

func (*Integration) FindByUser

func (*Integration) Remove

func (r *Integration) Remove(_ context.Context, iId id.IntegrationID) error

func (*Integration) Save

type Item

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

func (*Item) Archive

func (r *Item) Archive(_ context.Context, itemID id.ItemID, projectID id.ProjectID, archived bool) error

func (*Item) Filtered

func (r *Item) Filtered(filter repo.ProjectFilter) repo.Item

func (*Item) FindAllVersionsByID

func (r *Item) FindAllVersionsByID(_ context.Context, id id.ItemID) (item.VersionedList, error)

func (*Item) FindAllVersionsByIDs

func (r *Item) FindAllVersionsByIDs(_ context.Context, ids id.ItemIDList) (item.VersionedList, error)

func (*Item) FindByAssets

func (r *Item) FindByAssets(_ context.Context, list id.AssetIDList, ref *version.Ref) (item.VersionedList, error)

func (*Item) FindByID

func (r *Item) FindByID(_ context.Context, itemID id.ItemID, ref *version.Ref) (item.Versioned, error)

func (*Item) FindByIDs

func (r *Item) FindByIDs(_ context.Context, list id.ItemIDList, ref *version.Ref) (item.VersionedList, error)

func (*Item) FindByModel

func (r *Item) FindByModel(_ context.Context, modelID id.ModelID, ref *version.Ref, sort *usecasex.Sort, pagination *usecasex.Pagination) (item.VersionedList, *usecasex.PageInfo, error)

func (*Item) FindByModelAndValue

func (r *Item) FindByModelAndValue(_ context.Context, modelID id.ModelID, fields []repo.FieldAndValue, ref *version.Ref) (item.VersionedList, error)

func (*Item) FindBySchema

func (r *Item) FindBySchema(_ context.Context, schemaID id.SchemaID, ref *version.Ref, sort *usecasex.Sort, pagination *usecasex.Pagination) (item.VersionedList, *usecasex.PageInfo, error)

func (*Item) FindVersionByID

func (r *Item) FindVersionByID(_ context.Context, itemID id.ItemID, ver version.VersionOrRef) (item.Versioned, error)

func (*Item) IsArchived

func (r *Item) IsArchived(_ context.Context, itemID id.ItemID) (bool, error)

func (*Item) LastModifiedByModel

func (r *Item) LastModifiedByModel(_ context.Context, modelID id.ModelID) (time.Time, error)

func (*Item) Len

func (r *Item) Len() int

func (*Item) Remove

func (r *Item) Remove(_ context.Context, itemID id.ItemID) error

func (*Item) Save

func (r *Item) Save(_ context.Context, t *item.Item) error

func (*Item) SaveAll

func (r *Item) SaveAll(_ context.Context, il item.List) error

func (*Item) Search

func (*Item) UpdateRef

func (r *Item) UpdateRef(_ context.Context, item id.ItemID, ref version.Ref, vr *version.VersionOrRef) error

type Lock

type Lock struct{}

func (*Lock) Lock

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

func (*Lock) Unlock

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

type Model

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

func (*Model) CountByProject

func (r *Model) CountByProject(_ context.Context, pid id.ProjectID) (int, error)

func (*Model) Filtered

func (r *Model) Filtered(f repo.ProjectFilter) repo.Model

func (*Model) FindByID

func (r *Model) FindByID(_ context.Context, mid id.ModelID) (*model.Model, error)

func (*Model) FindByIDOrKey

func (r *Model) FindByIDOrKey(ctx context.Context, projectID id.ProjectID, q model.IDOrKey) (*model.Model, error)

func (*Model) FindByIDs

func (r *Model) FindByIDs(_ context.Context, ids id.ModelIDList) (model.List, error)

func (*Model) FindByKey

func (r *Model) FindByKey(_ context.Context, pid id.ProjectID, key string) (*model.Model, error)

func (*Model) FindByProject

func (r *Model) FindByProject(_ context.Context, pid id.ProjectID, _ *usecasex.Pagination) (model.List, *usecasex.PageInfo, error)

func (*Model) FindByProjectAndKeyword

func (r *Model) FindByProjectAndKeyword(_ context.Context, pid id.ProjectID, k string, _ *usecasex.Pagination) (model.List, *usecasex.PageInfo, error)

func (*Model) FindBySchema

func (r *Model) FindBySchema(_ context.Context, sid id.SchemaID) (*model.Model, error)

func (*Model) Remove

func (r *Model) Remove(_ context.Context, mId id.ModelID) error

func (*Model) Save

func (r *Model) Save(_ context.Context, m *model.Model) error

func (*Model) SaveAll

func (r *Model) SaveAll(ctx context.Context, models model.List) error

type Project

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

func (*Project) CountByWorkspace

func (r *Project) CountByWorkspace(_ context.Context, workspace accountdomain.WorkspaceID) (c int, err error)

func (*Project) Filtered

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

func (*Project) FindByID

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

func (*Project) FindByIDOrAlias

func (r *Project) FindByIDOrAlias(_ context.Context, q project.IDOrAlias) (*project.Project, error)

func (*Project) FindByIDs

func (r *Project) FindByIDs(_ context.Context, ids id.ProjectIDList) (project.List, error)

func (*Project) FindByPublicAPIToken

func (r *Project) FindByPublicAPIToken(ctx context.Context, token string) (*project.Project, error)

func (*Project) FindByPublicName

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

func (*Project) Remove

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

func (*Project) Save

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

type Request

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

func (*Request) Filtered

func (r *Request) Filtered(f repo.ProjectFilter) repo.Request

func (*Request) FindByID

func (r *Request) FindByID(ctx context.Context, id id.RequestID) (*request.Request, error)

func (*Request) FindByIDs

func (r *Request) FindByIDs(ctx context.Context, ids id.RequestIDList) (request.List, error)

func (*Request) FindByItems

func (r *Request) FindByItems(ctx context.Context, list id.ItemIDList, f *repo.RequestFilter) (request.List, error)

func (*Request) FindByProject

func (r *Request) FindByProject(ctx context.Context, id id.ProjectID, filter repo.RequestFilter, sort *usecasex.Sort, page *usecasex.Pagination) (request.List, *usecasex.PageInfo, error)

func (*Request) Save

func (r *Request) Save(ctx context.Context, a *request.Request) error

func (*Request) SaveAll

func (r *Request) SaveAll(ctx context.Context, pid id.ProjectID, requests request.List) error

type Schema

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

func (*Schema) Filtered

func (r *Schema) Filtered(f repo.WorkspaceFilter) repo.Schema

func (*Schema) FindByID

func (r *Schema) FindByID(_ context.Context, sid id.SchemaID) (*schema.Schema, error)

func (*Schema) FindByIDs

func (r *Schema) FindByIDs(_ context.Context, ids id.SchemaIDList) (schema.List, error)

func (*Schema) Remove

func (r *Schema) Remove(_ context.Context, sId id.SchemaID) error

func (*Schema) Save

func (r *Schema) Save(_ context.Context, s *schema.Schema) error

type Thread

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

func (*Thread) Filtered

func (r *Thread) Filtered(f repo.WorkspaceFilter) repo.Thread

func (*Thread) FindByID

func (r *Thread) FindByID(ctx context.Context, thid id.ThreadID) (*thread.Thread, error)

func (*Thread) FindByIDs

func (r *Thread) FindByIDs(ctx context.Context, ids id.ThreadIDList) ([]*thread.Thread, error)

func (*Thread) Save

func (r *Thread) Save(_ context.Context, th *thread.Thread) error

func (*Thread) SaveAll

func (r *Thread) SaveAll(_ context.Context, th thread.List) error

type View

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

func (*View) Filtered

func (r *View) Filtered(f repo.ProjectFilter) repo.View

func (*View) FindByID

func (r *View) FindByID(_ context.Context, iId id.ViewID) (*view.View, error)

func (*View) FindByIDs

func (r *View) FindByIDs(_ context.Context, iIds id.ViewIDList) (view.List, error)

func (*View) FindByModel

func (r *View) FindByModel(_ context.Context, mID id.ModelID) (view.List, error)

func (*View) Remove

func (r *View) Remove(_ context.Context, iId id.ViewID) error

func (*View) Save

func (r *View) Save(_ context.Context, i *view.View) error

func (*View) SaveAll

func (r *View) SaveAll(ctx context.Context, views view.List) error

type WorkspaceSettingsRepo

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

func (*WorkspaceSettingsRepo) Filtered

func (*WorkspaceSettingsRepo) FindByID

func (*WorkspaceSettingsRepo) FindByIDs

func (*WorkspaceSettingsRepo) Remove

func (*WorkspaceSettingsRepo) Save

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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