Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Project ¶
type Project struct { ID string `json:"id" yaml:"id"` ProjectDescription }
type ProjectDescription ¶
type ProjectDescription struct { Name string `json:"name" yaml:"name"` Workspace string `json:"workspace"` Description string `yaml:"description,omitempty" json:"description,omitempty"` Owner string `yaml:"owner" json:"owner"` OwnerContact string `yaml:"ownerContact" json:"ownerContact"` Attributes map[string]string `yaml:"attributes,omitempty" json:"attributes,omitempty"` }
type ProjectManager ¶
type ProjectManager interface { GetWorkspaces() (*Workspace, error) SaveWorkspaces(*Workspace) error GetProject(id string) (*Project, error) ListProjects() ([]*Project, error) DeleteProject(id string) error CreateProject(projectDescription ProjectDescription) (*Project, error) UpdateProject(projectID string, projectDescription ProjectDescription, wsSummariser WorkspaceSummariser) (*Project, error) UpdateModel(projectID string, msg *Message) (*Message, error) GetModel(projectID string) (*Message, error) GetProjectLocation(projID string) string //ZeroTrust base directory GetBaseDir() string }
func NewDBProjectManager ¶
func NewDBProjectManager(ztBaseDir string) (ProjectManager, error)
type ProjectModel ¶
type ProjectModel struct { ThreatModel otm.OpenThreatModel `json:"threatModel" yaml:"threatModel"` VisualModel string `json:"visualModel"` }
type ProjectSlice ¶
type ProjectSlice []*Project
func (ProjectSlice) Len ¶
func (t ProjectSlice) Len() int
func (ProjectSlice) Less ¶
func (t ProjectSlice) Less(i, j int) bool
func (ProjectSlice) Swap ¶
func (t ProjectSlice) Swap(i, j int)
type Workspace ¶
type Workspace struct {
Details map[string]*WorkspaceDetail `json:"details" yaml:"details"`
}
func SimpleWorkspaceSummariser ¶
func SimpleWorkspaceSummariser(pm ProjectManager, workspacesToUpdate []string) (*Workspace, error)
func (*Workspace) RemoveProject ¶
func (ws *Workspace) RemoveProject(ps *Project, pm ProjectManager) error
type WorkspaceDetail ¶
type WorkspaceDetail struct {
Projects []*Project `json:"projects" yaml:"projects"`
}
type WorkspaceSummariser ¶
type WorkspaceSummariser func(pm ProjectManager, workspacesToUpdate []string) (*Workspace, error)
Click to show internal directories.
Click to hide internal directories.