Documentation ¶
Index ¶
- Variables
- type Asset
- type AssetFile
- type AssetFilter
- type AssetUpload
- type Container
- type Event
- type FieldAndValue
- type Group
- type Integration
- type Item
- type Lock
- type Model
- type Project
- type ProjectFilter
- type Request
- type RequestFilter
- type Schema
- type Thread
- type View
- type WorkspaceFilter
- type WorkspaceSettings
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 (
ErrOperationDenied = rerror.NewE(i18n.T("operation denied"))
)
Functions ¶
This section is empty.
Types ¶
type Asset ¶
type Asset interface { Filtered(ProjectFilter) Asset FindByProject(context.Context, id.ProjectID, AssetFilter) ([]*asset.Asset, *usecasex.PageInfo, error) FindByID(context.Context, id.AssetID) (*asset.Asset, error) FindByIDs(context.Context, id.AssetIDList) ([]*asset.Asset, error) Save(context.Context, *asset.Asset) error Delete(context.Context, id.AssetID) error }
type AssetFilter ¶
type AssetFilter struct { Sort *usecasex.Sort Keyword *string Pagination *usecasex.Pagination }
type AssetUpload ¶
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 Group ¶
type Group interface { Filtered(ProjectFilter) Group FindByID(context.Context, id.GroupID) (*group.Group, error) FindByIDs(context.Context, id.GroupIDList) (group.List, error) FindByProject(context.Context, id.ProjectID) (group.List, error) FindByKey(context.Context, id.ProjectID, string) (*group.Group, error) Save(context.Context, *group.Group) error SaveAll(context.Context, group.List) error Remove(context.Context, id.GroupID) error }
type Integration ¶
type Integration interface { FindByIDs(context.Context, id.IntegrationIDList) (integration.List, error) FindByUser(context.Context, accountdomain.UserID) (integration.List, error) FindByID(context.Context, id.IntegrationID) (*integration.Integration, error) FindByToken(context.Context, string) (*integration.Integration, error) Save(context.Context, *integration.Integration) error Remove(context.Context, id.IntegrationID) error }
type Item ¶
type Item interface { Filtered(ProjectFilter) Item FindByID(context.Context, id.ItemID, *version.Ref) (item.Versioned, error) FindByIDs(context.Context, id.ItemIDList, *version.Ref) (item.VersionedList, error) FindBySchema(context.Context, id.SchemaID, *version.Ref, *usecasex.Sort, *usecasex.Pagination) (item.VersionedList, *usecasex.PageInfo, error) FindByModel(context.Context, id.ModelID, *version.Ref, *usecasex.Sort, *usecasex.Pagination) (item.VersionedList, *usecasex.PageInfo, error) FindByAssets(context.Context, id.AssetIDList, *version.Ref) (item.VersionedList, error) LastModifiedByModel(context.Context, id.ModelID) (time.Time, error) Search(context.Context, schema.Package, *item.Query, *usecasex.Pagination) (item.VersionedList, *usecasex.PageInfo, error) FindVersionByID(context.Context, id.ItemID, version.VersionOrRef) (item.Versioned, error) FindAllVersionsByID(context.Context, id.ItemID) (item.VersionedList, error) FindAllVersionsByIDs(context.Context, id.ItemIDList) (item.VersionedList, error) FindByModelAndValue(context.Context, id.ModelID, []FieldAndValue, *version.Ref) (item.VersionedList, error) IsArchived(context.Context, id.ItemID) (bool, error) Save(context.Context, *item.Item) error SaveAll(context.Context, item.List) error UpdateRef(context.Context, id.ItemID, version.Ref, *version.VersionOrRef) error Remove(context.Context, id.ItemID) error Archive(context.Context, id.ItemID, id.ProjectID, bool) error }
type Model ¶
type Model interface { Filtered(ProjectFilter) Model FindByID(context.Context, id.ModelID) (*model.Model, error) FindBySchema(context.Context, id.SchemaID) (*model.Model, error) FindByIDs(context.Context, id.ModelIDList) (model.List, error) FindByProject(context.Context, id.ProjectID, *usecasex.Pagination) (model.List, *usecasex.PageInfo, error) FindByProjectAndKeyword(context.Context, id.ProjectID, string, *usecasex.Pagination) (model.List, *usecasex.PageInfo, error) FindByKey(context.Context, id.ProjectID, string) (*model.Model, error) FindByIDOrKey(context.Context, id.ProjectID, model.IDOrKey) (*model.Model, error) CountByProject(context.Context, id.ProjectID) (int, error) Save(context.Context, *model.Model) error SaveAll(context.Context, model.List) error Remove(context.Context, id.ModelID) error }
type Project ¶
type Project interface { Filtered(filter WorkspaceFilter) Project FindByIDs(context.Context, id.ProjectIDList) (project.List, error) FindByID(context.Context, id.ProjectID) (*project.Project, error) FindByIDOrAlias(context.Context, project.IDOrAlias) (*project.Project, error) FindByWorkspaces(context.Context, accountdomain.WorkspaceIDList, *usecasex.Pagination) (project.List, *usecasex.PageInfo, error) FindByPublicName(context.Context, string) (*project.Project, error) CountByWorkspace(context.Context, accountdomain.WorkspaceID) (int, error) FindByPublicAPIToken(context.Context, string) (*project.Project, error) Save(context.Context, *project.Project) error Remove(context.Context, id.ProjectID) error }
type ProjectFilter ¶
func ProjectFilterFromOperator ¶
func ProjectFilterFromOperator(o *usecase.Operator) ProjectFilter
func (ProjectFilter) Clone ¶
func (f ProjectFilter) Clone() ProjectFilter
func (ProjectFilter) Merge ¶
func (f ProjectFilter) Merge(g ProjectFilter) ProjectFilter
type Request ¶
type Request interface { Filtered(ProjectFilter) Request FindByProject(context.Context, id.ProjectID, RequestFilter, *usecasex.Sort, *usecasex.Pagination) (request.List, *usecasex.PageInfo, error) FindByID(context.Context, id.RequestID) (*request.Request, error) FindByIDs(context.Context, id.RequestIDList) (request.List, error) FindByItems(context.Context, id.ItemIDList, *RequestFilter) (request.List, error) Save(context.Context, *request.Request) error SaveAll(context.Context, id.ProjectID, request.List) error }
type RequestFilter ¶
type RequestFilter struct { State []request.State Keyword *string Reviewer *accountdomain.UserID CreatedBy *accountdomain.UserID }
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 (f WorkspaceFilter) CanRead(id accountdomain.WorkspaceID) bool
func (WorkspaceFilter) CanWrite ¶
func (f WorkspaceFilter) CanWrite(id accountdomain.WorkspaceID) bool
func (WorkspaceFilter) Clone ¶
func (f WorkspaceFilter) Clone() WorkspaceFilter
func (WorkspaceFilter) Merge ¶
func (f WorkspaceFilter) Merge(g WorkspaceFilter) WorkspaceFilter
type WorkspaceSettings ¶
type WorkspaceSettings interface { Filtered(filter WorkspaceFilter) WorkspaceSettings FindByID(context.Context, accountdomain.WorkspaceID) (*workspacesettings.WorkspaceSettings, error) FindByIDs(context.Context, accountdomain.WorkspaceIDList) (workspacesettings.List, error) Save(context.Context, *workspacesettings.WorkspaceSettings) error Remove(context.Context, accountdomain.WorkspaceID) error }
Click to show internal directories.
Click to hide internal directories.