Documentation
¶
Overview ¶
* Copyright © 2020 stepsman authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License.
* Copyright © 2020 stepsman authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License.
* Copyright © 2020 stepsman authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License.
* Copyright © 2020 stepsman authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License.
* Copyright © 2020 stepsman authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License.
* Copyright © 2020 stepsman authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License.
* Copyright © 2020 stepsman authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License.
* Copyright © 2020 stepsman authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License.
Index ¶
- Constants
- Variables
- func Execute() bool
- func Executor(s string, wasEnter bool)
- func InitConfig()
- func InitLogrus(out io.Writer, level log.Level)
- func InitLogrusALL(out io.Writer, level log.Level)
- func PersistentPreRunE() error
- func RenderStep(stepRecord *api.StepRecord, script *bl.Template) (table.Writer, error)
- func ResetCommandParameters()
- type AllParameters
- type CommandType
- type Error
Constants ¶
const SeeLogMsg = " (use with \"--help\" or see stepsman.log file for more details ! \"tail ~/.stepsman/stepsman.log\")"
const TableWrapLen = 70
Variables ¶
var BL *bl.BL
var LumberJack *lumberjack.Logger
var NoBordersStyle = table.Style{ Name: "StyleDefault", Box: table.StyleBoxDefault, Color: table.ColorOptionsDefault, Format: table.FormatOptionsDefault, HTML: table.DefaultHTMLOptions, Options: table.OptionsNoBordersAndSeparators, Title: table.TitleOptionsDefault, }
var Parameters = AllParameters{ CfgFile: "", RunKey: "", CreateFileName: "", Step: "", Run: "", InitialInput: "", CurrentCommand: CommandUndetermined, CurrentRunId: uuid.UUID{}, FlagsReInit: []func() error{}, }
var RootCmd = &cobra.Command{ Use: "stepsman", Short: "Step by step workflow manager", Long: `StepsMan is a step by step event driven business process and workflow manager. hint: "stepsman prompt" will enter interactive mode`, PersistentPreRunE: func(cmd *cobra.Command, args []string) error { return PersistentPreRunE() }, }
var ServeCmd = &cobra.Command{ Use: "serve", Short: "serve will enter server mode and serve http requests", Long: `Use serve to remote control stepsman via http. You can query, monitor and do remotely.`, Run: func(cmd *cobra.Command, args []string) { defer recoverAndLog("failed to serve") syncServeParams() if Parameters.InPromptMode { msg := "serve is not available from within prompt" Parameters.Err = &Error{ Technical: fmt.Errorf(msg), Friendly: msg, } return } serveServe.Serve(BL, Parameters.ServerAddress, Parameters.ServerPort, Parameters.ServerHealthPort) }, }
var StoreDir string
Functions ¶
func InitConfig ¶
func InitConfig()
func PersistentPreRunE ¶
func PersistentPreRunE() error
func RenderStep ¶
func ResetCommandParameters ¶
func ResetCommandParameters()
Types ¶
type AllParameters ¶
type AllParameters struct {
// Flags
GroupId uuid.UUID
GroupIdStr string
CfgFile string
DatabaseVendor string
DataSourceName string
DatabaseHost string
DatabasePort int64
DatabaseName string
DatabaseSSLMode bool
DatabaseAutoMigrate bool
DatabaseUserName string
DatabasePassword string
DatabaseSchema string
CreateFileName string
FileType string
RunKey string
ServerPort int64
ServerAddress string
ServerHealthPort int64
Step string
OnlyTemplateType string
Run string
Status string
Force bool
StatusOwner string
Context string
//ListQuery
RangeStart int64
RangeEnd int64
RangeReturnTotal bool
SortFields []string
SortOrder string
Filters []string
// Others
InPromptMode bool
InitialInput string
CurrentCommand CommandType
CurrentStepIndex string
CurrentRunId uuid.UUID
CurrentRun *api.RunRecord
FlagsReInit []func() error
Err error
Label string
State string
}
type CommandType ¶
type CommandType int
const ( CommandUndetermined CommandType = iota CommandBang CommandCreateRun CommandDescribeRun CommandDoStep CommandListSteps CommandListRuns CommandGetRun CommandUpdateRun CommandUpdateStep CommandDeleteRun )