Documentation
¶
Index ¶
- func Execute(args []string) (err error)
- func VersionString() string
- type AuthCmd
- type AuthLoginCmd
- type AuthRemoveCmd
- type AuthSetCredentialsCmd
- type AuthSetRealmCmd
- type AuthStatusCmd
- type BillsCmd
- type BillsGetCmd
- type BillsListCmd
- type CLI
- type CustomersCmd
- type CustomersCreateCmd
- type CustomersGetCmd
- type CustomersListCmd
- type ExitError
- type InvoicesCmd
- type InvoicesCreateCmd
- type InvoicesGetCmd
- type InvoicesListCmd
- type InvoicesSendCmd
- type InvoicesVoidCmd
- type ItemsCmd
- type ItemsListCmd
- type PaymentsCmd
- type PaymentsCreateCmd
- type PaymentsListCmd
- type ReportsBalanceSheetCmd
- type ReportsCmd
- type ReportsProfitAndLossCmd
- type RootFlags
- type VendorsCmd
- type VendorsListCmd
- type VersionCmd
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AuthCmd ¶
type AuthCmd struct {
Login AuthLoginCmd `cmd:"" help:"Authenticate via OAuth 2.0 flow"`
SetCredentials AuthSetCredentialsCmd `cmd:"" help:"Set OAuth client ID and secret"`
SetRealm AuthSetRealmCmd `cmd:"" help:"Set QuickBooks company/realm ID"`
Status AuthStatusCmd `cmd:"" help:"Show authentication status"`
Remove AuthRemoveCmd `cmd:"" help:"Remove all stored credentials"`
}
type AuthLoginCmd ¶
type AuthLoginCmd struct{}
AuthLoginCmd handles the OAuth 2.0 authorization code flow.
type AuthSetCredentialsCmd ¶
type AuthSetCredentialsCmd struct{}
AuthSetCredentialsCmd sets OAuth client ID and secret.
type AuthSetRealmCmd ¶
type AuthSetRealmCmd struct {
ID string `arg:"" required:"" help:"QuickBooks company/realm ID"`
}
AuthSetRealmCmd stores the realm/company ID.
type BillsCmd ¶
type BillsCmd struct {
List BillsListCmd `cmd:"" help:"List bills"`
Get BillsGetCmd `cmd:"" help:"Get bill by ID"`
}
type BillsGetCmd ¶
type BillsGetCmd struct {
ID string `arg:"" required:"" help:"Bill ID"`
}
type BillsListCmd ¶
type BillsListCmd struct {
Query string `help:"SQL-like query (e.g. SELECT * FROM Bill WHERE TotalAmt > '100')"`
}
type CLI ¶
type CLI struct {
RootFlags `embed:""`
Version kong.VersionFlag `help:"Print version and exit"`
Auth AuthCmd `cmd:"" help:"Auth and credentials"`
Invoices InvoicesCmd `cmd:"" help:"Invoice operations"`
Bills BillsCmd `cmd:"" help:"Bill operations"`
Payments PaymentsCmd `cmd:"" help:"Payment operations"`
Customers CustomersCmd `cmd:"" help:"Customer operations"`
Vendors VendorsCmd `cmd:"" help:"Vendor operations"`
Items ItemsCmd `cmd:"" help:"Item/service operations"`
Reports ReportsCmd `cmd:"" help:"Financial reports"`
VersionCmd VersionCmd `cmd:"" name:"version" help:"Print version"`
}
CLI defines the full command tree.
type CustomersCmd ¶
type CustomersCmd struct {
List CustomersListCmd `cmd:"" help:"List customers"`
Get CustomersGetCmd `cmd:"" help:"Get customer by ID"`
Create CustomersCreateCmd `cmd:"" help:"Create a customer"`
}
type CustomersCreateCmd ¶
type CustomersGetCmd ¶
type CustomersGetCmd struct {
ID string `arg:"" required:"" help:"Customer ID"`
}
type CustomersListCmd ¶
type CustomersListCmd struct{}
type InvoicesCmd ¶
type InvoicesCmd struct {
List InvoicesListCmd `cmd:"" help:"List invoices"`
Get InvoicesGetCmd `cmd:"" help:"Get invoice by ID"`
Create InvoicesCreateCmd `cmd:"" help:"Create a new invoice"`
Send InvoicesSendCmd `cmd:"" help:"Send invoice by email"`
Void InvoicesVoidCmd `cmd:"" help:"Void an invoice"`
}
type InvoicesCreateCmd ¶
type InvoicesGetCmd ¶
type InvoicesGetCmd struct {
ID string `arg:"" required:"" help:"Invoice ID"`
}
type InvoicesListCmd ¶
type InvoicesSendCmd ¶
type InvoicesVoidCmd ¶
type ItemsCmd ¶
type ItemsCmd struct {
List ItemsListCmd `cmd:"" help:"List items/services"`
}
type ItemsListCmd ¶
type ItemsListCmd struct{}
type PaymentsCmd ¶
type PaymentsCmd struct {
List PaymentsListCmd `cmd:"" help:"List payments"`
Create PaymentsCreateCmd `cmd:"" help:"Create a payment"`
}
type PaymentsCreateCmd ¶
type PaymentsListCmd ¶
type PaymentsListCmd struct {
Query string `help:"SQL-like query (e.g. SELECT * FROM Payment)"`
}
type ReportsBalanceSheetCmd ¶
type ReportsBalanceSheetCmd struct {
Date string `help:"Report date (YYYY-MM-DD)"`
}
type ReportsCmd ¶
type ReportsCmd struct {
ProfitAndLoss ReportsProfitAndLossCmd `cmd:"" name:"profit-and-loss" help:"Profit and Loss report"`
BalanceSheet ReportsBalanceSheetCmd `cmd:"" name:"balance-sheet" help:"Balance Sheet report"`
}
type ReportsProfitAndLossCmd ¶
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"`
}
RootFlags are global flags available on all commands.
type VendorsCmd ¶
type VendorsCmd struct {
List VendorsListCmd `cmd:"" help:"List vendors"`
}
type VendorsListCmd ¶
type VendorsListCmd struct{}
Click to show internal directories.
Click to hide internal directories.