Documentation
¶
Index ¶
- func New(constructor constructor) (boot *bootstrap)
- func NewStep(stepper stepper) *stepBuilder
- type Base
- func (b *Base) Carding() (card any, err error)
- func (b *Base) Cleanup() *cleanupBuilder
- func (b *Base) Command(command string) (builder *commandBuilder)
- func (b *Base) Default() bool
- func (b *Base) Expressions() (expressions Expressions)
- func (b *Base) Fields() gox.Fields[any]
- func (b *Base) Http() *resty.Request
- func (b *Base) Parse(to map[string]string, configs ...string)
- func (b *Base) Parses(to map[string][]string, configs ...string)
- func (b *Base) Scheme() (scheme string)
- func (b *Base) Setup() (err error)
- type Config
- type Expressions
- type Plugin
- type Step
- type Steps
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Base ¶ added in v0.1.0
type Base struct {
simaqian.Logger
// 是否启用默认配置
Defaults *bool `default:"${DEFAULT=true}"`
// 是否显示详细信息
Verbose bool `default:"${VERBOSE=false}"`
// 日志配置
Level string `default:"${LEVEL=info}"`
// 是否在出错时打印输出
Pwe *bool `default:"${PWE=true}"`
// 是否重试
Retry *bool `default:"${RETRY=true}"`
// 重试次数
Counts int `default:"${COUNTS=5}"`
// 重试间隔
Backoff time.Duration `default:"${BACKOFF=5s}"`
// 代理
Proxy *proxy `default:"${PROXY}"`
// 卡片
Card card `default:"${CARD}"`
// 命令列表
Commands []string `default:"${COMMANDS}"`
// contains filtered or unexported fields
}
Base 插件基础
func (*Base) Expressions ¶ added in v0.9.3
func (b *Base) Expressions() (expressions Expressions)
type Config ¶
type Config interface {
// Setup 设置配置信息
Setup() (err error)
// Fields 导出所有字段
Fields() gox.Fields[any]
// contains filtered or unexported methods
}
Config 配置
type Plugin ¶ added in v0.0.2
type Plugin interface {
// Scheme 卡片模板
Scheme() (scheme string)
// Carding 卡片数据
Carding() (card any, err error)
// Config 加载配置
Config() (config Config)
// Steps 插件运行步骤
Steps() Steps
// Expressions 表达式
Expressions() Expressions
}
Plugin 插件接口,任何插件都需要实现这个接口
type Step ¶ added in v0.0.2
type Step struct {
gox.CannotCopy
// contains filtered or unexported fields
}
Step 步骤
func NewDelayStep ¶ added in v0.2.5
NewDelayStep 创建延迟步骤,调试使用
Source Files
¶
- alias.go
- base.go
- base_card.go
- base_parse.go
- bootstrap.go
- bootstrap_aliases.go
- bootstrap_card.go
- bootstrap_cleanup.go
- bootstrap_env.go
- bootstrap_exec.go
- bootstrap_finally.go
- bootstrap_prepare.go
- bootstrap_run.go
- bootstrap_setup.go
- bootstrap_step.go
- card.go
- card_output.go
- cleanup.go
- cleanup_builder.go
- command_builder.go
- config.go
- const.go
- constructor.go
- expression.go
- expressions.go
- getter.go
- getter_expr.go
- http.go
- plugin.go
- processor.go
- proxy.go
- step.go
- step_builder.go
- step_option.go
- stepper.go
- stepper_default.go
- stepper_delay.go
- steps.go
- worker.go
- worker_file.go
Click to show internal directories.
Click to hide internal directories.

