commands

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2022 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CertsAuto

type CertsAuto struct {
	SynoClient  `group:"Synology Client" namespace:"synology" env-namespace:"SYNOLOGY"`
	CacheDir    string        `short:"c" long:"cache-dir" env:"CACHE_DIR" description:"Cache location for accounts information" default:".cache"`
	RenewBefore time.Duration `short:"r" long:"renew-before" env:"RENEW_BEFORE" description:"Renew certificate time reserve" default:"720h"`
	Email       string        `short:"e" long:"email" env:"EMAIL" description:"Email for contact"`
	Provider    string        `short:"p" long:"provider" env:"PROVIDER" description:"DNS challenge provider" required:"true" `
	DNS         []string      `short:"D" long:"dns" env:"DNS" env-delim:","  description:"Custom resolvers" default:"8.8.8.8"`
	Timeout     time.Duration `short:"t" long:"timeout" env:"TIMEOUT" description:"DNS challenge timeout" default:"1m"`
	Domains     []string      `short:"d" long:"domains" env:"DOMAINS" env-delim:","  description:"Domains names to issue" required:"true"`
}

func (*CertsAuto) Execute

func (lc *CertsAuto) Execute([]string) error

type CertsDelete

type CertsDelete struct {
	SynoClient `group:"Synology Client" namespace:"synology" env-namespace:"SYNOLOGY"`
	Format     string `short:"f" long:"format" env:"FORMAT" description:"Output format" default:"table" choice:"table" choice:"json"`
	Args       struct {
		ID string `positional-arg-name:"id" env:"NAME" description:"certificate ID or name" required:"true"`
	} `positional-args:"true"`
}

func (*CertsDelete) Execute

func (lc *CertsDelete) Execute([]string) error

type CertsList

type CertsList struct {
	SynoClient `group:"Synology Client" namespace:"synology" env-namespace:"SYNOLOGY"`
	Format     string `short:"f" long:"format" env:"FORMAT" description:"How to show output" default:"table" choice:"table" choice:"json"`
}

func (*CertsList) Execute

func (lc *CertsList) Execute([]string) error

type CertsUpload

type CertsUpload struct {
	SynoClient `group:"Synology Client" namespace:"synology" env-namespace:"SYNOLOGY"`
	Key        string `short:"k" long:"key" env:"KEY" description:"Path to private key. Use - (dash) to read it from stdin" default:"-"`
	Cert       string `short:"c" long:"cert" env:"CERT" description:"Path to server certificate" required:"true"`
	CA         string `short:"C" long:"ca" env:"CA" description:"Path to intermediate certificate"`
	Format     string `short:"f" long:"format" env:"FORMAT" description:"Output format" default:"table" choice:"table" choice:"json"`
	Default    bool   `short:"d" long:"default" env:"DEFAULT" description:"Set certificate as default"`
	Args       struct {
		Name string `positional-arg-name:"name" env:"NAME" description:"certificate name" required:"true"`
	} `positional-args:"true"`
}

func (*CertsUpload) Execute

func (lc *CertsUpload) Execute([]string) error

type SynoClient

type SynoClient struct {
	User     string `long:"user" env:"USER" description:"Synology username" required:"true"`
	Password string `long:"password" env:"PASSWORD" description:"Synology password" required:"true"`
	URL      string `long:"url" env:"URL" description:"Synology URL" default:"http://localhost:5000"`
}

func (SynoClient) Client

func (sc SynoClient) Client() *client.Client

Jump to

Keyboard shortcuts

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