repo

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: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrFailedToLock  = rerror.NewE(i18n.T("failed to lock"))
	ErrAlreadyLocked = rerror.NewE(i18n.T("already locked"))
	ErrNotLocked     = rerror.NewE(i18n.T("not locked"))
)
View Source
var (
	ErrCommentNotFound error = rerror.NewE(i18n.T("comment not found"))
)
View Source
var (
	ErrOperationDenied = rerror.NewE(i18n.T("operation denied"))
)

Functions

This section is empty.

Types

type Asset

type AssetFile

type AssetFile interface {
	FindByID(context.Context, id.AssetID) (*asset.File, error)
	FindByIDs(context.Context, id.AssetIDList) (map[id.AssetID]*asset.File, error)
	Save(context.Context, id.AssetID, *asset.File) error
	SaveFlat(context.Context, id.AssetID, *asset.File, []*asset.File) error
}

type AssetFilter

type AssetFilter struct {
	Sort       *usecasex.Sort
	Keyword    *string
	Pagination *usecasex.Pagination
}

type AssetUpload

type AssetUpload interface {
	Save(ctx context.Context, upload *asset.Upload) error
	FindByID(ctx context.Context, uuid string) (*asset.Upload, error)
}

type Container

type Container struct {
	Asset             Asset
	AssetFile         AssetFile
	AssetUpload       AssetUpload
	Lock              Lock
	User              accountrepo.User
	Workspace         accountrepo.Workspace
	Project           Project
	Model             Model
	Schema            Schema
	Item              Item
	View              View
	Integration       Integration
	Thread            Thread
	Event             Event
	Request           Request
	Group             Group
	WorkspaceSettings WorkspaceSettings
	Transaction       usecasex.Transaction
}

func (*Container) Filtered

func (c *Container) Filtered(workspace WorkspaceFilter, project ProjectFilter) *Container

type Event

type Event interface {
	FindByID(context.Context, id.EventID) (*event.Event[any], error)
	Save(context.Context, *event.Event[any]) error
	SaveAll(context.Context, event.List) error
}

type FieldAndValue

type FieldAndValue struct {
	Field schema.FieldID
	Value *value.Multiple
}

type Lock

type Lock interface {
	Lock(context.Context, string) error
	Unlock(context.Context, string) error
}

type ProjectFilter

type ProjectFilter struct {
	Readable project.IDList
	Writable project.IDList
}

func ProjectFilterFromOperator

func ProjectFilterFromOperator(o *usecase.Operator) ProjectFilter

func (ProjectFilter) CanRead

func (f ProjectFilter) CanRead(ids ...project.ID) bool

func (ProjectFilter) CanWrite

func (f ProjectFilter) CanWrite(ids ...project.ID) bool

func (ProjectFilter) Clone

func (f ProjectFilter) Clone() ProjectFilter

func (ProjectFilter) Merge

type RequestFilter

type RequestFilter struct {
	State     []request.State
	Keyword   *string
	Reviewer  *accountdomain.UserID
	CreatedBy *accountdomain.UserID
}

type Schema

type Schema interface {
	Filtered(filter WorkspaceFilter) Schema
	FindByIDs(context.Context, id.SchemaIDList) (schema.List, error)
	FindByID(context.Context, id.SchemaID) (*schema.Schema, error)
	Save(context.Context, *schema.Schema) error
	Remove(context.Context, id.SchemaID) error
}

type Thread

type Thread interface {
	Save(context.Context, *thread.Thread) error
	SaveAll(context.Context, thread.List) error
	Filtered(filter WorkspaceFilter) Thread
	FindByID(ctx context.Context, id id.ThreadID) (*thread.Thread, error)
	FindByIDs(context.Context, id.ThreadIDList) ([]*thread.Thread, error)
}

type View

type View interface {
	Filtered(ProjectFilter) View
	FindByIDs(context.Context, id.ViewIDList) (view.List, error)
	FindByModel(context.Context, id.ModelID) (view.List, error)
	FindByID(context.Context, id.ViewID) (*view.View, error)
	Save(context.Context, *view.View) error
	SaveAll(context.Context, view.List) error
	Remove(context.Context, id.ViewID) error
}

type WorkspaceFilter

type WorkspaceFilter struct {
	Readable user.WorkspaceIDList
	Writable user.WorkspaceIDList
}

func WorkspaceFilterFromOperator

func WorkspaceFilterFromOperator(o *usecase.Operator) WorkspaceFilter

func (WorkspaceFilter) CanRead

func (WorkspaceFilter) CanWrite

func (WorkspaceFilter) Clone

func (f WorkspaceFilter) Clone() WorkspaceFilter

func (WorkspaceFilter) Merge

Jump to

Keyboard shortcuts

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