interactor

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2022 License: Apache-2.0 Imports: 58 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAsset

func NewAuthStorage added in v0.6.0

func NewAuthStorage(ctx context.Context, cfg *StorageConfig, request repo.AuthRequest, config repo.Config, getUserBySubject func(context.Context, string) (*user.User, error)) (op.Storage, error)

func NewDataset

func NewDataset(r *repo.Container, gr *gateway.Container) interfaces.Dataset

func NewLayer

func NewLayer(r *repo.Container) interfaces.Layer

func NewPlugin

func NewPlugin(r *repo.Container, gr *gateway.Container) interfaces.Plugin

func NewProject

func NewProject(r *repo.Container, gr *gateway.Container) interfaces.Project

func NewProperty

func NewProperty(r *repo.Container, gr *gateway.Container) interfaces.Property

func NewPublished

func NewPublished(project repo.Project, file gateway.File, indexHTML string) interfaces.Published

func NewPublishedWithURL

func NewPublishedWithURL(project repo.Project, file gateway.File, indexHTMLURL *url.URL) interfaces.Published

func NewScene

func NewTag

func NewTag(r *repo.Container) interfaces.Tag

func NewTeam

func NewTeam(r *repo.Container) interfaces.Team

func NewUser

func NewUser(r *repo.Container, g *gateway.Container, signupSecret, authSrcUIDomain string) interfaces.User

Types

type Asset

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

func (Asset) CanReadScene added in v0.6.0

func (i Asset) CanReadScene(t id.SceneID, op *usecase.Operator) error

func (Asset) CanReadTeam

func (i Asset) CanReadTeam(t id.TeamID, op *usecase.Operator) error

func (Asset) CanWriteScene added in v0.6.0

func (i Asset) CanWriteScene(t id.SceneID, op *usecase.Operator) error

func (Asset) CanWriteTeam

func (i Asset) CanWriteTeam(t id.TeamID, op *usecase.Operator) error

func (*Asset) Create

func (i *Asset) Create(ctx context.Context, inp interfaces.CreateAssetParam, operator *usecase.Operator) (result *asset.Asset, err error)

func (*Asset) Fetch

func (i *Asset) Fetch(ctx context.Context, assets []id.AssetID, operator *usecase.Operator) ([]*asset.Asset, error)

func (*Asset) FindByTeam

func (i *Asset) FindByTeam(ctx context.Context, tid id.TeamID, keyword *string, sort *asset.SortType, p *usecase.Pagination, operator *usecase.Operator) ([]*asset.Asset, *usecase.PageInfo, error)

func (Asset) OnlyOperator

func (Asset) OnlyOperator(op *usecase.Operator) error

func (*Asset) Remove

func (i *Asset) Remove(ctx context.Context, aid id.AssetID, operator *usecase.Operator) (result id.AssetID, err error)

type AuthDNConfig added in v0.6.0

type AuthDNConfig struct {
	CommonName         string
	Organization       []string
	OrganizationalUnit []string
	Country            []string
	Province           []string
	Locality           []string
	StreetAddress      []string
	PostalCode         []string
}

type AuthStorage added in v0.6.0

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

func (*AuthStorage) AuthRequestByCode added in v0.6.0

func (s *AuthStorage) AuthRequestByCode(ctx context.Context, code string) (op.AuthRequest, error)

func (*AuthStorage) AuthRequestByID added in v0.6.0

func (s *AuthStorage) AuthRequestByID(ctx context.Context, requestID string) (op.AuthRequest, error)

func (*AuthStorage) AuthRequestBySubject added in v0.6.0

func (s *AuthStorage) AuthRequestBySubject(ctx context.Context, subject string) (op.AuthRequest, error)

func (*AuthStorage) AuthorizeClientIDSecret added in v0.6.0

func (s *AuthStorage) AuthorizeClientIDSecret(_ context.Context, _ string, _ string) error

func (*AuthStorage) CompleteAuthRequest added in v0.6.0

func (s *AuthStorage) CompleteAuthRequest(ctx context.Context, requestId, sub string) error

func (*AuthStorage) CreateAccessAndRefreshTokens added in v0.6.0

func (s *AuthStorage) CreateAccessAndRefreshTokens(_ context.Context, request op.TokenRequest, _ string) (accessTokenID string, newRefreshToken string, expiration time.Time, err error)

func (*AuthStorage) CreateAccessToken added in v0.6.0

func (s *AuthStorage) CreateAccessToken(_ context.Context, _ op.TokenRequest) (string, time.Time, error)

func (*AuthStorage) CreateAuthRequest added in v0.6.0

func (s *AuthStorage) CreateAuthRequest(ctx context.Context, authReq *oidc.AuthRequest, _ string) (op.AuthRequest, error)

func (*AuthStorage) DeleteAuthRequest added in v0.6.0

func (s *AuthStorage) DeleteAuthRequest(_ context.Context, requestID string) error

func (*AuthStorage) GetClientByClientID added in v0.6.0

func (s *AuthStorage) GetClientByClientID(_ context.Context, clientID string) (op.Client, error)

func (*AuthStorage) GetKeyByIDAndUserID added in v0.6.0

func (s *AuthStorage) GetKeyByIDAndUserID(_ context.Context, kid, _ string) (*jose.JSONWebKey, error)

func (*AuthStorage) GetKeySet added in v0.6.0

func (s *AuthStorage) GetKeySet(_ context.Context) (*jose.JSONWebKeySet, error)

func (*AuthStorage) GetPrivateClaimsFromScopes added in v0.6.0

func (s *AuthStorage) GetPrivateClaimsFromScopes(_ context.Context, _, _ string, _ []string) (map[string]interface{}, error)

func (*AuthStorage) GetSigningKey added in v0.6.0

func (s *AuthStorage) GetSigningKey(_ context.Context, keyCh chan<- jose.SigningKey)

func (*AuthStorage) Health added in v0.6.0

func (s *AuthStorage) Health(_ context.Context) error

func (*AuthStorage) RevokeToken added in v0.6.0

func (s *AuthStorage) RevokeToken(_ context.Context, _ string, _ string, _ string) *oidc.Error

func (*AuthStorage) SaveAuthCode added in v0.6.0

func (s *AuthStorage) SaveAuthCode(ctx context.Context, requestID, code string) error

func (*AuthStorage) SetIntrospectionFromToken added in v0.6.0

func (s *AuthStorage) SetIntrospectionFromToken(ctx context.Context, introspect oidc.IntrospectionResponse, _, subject, clientID string) error

func (*AuthStorage) SetUserinfoFromScopes added in v0.6.0

func (s *AuthStorage) SetUserinfoFromScopes(ctx context.Context, userinfo oidc.UserInfoSetter, subject, _ string, _ []string) error

func (*AuthStorage) SetUserinfoFromToken added in v0.6.0

func (s *AuthStorage) SetUserinfoFromToken(ctx context.Context, userinfo oidc.UserInfoSetter, _, _, _ string) error

func (*AuthStorage) TerminateSession added in v0.6.0

func (s *AuthStorage) TerminateSession(_ context.Context, _, _ string) error

func (*AuthStorage) TokenRequestByRefreshToken added in v0.6.0

func (s *AuthStorage) TokenRequestByRefreshToken(ctx context.Context, refreshToken string) (op.RefreshTokenRequest, error)

func (*AuthStorage) ValidateJWTProfileScopes added in v0.6.0

func (s *AuthStorage) ValidateJWTProfileScopes(_ context.Context, _ string, scope []string) ([]string, error)

type ContainerConfig

type ContainerConfig struct {
	SignupSecret       string
	AuthSrvUIDomain    string
	PublishedIndexHTML string
	PublishedIndexURL  *url.URL
}

type Dataset

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

func (*Dataset) AddDatasetSchema

func (i *Dataset) AddDatasetSchema(ctx context.Context, inp interfaces.AddDatasetSchemaParam, operator *usecase.Operator) (ds *dataset.Schema, err error)

func (*Dataset) AddDynamicDataset

func (i *Dataset) AddDynamicDataset(ctx context.Context, inp interfaces.AddDynamicDatasetParam) (_ *dataset.Schema, _ *dataset.Dataset, err error)

func (*Dataset) AddDynamicDatasetSchema

func (i *Dataset) AddDynamicDatasetSchema(ctx context.Context, inp interfaces.AddDynamicDatasetSchemaParam) (_ *dataset.Schema, err error)

func (Dataset) CanReadScene

func (i Dataset) CanReadScene(t id.SceneID, op *usecase.Operator) error

func (Dataset) CanReadTeam added in v0.6.0

func (i Dataset) CanReadTeam(t id.TeamID, op *usecase.Operator) error

func (Dataset) CanWriteScene

func (i Dataset) CanWriteScene(t id.SceneID, op *usecase.Operator) error

func (Dataset) CanWriteTeam added in v0.6.0

func (i Dataset) CanWriteTeam(t id.TeamID, op *usecase.Operator) error

func (Dataset) CheckSceneLock

func (i Dataset) CheckSceneLock(ctx context.Context, s id.SceneID) error

func (*Dataset) DynamicSchemaFields

func (i *Dataset) DynamicSchemaFields() []*dataset.SchemaField

func (*Dataset) Fetch

func (i *Dataset) Fetch(ctx context.Context, ids []id.DatasetID, operator *usecase.Operator) (dataset.List, error)

func (*Dataset) FetchSchema

func (i *Dataset) FetchSchema(ctx context.Context, ids []id.DatasetSchemaID, operator *usecase.Operator) (dataset.SchemaList, error)

func (*Dataset) FindBySchema

func (*Dataset) FindDynamicSchemaByScene

func (i *Dataset) FindDynamicSchemaByScene(ctx context.Context, sid id.SceneID) (dataset.SchemaList, error)

func (*Dataset) FindSchemaByScene

func (i *Dataset) FindSchemaByScene(ctx context.Context, sid id.SceneID, p *usecase.Pagination, operator *usecase.Operator) (dataset.SchemaList, *usecase.PageInfo, error)

func (*Dataset) GraphFetch

func (i *Dataset) GraphFetch(ctx context.Context, id id.DatasetID, depth int, operator *usecase.Operator) (dataset.List, error)

func (*Dataset) GraphFetchSchema

func (i *Dataset) GraphFetchSchema(ctx context.Context, id id.DatasetSchemaID, depth int, operator *usecase.Operator) (dataset.SchemaList, error)

func (*Dataset) ImportDataset

func (i *Dataset) ImportDataset(ctx context.Context, inp interfaces.ImportDatasetParam, operator *usecase.Operator) (_ *dataset.Schema, err error)

func (*Dataset) ImportDatasetFromGoogleSheet

func (i *Dataset) ImportDatasetFromGoogleSheet(ctx context.Context, inp interfaces.ImportDatasetFromGoogleSheetParam, operator *usecase.Operator) (_ *dataset.Schema, err error)

func (Dataset) OnlyOperator added in v0.6.0

func (Dataset) OnlyOperator(op *usecase.Operator) error

func (Dataset) ReleaseSceneLock

func (i Dataset) ReleaseSceneLock(ctx context.Context, s id.SceneID)

func (*Dataset) RemoveDatasetSchema

func (i *Dataset) RemoveDatasetSchema(ctx context.Context, inp interfaces.RemoveDatasetSchemaParam, operator *usecase.Operator) (_ id.DatasetSchemaID, err error)

func (*Dataset) Sync

func (i *Dataset) Sync(ctx context.Context, sceneID id.SceneID, url string, operator *usecase.Operator) (dss dataset.SchemaList, ds dataset.List, err error)

func (*Dataset) UpdateDatasetSchema

func (i *Dataset) UpdateDatasetSchema(ctx context.Context, inp interfaces.UpdateDatasetSchemaParam, operator *usecase.Operator) (_ *dataset.Schema, err error)

func (Dataset) UpdateSceneLock

func (i Dataset) UpdateSceneLock(ctx context.Context, s id.SceneID, before, after scene.LockMode) error

type Layer

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

func (*Layer) AddGroup

func (i *Layer) AddGroup(ctx context.Context, inp interfaces.AddLayerGroupInput, operator *usecase.Operator) (_ *layer.Group, _ *layer.Group, err error)

func (*Layer) AddInfoboxField

func (i *Layer) AddInfoboxField(ctx context.Context, inp interfaces.AddInfoboxFieldParam, operator *usecase.Operator) (_ *layer.InfoboxField, _ layer.Layer, err error)

func (*Layer) AddItem

func (i *Layer) AddItem(ctx context.Context, inp interfaces.AddLayerItemInput, operator *usecase.Operator) (_ *layer.Item, _ *layer.Group, err error)

func (*Layer) AttachTag

func (i *Layer) AttachTag(ctx context.Context, layerID id.LayerID, tagID id.TagID, operator *usecase.Operator) (layer.Layer, error)

func (Layer) CanReadScene

func (i Layer) CanReadScene(t id.SceneID, op *usecase.Operator) error

func (Layer) CanReadTeam added in v0.6.0

func (i Layer) CanReadTeam(t id.TeamID, op *usecase.Operator) error

func (Layer) CanWriteScene

func (i Layer) CanWriteScene(t id.SceneID, op *usecase.Operator) error

func (Layer) CanWriteTeam added in v0.6.0

func (i Layer) CanWriteTeam(t id.TeamID, op *usecase.Operator) error

func (Layer) CheckSceneLock

func (i Layer) CheckSceneLock(ctx context.Context, s id.SceneID) error

func (*Layer) CreateInfobox

func (i *Layer) CreateInfobox(ctx context.Context, lid id.LayerID, operator *usecase.Operator) (_ layer.Layer, err error)

func (*Layer) DetachTag

func (i *Layer) DetachTag(ctx context.Context, layerID id.LayerID, tagID id.TagID, operator *usecase.Operator) (layer.Layer, error)

func (*Layer) Export added in v0.6.0

func (l *Layer) Export(ctx context.Context, lid id.LayerID, ext string) (io.Reader, string, error)

func (*Layer) Fetch

func (i *Layer) Fetch(ctx context.Context, ids []id.LayerID, operator *usecase.Operator) (layer.List, error)

func (*Layer) FetchByProperty

func (i *Layer) FetchByProperty(ctx context.Context, pid id.PropertyID, operator *usecase.Operator) (layer.Layer, error)

func (*Layer) FetchByTag added in v0.3.0

func (i *Layer) FetchByTag(ctx context.Context, tag id.TagID, operator *usecase.Operator) (layer.List, error)

func (*Layer) FetchGroup

func (i *Layer) FetchGroup(ctx context.Context, ids []id.LayerID, operator *usecase.Operator) ([]*layer.Group, error)

func (*Layer) FetchItem

func (i *Layer) FetchItem(ctx context.Context, ids []id.LayerID, operator *usecase.Operator) ([]*layer.Item, error)

func (*Layer) FetchMerged

func (i *Layer) FetchMerged(ctx context.Context, org id.LayerID, parent *id.LayerID, operator *usecase.Operator) (*layer.Merged, error)

func (*Layer) FetchParent

func (i *Layer) FetchParent(ctx context.Context, pid id.LayerID, operator *usecase.Operator) (*layer.Group, error)

func (*Layer) FetchParentAndMerged

func (i *Layer) FetchParentAndMerged(ctx context.Context, org id.LayerID, operator *usecase.Operator) (*layer.Merged, error)

func (*Layer) ImportLayer

func (i *Layer) ImportLayer(ctx context.Context, inp interfaces.ImportLayerParam, operator *usecase.Operator) (_ layer.List, _ *layer.Group, err error)

func (*Layer) Move

func (i *Layer) Move(ctx context.Context, inp interfaces.MoveLayerInput, operator *usecase.Operator) (_ id.LayerID, _ *layer.Group, _ *layer.Group, _ int, err error)

func (*Layer) MoveInfoboxField

func (i *Layer) MoveInfoboxField(ctx context.Context, inp interfaces.MoveInfoboxFieldParam, operator *usecase.Operator) (_ id.InfoboxFieldID, _ layer.Layer, _ int, err error)

func (Layer) OnlyOperator added in v0.6.0

func (Layer) OnlyOperator(op *usecase.Operator) error

func (Layer) ReleaseSceneLock

func (i Layer) ReleaseSceneLock(ctx context.Context, s id.SceneID)

func (*Layer) Remove

func (i *Layer) Remove(ctx context.Context, lid id.LayerID, operator *usecase.Operator) (_ id.LayerID, _ *layer.Group, err error)

func (*Layer) RemoveInfobox

func (i *Layer) RemoveInfobox(ctx context.Context, layerID id.LayerID, operator *usecase.Operator) (_ layer.Layer, err error)

func (*Layer) RemoveInfoboxField

func (i *Layer) RemoveInfoboxField(ctx context.Context, inp interfaces.RemoveInfoboxFieldParam, operator *usecase.Operator) (_ id.InfoboxFieldID, _ layer.Layer, err error)

func (*Layer) Update

func (i *Layer) Update(ctx context.Context, inp interfaces.UpdateLayerInput, operator *usecase.Operator) (_ layer.Layer, err error)

func (Layer) UpdateSceneLock

func (i Layer) UpdateSceneLock(ctx context.Context, s id.SceneID, before, after scene.LockMode) error

type OpenIDConfiguration added in v0.6.0

type OpenIDConfiguration struct {
	UserinfoEndpoint string `json:"userinfo_endpoint"`
}

type Plugin

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

func (Plugin) CanReadScene

func (i Plugin) CanReadScene(t id.SceneID, op *usecase.Operator) error

func (Plugin) CanReadTeam

func (i Plugin) CanReadTeam(t id.TeamID, op *usecase.Operator) error

func (Plugin) CanWriteScene

func (i Plugin) CanWriteScene(t id.SceneID, op *usecase.Operator) error

func (Plugin) CanWriteTeam

func (i Plugin) CanWriteTeam(t id.TeamID, op *usecase.Operator) error

func (*Plugin) Fetch

func (i *Plugin) Fetch(ctx context.Context, ids []id.PluginID, operator *usecase.Operator) ([]*plugin.Plugin, error)

func (*Plugin) FetchPluginMetadata

func (i *Plugin) FetchPluginMetadata(ctx context.Context, operator *usecase.Operator) ([]*plugin.Metadata, error)

func (Plugin) OnlyOperator

func (Plugin) OnlyOperator(op *usecase.Operator) error

func (*Plugin) Upload

func (i *Plugin) Upload(ctx context.Context, r io.Reader, sid id.SceneID, operator *usecase.Operator) (_ *plugin.Plugin, _ *scene.Scene, err error)

func (*Plugin) UploadFromRemote

func (i *Plugin) UploadFromRemote(ctx context.Context, u *url.URL, sid id.SceneID, operator *usecase.Operator) (_ *plugin.Plugin, _ *scene.Scene, err error)

type Project

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

func (Project) CanReadScene

func (i Project) CanReadScene(t id.SceneID, op *usecase.Operator) error

func (Project) CanReadTeam added in v0.6.0

func (i Project) CanReadTeam(t id.TeamID, op *usecase.Operator) error

func (Project) CanWriteScene

func (i Project) CanWriteScene(t id.SceneID, op *usecase.Operator) error

func (Project) CanWriteTeam added in v0.6.0

func (i Project) CanWriteTeam(t id.TeamID, op *usecase.Operator) error

func (*Project) CheckAlias

func (i *Project) CheckAlias(ctx context.Context, alias string) (bool, error)

func (Project) CheckSceneLock

func (i Project) CheckSceneLock(ctx context.Context, s id.SceneID) error

func (*Project) Create

func (i *Project) Create(ctx context.Context, p interfaces.CreateProjectParam, operator *usecase.Operator) (_ *project.Project, err error)

func (*Project) Delete

func (i *Project) Delete(ctx context.Context, projectID id.ProjectID, operator *usecase.Operator) (err error)

func (*Project) Fetch

func (i *Project) Fetch(ctx context.Context, ids []id.ProjectID, operator *usecase.Operator) ([]*project.Project, error)

func (*Project) FindByTeam

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

func (Project) OnlyOperator added in v0.6.0

func (Project) OnlyOperator(op *usecase.Operator) error

func (*Project) Publish

func (i *Project) Publish(ctx context.Context, params interfaces.PublishProjectParam, operator *usecase.Operator) (_ *project.Project, err error)

func (Project) ReleaseSceneLock

func (i Project) ReleaseSceneLock(ctx context.Context, s id.SceneID)

func (*Project) Update

func (i *Project) Update(ctx context.Context, p interfaces.UpdateProjectParam, operator *usecase.Operator) (_ *project.Project, err error)

func (Project) UpdateSceneLock

func (i Project) UpdateSceneLock(ctx context.Context, s id.SceneID, before, after scene.LockMode) error

type ProjectDeleter

type ProjectDeleter struct {
	SceneDeleter
	File    gateway.File
	Project repo.Project
}

func (ProjectDeleter) Delete

func (d ProjectDeleter) Delete(ctx context.Context, prj *project.Project, force bool, operator *usecase.Operator) error

type Property

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

func (*Property) AddItem

func (Property) CanReadScene

func (i Property) CanReadScene(t id.SceneID, op *usecase.Operator) error

func (Property) CanReadTeam added in v0.6.0

func (i Property) CanReadTeam(t id.TeamID, op *usecase.Operator) error

func (Property) CanWriteScene

func (i Property) CanWriteScene(t id.SceneID, op *usecase.Operator) error

func (Property) CanWriteTeam added in v0.6.0

func (i Property) CanWriteTeam(t id.TeamID, op *usecase.Operator) error

func (Property) CheckSceneLock

func (i Property) CheckSceneLock(ctx context.Context, s id.SceneID) error

func (*Property) Fetch

func (i *Property) Fetch(ctx context.Context, ids []id.PropertyID, operator *usecase.Operator) ([]*property.Property, error)

func (*Property) FetchMerged

func (i *Property) FetchMerged(ctx context.Context, org, parent *id.PropertyID, linked *id.DatasetID, operator *usecase.Operator) (*property.Merged, error)

func (*Property) FetchSchema

func (i *Property) FetchSchema(ctx context.Context, ids []id.PropertySchemaID, operator *usecase.Operator) ([]*property.Schema, error)

func (*Property) LinkValue

func (*Property) MoveItem

func (Property) OnlyOperator added in v0.6.0

func (Property) OnlyOperator(op *usecase.Operator) error

func (Property) ReleaseSceneLock

func (i Property) ReleaseSceneLock(ctx context.Context, s id.SceneID)

func (*Property) RemoveField

func (i *Property) RemoveField(ctx context.Context, inp interfaces.RemovePropertyFieldParam, operator *usecase.Operator) (p *property.Property, err error)

func (*Property) RemoveItem

func (i *Property) RemoveItem(ctx context.Context, inp interfaces.RemovePropertyItemParam, operator *usecase.Operator) (p *property.Property, err error)

func (*Property) UnlinkValue

func (*Property) UpdateItems

func (Property) UpdateSceneLock

func (i Property) UpdateSceneLock(ctx context.Context, s id.SceneID, before, after scene.LockMode) error

func (*Property) UpdateValue

func (*Property) UploadFile

func (i *Property) UploadFile(ctx context.Context, inp interfaces.UploadFileParam, operator *usecase.Operator) (p *property.Property, pgl *property.GroupList, pg *property.Group, field *property.Field, err error)

type Published

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

func (*Published) Data

func (i *Published) Data(ctx context.Context, name string) (io.Reader, error)

func (*Published) Index

func (i *Published) Index(ctx context.Context, name string, u *url.URL) (string, error)

func (*Published) Metadata

type Scene

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

func (*Scene) AddCluster added in v0.3.0

func (i *Scene) AddCluster(ctx context.Context, sceneID id.SceneID, name string, operator *usecase.Operator) (*scene.Scene, *scene.Cluster, error)

func (*Scene) AddWidget

func (i *Scene) AddWidget(ctx context.Context, sid id.SceneID, pid id.PluginID, eid id.PluginExtensionID, operator *usecase.Operator) (_ *scene.Scene, widget *scene.Widget, err error)

func (Scene) CanReadScene

func (i Scene) CanReadScene(t id.SceneID, op *usecase.Operator) error

func (Scene) CanReadTeam added in v0.6.0

func (i Scene) CanReadTeam(t id.TeamID, op *usecase.Operator) error

func (Scene) CanWriteScene

func (i Scene) CanWriteScene(t id.SceneID, op *usecase.Operator) error

func (Scene) CanWriteTeam added in v0.6.0

func (i Scene) CanWriteTeam(t id.TeamID, op *usecase.Operator) error

func (Scene) CheckSceneLock

func (i Scene) CheckSceneLock(ctx context.Context, s id.SceneID) error

func (*Scene) Create

func (i *Scene) Create(ctx context.Context, pid id.ProjectID, operator *usecase.Operator) (_ *scene.Scene, err error)

func (*Scene) Fetch

func (i *Scene) Fetch(ctx context.Context, ids []id.SceneID, operator *usecase.Operator) ([]*scene.Scene, error)

func (*Scene) FetchLock

func (s *Scene) FetchLock(ctx context.Context, ids []id.SceneID, operator *usecase.Operator) ([]scene.LockMode, error)

func (*Scene) FindByProject

func (i *Scene) FindByProject(ctx context.Context, id id.ProjectID, operator *usecase.Operator) (*scene.Scene, error)

func (*Scene) InstallPlugin

func (i *Scene) InstallPlugin(ctx context.Context, sid id.SceneID, pid id.PluginID, operator *usecase.Operator) (_ *scene.Scene, _ id.PluginID, _ *id.PropertyID, err error)

func (Scene) OnlyOperator added in v0.6.0

func (Scene) OnlyOperator(op *usecase.Operator) error

func (Scene) ReleaseSceneLock

func (i Scene) ReleaseSceneLock(ctx context.Context, s id.SceneID)

func (*Scene) RemoveCluster added in v0.3.0

func (i *Scene) RemoveCluster(ctx context.Context, sceneID id.SceneID, clusterID id.ClusterID, operator *usecase.Operator) (*scene.Scene, error)

func (*Scene) RemoveWidget

func (i *Scene) RemoveWidget(ctx context.Context, id id.SceneID, wid id.WidgetID, operator *usecase.Operator) (_ *scene.Scene, err error)

func (*Scene) UninstallPlugin

func (i *Scene) UninstallPlugin(ctx context.Context, sid id.SceneID, pid id.PluginID, operator *usecase.Operator) (_ *scene.Scene, err error)

func (*Scene) UpdateCluster added in v0.3.0

func (i *Scene) UpdateCluster(ctx context.Context, param interfaces.UpdateClusterParam, operator *usecase.Operator) (*scene.Scene, *scene.Cluster, error)

func (Scene) UpdateSceneLock

func (i Scene) UpdateSceneLock(ctx context.Context, s id.SceneID, before, after scene.LockMode) error

func (*Scene) UpdateWidget

func (i *Scene) UpdateWidget(ctx context.Context, param interfaces.UpdateWidgetParam, operator *usecase.Operator) (_ *scene.Scene, _ *scene.Widget, err error)

func (*Scene) UpdateWidgetAlignSystem

func (i *Scene) UpdateWidgetAlignSystem(ctx context.Context, param interfaces.UpdateWidgetAlignSystemParam, operator *usecase.Operator) (_ *scene.Scene, err error)

func (*Scene) UpgradePlugin

func (i *Scene) UpgradePlugin(ctx context.Context, sid id.SceneID, oldPluginID, newPluginID id.PluginID, operator *usecase.Operator) (_ *scene.Scene, err error)

type SceneDeleter

type SceneDeleter struct {
	Scene         repo.Scene
	SceneLock     repo.SceneLock
	Layer         repo.Layer
	Property      repo.Property
	Dataset       repo.Dataset
	DatasetSchema repo.DatasetSchema
}

func (SceneDeleter) Delete

func (d SceneDeleter) Delete(ctx context.Context, s *scene.Scene, force bool) error

type StorageConfig added in v0.6.0

type StorageConfig struct {
	Domain       string `default:"http://localhost:8080"`
	ClientDomain string `default:"http://localhost:8080"`
	Debug        bool
	DN           *AuthDNConfig
}

type Tag

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

func (*Tag) AttachItemToGroup

func (i *Tag) AttachItemToGroup(ctx context.Context, inp interfaces.AttachItemToGroupParam, operator *usecase.Operator) (*tag.Group, error)

func (Tag) CanReadScene

func (i Tag) CanReadScene(t id.SceneID, op *usecase.Operator) error

func (Tag) CanReadTeam added in v0.6.0

func (i Tag) CanReadTeam(t id.TeamID, op *usecase.Operator) error

func (Tag) CanWriteScene

func (i Tag) CanWriteScene(t id.SceneID, op *usecase.Operator) error

func (Tag) CanWriteTeam added in v0.6.0

func (i Tag) CanWriteTeam(t id.TeamID, op *usecase.Operator) error

func (*Tag) CreateGroup

func (i *Tag) CreateGroup(ctx context.Context, inp interfaces.CreateTagGroupParam, operator *usecase.Operator) (*tag.Group, error)

func (*Tag) CreateItem

func (i *Tag) CreateItem(ctx context.Context, inp interfaces.CreateTagItemParam, operator *usecase.Operator) (*tag.Item, *tag.Group, error)

func (*Tag) DetachItemFromGroup

func (i *Tag) DetachItemFromGroup(ctx context.Context, inp interfaces.DetachItemToGroupParam, operator *usecase.Operator) (*tag.Group, error)

func (*Tag) Fetch

func (i *Tag) Fetch(ctx context.Context, ids []id.TagID, operator *usecase.Operator) ([]*tag.Tag, error)

func (*Tag) FetchByScene

func (i *Tag) FetchByScene(ctx context.Context, sid id.SceneID, operator *usecase.Operator) ([]*tag.Tag, error)

func (*Tag) FetchGroup

func (i *Tag) FetchGroup(ctx context.Context, ids []id.TagID, operator *usecase.Operator) ([]*tag.Group, error)

func (*Tag) FetchItem

func (i *Tag) FetchItem(ctx context.Context, ids []id.TagID, operator *usecase.Operator) ([]*tag.Item, error)

func (Tag) OnlyOperator added in v0.6.0

func (Tag) OnlyOperator(op *usecase.Operator) error

func (*Tag) Remove

func (i *Tag) Remove(ctx context.Context, tagID id.TagID, operator *usecase.Operator) (*id.TagID, layer.List, error)

func (*Tag) UpdateTag

func (i *Tag) UpdateTag(ctx context.Context, inp interfaces.UpdateTagParam, operator *usecase.Operator) (*tag.Tag, error)

type Team

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

func (*Team) AddMember

func (i *Team) AddMember(ctx context.Context, id id.TeamID, u id.UserID, role user.Role, operator *usecase.Operator) (_ *user.Team, err error)

func (Team) CanReadScene added in v0.6.0

func (i Team) CanReadScene(t id.SceneID, op *usecase.Operator) error

func (Team) CanReadTeam

func (i Team) CanReadTeam(t id.TeamID, op *usecase.Operator) error

func (Team) CanWriteScene added in v0.6.0

func (i Team) CanWriteScene(t id.SceneID, op *usecase.Operator) error

func (Team) CanWriteTeam

func (i Team) CanWriteTeam(t id.TeamID, op *usecase.Operator) error

func (*Team) Create

func (i *Team) Create(ctx context.Context, name string, firstUser id.UserID, operator *usecase.Operator) (_ *user.Team, err error)

func (*Team) Fetch

func (i *Team) Fetch(ctx context.Context, ids []id.TeamID, operator *usecase.Operator) ([]*user.Team, error)

func (*Team) FindByUser

func (i *Team) FindByUser(ctx context.Context, id id.UserID, operator *usecase.Operator) ([]*user.Team, error)

func (Team) OnlyOperator

func (Team) OnlyOperator(op *usecase.Operator) error

func (*Team) Remove

func (i *Team) Remove(ctx context.Context, id id.TeamID, operator *usecase.Operator) (err error)

func (*Team) RemoveMember

func (i *Team) RemoveMember(ctx context.Context, id id.TeamID, u id.UserID, operator *usecase.Operator) (_ *user.Team, err error)

func (*Team) Update

func (i *Team) Update(ctx context.Context, id id.TeamID, name string, operator *usecase.Operator) (_ *user.Team, err error)

func (*Team) UpdateMember

func (i *Team) UpdateMember(ctx context.Context, id id.TeamID, u id.UserID, role user.Role, operator *usecase.Operator) (_ *user.Team, err error)

type User

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

func (User) CanReadScene added in v0.6.0

func (i User) CanReadScene(t id.SceneID, op *usecase.Operator) error

func (User) CanReadTeam

func (i User) CanReadTeam(t id.TeamID, op *usecase.Operator) error

func (User) CanWriteScene added in v0.6.0

func (i User) CanWriteScene(t id.SceneID, op *usecase.Operator) error

func (User) CanWriteTeam

func (i User) CanWriteTeam(t id.TeamID, op *usecase.Operator) error

func (*User) CreateVerification added in v0.6.0

func (i *User) CreateVerification(ctx context.Context, email string) error

func (*User) DeleteMe

func (i *User) DeleteMe(ctx context.Context, userID id.UserID, operator *usecase.Operator) (err error)

func (*User) Fetch

func (i *User) Fetch(ctx context.Context, ids []id.UserID, operator *usecase.Operator) ([]*user.User, error)

func (*User) GetUserByCredentials added in v0.6.0

func (i *User) GetUserByCredentials(ctx context.Context, inp interfaces.GetUserByCredentials) (u *user.User, err error)

func (*User) GetUserBySubject added in v0.6.0

func (i *User) GetUserBySubject(ctx context.Context, sub string) (u *user.User, err error)

func (User) OnlyOperator

func (User) OnlyOperator(op *usecase.Operator) error

func (*User) PasswordReset added in v0.6.0

func (i *User) PasswordReset(ctx context.Context, password, token string) error

func (*User) RemoveMyAuth

func (i *User) RemoveMyAuth(ctx context.Context, authProvider string, operator *usecase.Operator) (u *user.User, err error)

func (*User) SearchUser

func (i *User) SearchUser(ctx context.Context, nameOrEmail string, operator *usecase.Operator) (u *user.User, err error)

func (*User) Signup

func (i *User) Signup(ctx context.Context, inp interfaces.SignupParam) (*user.User, *user.Team, error)

func (*User) SignupOIDC added in v0.6.0

func (i *User) SignupOIDC(ctx context.Context, inp interfaces.SignupOIDCParam) (u *user.User, _ *user.Team, err error)

func (*User) StartPasswordReset added in v0.6.0

func (i *User) StartPasswordReset(ctx context.Context, email string) error

func (*User) UpdateMe

func (i *User) UpdateMe(ctx context.Context, p interfaces.UpdateMeParam, operator *usecase.Operator) (u *user.User, err error)

func (*User) VerifyUser added in v0.6.0

func (i *User) VerifyUser(ctx context.Context, code string) (*user.User, error)

type UserInfo added in v0.6.0

type UserInfo struct {
	Sub      string `json:"sub"`
	Name     string `json:"name"`
	Nickname string `json:"nickname"`
	Email    string `json:"email"`
	Error    string `json:"error"`
}

Jump to

Keyboard shortcuts

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