cmd

package
v0.0.0-...-0bedf40 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2024 License: MIT Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cloud

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

func NewCloud

func NewCloud(root *Root, l *log.Logger) *Cloud

func (*Cloud) Add

func (c *Cloud) Add(command ...*cobra.Command)

func (*Cloud) Command

func (c *Cloud) Command() *cobra.Command

type CloudOpts

type CloudOpts struct {
	Input    string // 加载文件路径,或文件
	Parallel int64  // 并发上传文件数量

	Output string // 生成文件路径
}

type Crypto

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

func NewCrypto

func NewCrypto(root *Root, l *log.Logger) *Crypto

func (*Crypto) Add

func (c *Crypto) Add(command ...*cobra.Command)

func (*Crypto) Command

func (c *Crypto) Command() *cobra.Command

type CryptoOpts

type CryptoOpts struct {
	Input  string // 加载文件路径,或文本内容
	Output string // 生成文件路径
	Kind   string // api类型
}

type Curl

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

func NewCurl

func NewCurl(root *Root, l *log.Logger) *Curl

func (*Curl) Add

func (c *Curl) Add(command ...*cobra.Command)

func (*Curl) Command

func (c *Curl) Command() *cobra.Command

type CurlOpts

type CurlOpts struct {
	Method  string        // 请求方法
	Input   string        // 加载文件路径,或文本内容
	Output  string        // 生成文件路径
	Kind    string        // api类型
	Timeout time.Duration // 超时时间
}

type Login

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

func NewLogin

func NewLogin(root *Root, l *log.Logger) *Login

func (*Login) Add

func (c *Login) Add(command ...*cobra.Command)

func (*Login) Command

func (c *Login) Command() *cobra.Command

type LoginOpts

type LoginOpts struct {
	Account string
}

type Partner

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

func NewPartner

func NewPartner(root *Root, l *log.Logger) *Partner

func (*Partner) Add

func (c *Partner) Add(command ...*cobra.Command)

func (*Partner) Command

func (c *Partner) Command() *cobra.Command

type PartnerOpts

type PartnerOpts struct {
	Crontab string
	Star    []int64
	Once    bool
}

type Payload

type Payload struct {
	Api      string   `json:"api,omitempty"`
	Method   string   `json:"method,omitempty"`
	Kind     string   `json:"kind,omitempty"`
	Status   string   `json:"status,omitempty"`
	Request  Request  `json:"request,omitempty"`
	Response Response `json:"response,omitempty"`
}

type Request

type Request struct {
	Ciphertext   string `json:"ciphertext,omitempty"`
	RawPlaintext string `json:"rawPlaintext,omitempty"`
	Url          string `json:"url,omitempty"`
	Digest       string `json:"digest,omitempty"`
	Plaintext    string `json:"plaintext,omitempty"`
}

type Response

type Response struct {
	Ciphertext string `json:"ciphertext,omitempty"`
	Plaintext  string `json:"plaintext,omitempty"`
}

type Root

type Root struct {
	Cfg  *config.Config
	Opts RootOpts
	// contains filtered or unexported fields
}

func New

func New(cfg *config.Config, l *log.Logger) *Root

func (*Root) Add

func (c *Root) Add(command ...*cobra.Command)

func (*Root) Execute

func (c *Root) Execute()

func (*Root) Version

func (c *Root) Version(version string)

type RootOpts

type RootOpts struct {
	Debug  bool   // 是否开启命令行debug模式
	Stdout bool   // 生成内容是否打印到标准数据中
	Config string // 配置文件路径
}

Jump to

Keyboard shortcuts

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