Documentation ¶
Index ¶
- Constants
- Variables
- func CreateWorkspace(w Workspace, opts Options) error
- func InitWorkspace(w Workspace, opts Options) error
- func MoveWorkspace(w map[string]string, newpath string) error
- func PrintTinyStat(w Workspace)
- func RemoveWorkspace(path string, force bool) error
- func RunAction(script Action, quiet bool) error
- type Action
- type Flows
- type License
- type Options
- type Space
- type Workspace
Constants ¶
View Source
const ( BeforeRunScriptFormat = ` Running %s action $ wo run %s ` ScriptShowFormat = "$ %s" )
View Source
const ( ErrFormatAlreadyExists = "dir already exists: %s" ErrFormatFolderDoesntExist = "folder doesn't exist: %s" )
Variables ¶
View Source
var Licenses = []License{
{Name: "Academic Free License 3.0 ", Identifier: "AFL-3.0"},
{Name: "Adaptive Public License", Identifier: "APL-1.0"},
{Name: "Apache License 2.0", Identifier: "Apache-2.0"},
{Name: "Apple Public Source License 2.0 ", Identifier: "APSL-2.0"},
{Name: "Artistic License 2.0", Identifier: "Artistic-2.0"},
{Name: "BSD Zero Clause License", Identifier: "0BSD"},
{Name: "BSD 1-Clause License", Identifier: "BSD-1-Clause"},
{Name: "BSD 2-Clause License", Identifier: "BSD-2-Clause"},
{Name: "BSD 3-Clause License", Identifier: "BSD-3-Clause"},
{Name: "Educational Community License 2.0", Identifier: "ECL-2.0"},
{Name: "Eclipse Public License 2.0", Identifier: "EPL-2.0"},
{Name: "GNU Affero General Public License 3.0", Identifier: "AGPL-3.0"},
{Name: "GNU General Public License 2.0", Identifier: "GPL-2.0-only"},
{Name: "GNU General Public License 3.0", Identifier: "GPL-3.0-only"},
{Name: "GNU Lesser General Public License 2.1", Identifier: "LGPL-2.1-only"},
{Name: "GNU Lesser General Public License 3.0", Identifier: "LGPL-3.0-only"},
{Name: "IBM Public License 1.0", Identifier: "IPL-1.0"},
{Name: "ISC License", Identifier: "ISC"},
{Name: "Microsoft Public License", Identifier: "MS-PL"},
{Name: "MIT License", Identifier: "MIT"},
{Name: "Mozilla Public License 2.0", Identifier: "MPL-2.0"},
{Name: "Open Software License 3.0", Identifier: "OSL-3.0"},
{Name: "University of Illinois/NCSA Open Source License", Identifier: " NCSA"},
{Name: "The Unlicense", Identifier: "Unlicense"},
{Name: "zLib License", Identifier: "ZLib"},
}
View Source
var WorkspaceNameValidationRules = []validation.Rule{validation.Required, validation.Length(2, 64), is.PrintableASCII}
Functions ¶
func CreateWorkspace ¶
func InitWorkspace ¶
func PrintTinyStat ¶
func PrintTinyStat(w Workspace)
func RemoveWorkspace ¶
Types ¶
type Action ¶
type Flows ¶
type Options ¶
type Space ¶
type Space struct { ID string `json:"id"` Description string `json:"description"` TempDir string `json:"temp_dir"` RootDir string `json:"root_dir"` Defaults Options `json:"defaults"` CreatedAt int64 `json:"created_at"` Workspaces map[string]Workspace `json:"workspaces"` }
func (*Space) MapForConfig ¶
func (*Space) MapWithoutWorkspaces ¶
type Workspace ¶
type Workspace struct { ID string `json:"id"` Name string `json:"name"` Path string `json:"path"` Description string `json:"description"` Run string `json:"run"` Actions []Action `json:"actions"` Flows []Flows `json:"flows"` CreatedAt int64 `json:"created_at"` }
func (*Workspace) MapForConfig ¶
Click to show internal directories.
Click to hide internal directories.