cmd

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2026 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Execute

func Execute(args []string) (err error)

func VersionString

func VersionString() string

Types

type AuthCmd

type AuthCmd struct {
	Login          AuthLoginCmd          `cmd:"" help:"Login via OAuth 2.0 authorization code flow"`
	SetCredentials AuthSetCredentialsCmd `cmd:"" help:"Set integration key and secret key"`
	Status         AuthStatusCmd         `cmd:"" help:"Show authentication status"`
	Remove         AuthRemoveCmd         `cmd:"" help:"Remove all stored credentials and tokens"`
}

type AuthLoginCmd

type AuthLoginCmd struct{}

func (*AuthLoginCmd) Run

func (cmd *AuthLoginCmd) Run(ctx context.Context) error

type AuthRemoveCmd

type AuthRemoveCmd struct{}

func (*AuthRemoveCmd) Run

func (cmd *AuthRemoveCmd) Run(ctx context.Context) error

type AuthSetCredentialsCmd

type AuthSetCredentialsCmd struct{}

func (*AuthSetCredentialsCmd) Run

type AuthStatusCmd

type AuthStatusCmd struct{}

func (*AuthStatusCmd) Run

func (cmd *AuthStatusCmd) Run(ctx context.Context) error

type CLI

type CLI struct {
	RootFlags `embed:""`

	Version    kong.VersionFlag `help:"Print version and exit"`
	Auth       AuthCmd          `cmd:"" help:"Auth and credentials"`
	Envelopes  EnvelopesCmd     `cmd:"" help:"Envelope operations"`
	Documents  DocumentsCmd     `cmd:"" help:"Document operations"`
	Recipients RecipientsCmd    `cmd:"" help:"Recipient operations"`
	Templates  TemplatesCmd     `cmd:"" help:"Template operations"`
	Views      ViewsCmd         `cmd:"" help:"View operations"`
	VersionCmd VersionCmd       `cmd:"" name:"version" help:"Print version"`
}

type DocumentsCmd

type DocumentsCmd struct {
	List     DocumentsListCmd     `cmd:"" help:"List documents in an envelope"`
	Download DocumentsDownloadCmd `cmd:"" help:"Download a document as PDF"`
}

type DocumentsDownloadCmd

type DocumentsDownloadCmd struct {
	EnvelopeID string `arg:"" required:"" help:"Envelope ID"`
	DocumentID string `arg:"" required:"" help:"Document ID"`
	Output     string `help:"Output file path (default: stdout)" name:"output"`
}

func (*DocumentsDownloadCmd) Run

func (cmd *DocumentsDownloadCmd) Run(ctx context.Context) error

type DocumentsListCmd

type DocumentsListCmd struct {
	EnvelopeID string `arg:"" required:"" help:"Envelope ID"`
}

func (*DocumentsListCmd) Run

func (cmd *DocumentsListCmd) Run(ctx context.Context) error

type EnvelopesAuditCmd

type EnvelopesAuditCmd struct {
	ID string `arg:"" required:"" help:"Envelope ID"`
}

func (*EnvelopesAuditCmd) Run

func (cmd *EnvelopesAuditCmd) Run(ctx context.Context) error

type EnvelopesCmd

type EnvelopesCmd struct {
	List   EnvelopesListCmd   `cmd:"" help:"List envelopes"`
	Get    EnvelopesGetCmd    `cmd:"" help:"Get envelope details"`
	Create EnvelopesCreateCmd `cmd:"" help:"Create a new envelope"`
	Send   EnvelopesSendCmd   `cmd:"" help:"Send a draft envelope"`
	Void   EnvelopesVoidCmd   `cmd:"" help:"Void an envelope"`
	Audit  EnvelopesAuditCmd  `cmd:"" help:"Get envelope audit trail"`
}

type EnvelopesCreateCmd

type EnvelopesCreateCmd struct {
	Subject     string `required:"" help:"Email subject for the envelope"`
	SignerEmail string `required:"" help:"Signer's email address" name:"signer-email"`
	SignerName  string `required:"" help:"Signer's name" name:"signer-name"`
	Document    string `required:"" help:"Path to document file"`
	Status      string `help:"Envelope status: sent or created (draft)" default:"sent"`
}

func (*EnvelopesCreateCmd) Run

func (cmd *EnvelopesCreateCmd) Run(ctx context.Context) error

type EnvelopesGetCmd

type EnvelopesGetCmd struct {
	ID string `arg:"" required:"" help:"Envelope ID"`
}

func (*EnvelopesGetCmd) Run

func (cmd *EnvelopesGetCmd) Run(ctx context.Context) error

type EnvelopesListCmd

type EnvelopesListCmd struct {
	From   string `help:"From date (ISO 8601, e.g. 2024-01-01)" name:"from"`
	Status string `help:"Filter by status (e.g. sent, completed, voided)"`
	Count  int    `help:"Number of results to return" default:"10"`
}

func (*EnvelopesListCmd) Run

func (cmd *EnvelopesListCmd) Run(ctx context.Context) error

type EnvelopesSendCmd

type EnvelopesSendCmd struct {
	ID string `arg:"" required:"" help:"Envelope ID"`
}

func (*EnvelopesSendCmd) Run

func (cmd *EnvelopesSendCmd) Run(ctx context.Context) error

type EnvelopesVoidCmd

type EnvelopesVoidCmd struct {
	ID     string `arg:"" required:"" help:"Envelope ID"`
	Reason string `required:"" help:"Reason for voiding"`
}

func (*EnvelopesVoidCmd) Run

func (cmd *EnvelopesVoidCmd) Run(ctx context.Context) error

type ExitError

type ExitError struct {
	Code int
	Err  error
}

ExitError wraps an error with an exit code.

func (*ExitError) Error

func (e *ExitError) Error() string

func (*ExitError) Unwrap

func (e *ExitError) Unwrap() error

type RecipientsCmd

type RecipientsCmd struct {
	List RecipientsListCmd `cmd:"" help:"List recipients of an envelope"`
}

type RecipientsListCmd

type RecipientsListCmd struct {
	EnvelopeID string `arg:"" required:"" help:"Envelope ID"`
}

func (*RecipientsListCmd) Run

func (cmd *RecipientsListCmd) Run(ctx context.Context) error

type RootFlags

type RootFlags struct {
	Color   string `help:"Color output: auto|always|never" default:"${color}"`
	JSON    bool   `help:"Output JSON to stdout (best for scripting)" default:"${json}"`
	Plain   bool   `help:"Output stable, parseable text to stdout (TSV; no colors)" default:"${plain}"`
	Force   bool   `help:"Skip confirmations for destructive commands"`
	NoInput bool   `help:"Never prompt; fail instead (useful for CI)"`
	Verbose bool   `help:"Enable verbose logging"`
}

type TemplatesCmd

type TemplatesCmd struct {
	List TemplatesListCmd `cmd:"" help:"List templates"`
	Get  TemplatesGetCmd  `cmd:"" help:"Get template details"`
}

type TemplatesGetCmd

type TemplatesGetCmd struct {
	ID string `arg:"" required:"" help:"Template ID"`
}

func (*TemplatesGetCmd) Run

func (cmd *TemplatesGetCmd) Run(ctx context.Context) error

type TemplatesListCmd

type TemplatesListCmd struct {
	Search string `help:"Search text to filter templates"`
	Count  int    `help:"Number of results to return" default:"10"`
}

func (*TemplatesListCmd) Run

func (cmd *TemplatesListCmd) Run(ctx context.Context) error

type VersionCmd

type VersionCmd struct{}

func (*VersionCmd) Run

func (cmd *VersionCmd) Run(ctx context.Context) error

type ViewsCmd

type ViewsCmd struct {
	Signing ViewsSigningCmd `cmd:"" help:"Create an embedded signing URL"`
}

type ViewsSigningCmd

type ViewsSigningCmd struct {
	EnvelopeID   string `arg:"" required:"" help:"Envelope ID"`
	SignerEmail  string `required:"" help:"Signer's email address" name:"signer-email"`
	SignerName   string `required:"" help:"Signer's name" name:"signer-name"`
	ReturnURL    string `required:"" help:"Return URL after signing" name:"return-url"`
	ClientUserID string `help:"Client user ID for embedded signing" name:"client-user-id"`
}

func (*ViewsSigningCmd) Run

func (cmd *ViewsSigningCmd) Run(ctx context.Context) error

Jump to

Keyboard shortcuts

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