cmd

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: May 8, 2026 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var EmbeddedSpec []byte

EmbeddedSpec is preserved for backwards-compatibility with callers that still set a single accounting spec. New code should populate EmbeddedSpecs instead.

View Source
var EmbeddedSpecs = map[string][]byte{}

EmbeddedSpecs holds the OpenAPI YAML bytes per API name, set by main before Execute(). Supported keys: "accounting", "invoice".

Functions

func Execute

func Execute()

Types

type BillingClient added in v0.2.0

type BillingClient interface {
	GetBillings(ctx context.Context, params api.BillingListParams) ([]byte, error)
	GetBilling(ctx context.Context, id string) ([]byte, error)
	CreateBilling(ctx context.Context, req *invoicemodel.CreateBillingRequest) ([]byte, error)
	UpdateBilling(ctx context.Context, id string, req *invoicemodel.UpdateBillingRequest) ([]byte, error)
	DeleteBilling(ctx context.Context, id string) error
}

BillingClient covers the invoice billings endpoints.

type DepartmentClient added in v0.2.0

type DepartmentClient interface {
	GetPartnerDepartments(ctx context.Context, partnerID string, params api.DepartmentListParams) ([]byte, error)
	GetPartnerDepartment(ctx context.Context, partnerID, departmentID string) ([]byte, error)
}

DepartmentClient covers the invoice departments endpoints.

type DryRunBuilder added in v0.2.0

type DryRunBuilder interface {
	BuildRequest(method, path string, query url.Values, body any) (*api.DryRunOutput, error)
}

DryRunBuilder is the minimal interface needed by handleDryRunTo. It matches *api.Client.BuildRequest so the production client satisfies it without an adapter; tests can supply a fake.

type InvoiceClient added in v0.2.0

type InvoiceClient interface {
	BillingClient
	PartnerClient
	DepartmentClient
	ItemClient
}

InvoiceClient is the aggregate interface returned by cmdDeps.newClient.

type ItemClient added in v0.2.0

type ItemClient interface {
	GetItems(ctx context.Context, params api.ItemListParams) ([]byte, error)
	GetItem(ctx context.Context, id string) ([]byte, error)
}

ItemClient covers the invoice items endpoints.

type PartnerClient added in v0.2.0

type PartnerClient interface {
	GetPartners(ctx context.Context, params api.PartnerListParams) ([]byte, error)
	GetPartner(ctx context.Context, id string) ([]byte, error)
}

PartnerClient covers the invoice partners endpoints.

Jump to

Keyboard shortcuts

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