cli

package
v1.0.73 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2025 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AttributeSpec added in v1.0.37

type AttributeSpec struct {
	Name     string `json:"name"`
	Type     string `json:"type"`
	Required bool   `json:"required"`
}

AttributeSpec defines an attribute specification

type BenchmarkCommand

type BenchmarkCommand struct{}

BenchmarkCommand runs performance benchmarks

func (*BenchmarkCommand) Description

func (c *BenchmarkCommand) Description() string

func (*BenchmarkCommand) Execute

func (c *BenchmarkCommand) Execute(_ context.Context, args []string) error

func (*BenchmarkCommand) Name

func (c *BenchmarkCommand) Name() string

func (*BenchmarkCommand) Usage

func (c *BenchmarkCommand) Usage() string

type BenchmarkConfig added in v1.0.37

type BenchmarkConfig struct {
	TableName   string
	OutputDir   string
	Region      string
	Operations  []string
	Concurrency int
	Duration    time.Duration
	ItemSize    int
	Warmup      time.Duration
}

BenchmarkConfig holds benchmarking configuration

type BenchmarkEnvironment added in v1.0.37

type BenchmarkEnvironment struct {
	Region           string `json:"region"`
	Runtime          string `json:"runtime"`
	Architecture     string `json:"architecture"`
	MemorySize       string `json:"memory_size"`
	TableBillingMode string `json:"table_billing_mode"`
	TimestampUTC     string `json:"timestamp_utc"`
}

BenchmarkEnvironment captures environment information

type BenchmarkResults added in v1.0.37

type BenchmarkResults struct {
	StartTime        time.Time                   `json:"start_time"`
	EndTime          time.Time                   `json:"end_time"`
	OperationResults map[string]*OperationResult `json:"operation_results"`
	Environment      BenchmarkEnvironment        `json:"environment"`
	TableName        string                      `json:"table_name"`
	Duration         time.Duration               `json:"duration"`
	Concurrency      int                         `json:"concurrency"`
	ColdStartTime    time.Duration               `json:"cold_start_time"`
	WarmupTime       time.Duration               `json:"warmup_time"`
}

BenchmarkResults holds benchmark results

type BuildCommand added in v1.0.37

type BuildCommand struct{}

BuildCommand builds the Lambda function

func (*BuildCommand) Description added in v1.0.37

func (c *BuildCommand) Description() string

func (*BuildCommand) Execute added in v1.0.37

func (c *BuildCommand) Execute(ctx context.Context, args []string) error

func (*BuildCommand) Name added in v1.0.37

func (c *BuildCommand) Name() string

func (*BuildCommand) Usage added in v1.0.37

func (c *BuildCommand) Usage() string

type CDKDeployCommand added in v1.0.37

type CDKDeployCommand struct{}

CDKDeployCommand deploys the CDK stack

func (*CDKDeployCommand) Description added in v1.0.37

func (c *CDKDeployCommand) Description() string

func (*CDKDeployCommand) Execute added in v1.0.37

func (c *CDKDeployCommand) Execute(ctx context.Context, args []string) error

func (*CDKDeployCommand) Name added in v1.0.37

func (c *CDKDeployCommand) Name() string

func (*CDKDeployCommand) Usage added in v1.0.37

func (c *CDKDeployCommand) Usage() string

type CDKDestroyCommand added in v1.0.37

type CDKDestroyCommand struct{}

CDKDestroyCommand destroys the CDK stack

func (*CDKDestroyCommand) Description added in v1.0.37

func (c *CDKDestroyCommand) Description() string

func (*CDKDestroyCommand) Execute added in v1.0.37

func (c *CDKDestroyCommand) Execute(ctx context.Context, args []string) error

func (*CDKDestroyCommand) Name added in v1.0.37

func (c *CDKDestroyCommand) Name() string

func (*CDKDestroyCommand) Usage added in v1.0.37

func (c *CDKDestroyCommand) Usage() string

type CDKDiffCommand added in v1.0.37

type CDKDiffCommand struct{}

CDKDiffCommand shows differences between deployed stack and local code

func (*CDKDiffCommand) Description added in v1.0.37

func (c *CDKDiffCommand) Description() string

func (*CDKDiffCommand) Execute added in v1.0.37

func (c *CDKDiffCommand) Execute(ctx context.Context, args []string) error

func (*CDKDiffCommand) Name added in v1.0.37

func (c *CDKDiffCommand) Name() string

func (*CDKDiffCommand) Usage added in v1.0.37

func (c *CDKDiffCommand) Usage() string

type CDKInitCommand added in v1.0.37

type CDKInitCommand struct{}

CDKInitCommand creates a new CDK app for a Lift project

func (*CDKInitCommand) Description added in v1.0.37

func (c *CDKInitCommand) Description() string

func (*CDKInitCommand) Execute added in v1.0.37

func (c *CDKInitCommand) Execute(_ context.Context, args []string) error

func (*CDKInitCommand) Name added in v1.0.37

func (c *CDKInitCommand) Name() string

func (*CDKInitCommand) Usage added in v1.0.37

func (c *CDKInitCommand) Usage() string

type CDKSynthCommand added in v1.0.37

type CDKSynthCommand struct{}

CDKSynthCommand synthesizes the CDK stack

func (*CDKSynthCommand) Description added in v1.0.37

func (c *CDKSynthCommand) Description() string

func (*CDKSynthCommand) Execute added in v1.0.37

func (c *CDKSynthCommand) Execute(ctx context.Context, args []string) error

func (*CDKSynthCommand) Name added in v1.0.37

func (c *CDKSynthCommand) Name() string

func (*CDKSynthCommand) Usage added in v1.0.37

func (c *CDKSynthCommand) Usage() string

type CLI

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

CLI represents the main CLI application

func NewCLI

func NewCLI(version string) *CLI

NewCLI creates a new CLI instance

func (*CLI) Execute

func (c *CLI) Execute(ctx context.Context, args []string) error

Execute runs the CLI with the given arguments

func (*CLI) ListCommands

func (c *CLI) ListCommands() map[string]Command

ListCommands returns all available commands

func (*CLI) RegisterCommand

func (c *CLI) RegisterCommand(cmd Command)

RegisterCommand registers a new command

type Command

type Command interface {
	Name() string
	Description() string
	Usage() string
	Execute(ctx context.Context, args []string) error
}

Command represents a CLI command

type DeployCommand

type DeployCommand struct{}

DeployCommand deploys the application

func (*DeployCommand) Description

func (c *DeployCommand) Description() string

func (*DeployCommand) Execute

func (c *DeployCommand) Execute(_ context.Context, args []string) error

func (*DeployCommand) Name

func (c *DeployCommand) Name() string

func (*DeployCommand) Usage

func (c *DeployCommand) Usage() string

type DevCommand

type DevCommand struct{}

DevCommand starts the development server

func (*DevCommand) Description

func (c *DevCommand) Description() string

func (*DevCommand) Execute

func (c *DevCommand) Execute(ctx context.Context, args []string) error

func (*DevCommand) Name

func (c *DevCommand) Name() string

func (*DevCommand) Usage

func (c *DevCommand) Usage() string

type DynamORMBenchmarkCommand added in v1.0.37

type DynamORMBenchmarkCommand struct{}

DynamORMBenchmarkCommand handles performance benchmarking for DynamORM operations

func (*DynamORMBenchmarkCommand) Description added in v1.0.37

func (c *DynamORMBenchmarkCommand) Description() string

func (*DynamORMBenchmarkCommand) Execute added in v1.0.37

func (c *DynamORMBenchmarkCommand) Execute(_ context.Context, args []string) error

func (*DynamORMBenchmarkCommand) Name added in v1.0.37

func (c *DynamORMBenchmarkCommand) Name() string

func (*DynamORMBenchmarkCommand) Usage added in v1.0.37

func (c *DynamORMBenchmarkCommand) Usage() string

type DynamORMMigrateCommand added in v1.0.37

type DynamORMMigrateCommand struct{}

DynamORMMigrateCommand handles migration from existing DynamoDB tables to DynamORM

func (*DynamORMMigrateCommand) Description added in v1.0.37

func (c *DynamORMMigrateCommand) Description() string

func (*DynamORMMigrateCommand) Execute added in v1.0.37

func (c *DynamORMMigrateCommand) Execute(ctx context.Context, args []string) error

func (*DynamORMMigrateCommand) Name added in v1.0.37

func (c *DynamORMMigrateCommand) Name() string

DynamORMMigrateCommand methods

func (*DynamORMMigrateCommand) Usage added in v1.0.37

func (c *DynamORMMigrateCommand) Usage() string

type DynamORMScaffoldCommand added in v1.0.37

type DynamORMScaffoldCommand struct{}

DynamORMScaffoldCommand scaffolds DynamORM models, CDK constructs, and examples

func (*DynamORMScaffoldCommand) Description added in v1.0.37

func (c *DynamORMScaffoldCommand) Description() string

func (*DynamORMScaffoldCommand) Execute added in v1.0.37

func (c *DynamORMScaffoldCommand) Execute(_ context.Context, args []string) error

func (*DynamORMScaffoldCommand) Name added in v1.0.37

func (c *DynamORMScaffoldCommand) Name() string

func (*DynamORMScaffoldCommand) Usage added in v1.0.37

func (c *DynamORMScaffoldCommand) Usage() string

type GSIAnalysis added in v1.0.37

type GSIAnalysis struct {
	SortKey        *AttributeSpec           `json:"sort_key,omitempty"`
	IndexName      string                   `json:"index_name"`
	ProjectionType string                   `json:"projection_type"`
	PartitionKey   AttributeSpec            `json:"partition_key"`
	KeySchema      []types.KeySchemaElement `json:"key_schema"`
	ItemCount      int64                    `json:"item_count"`
}

GSIAnalysis contains GSI analysis

type GSIConfig added in v1.0.37

type GSIConfig struct {
	IndexName    string
	PartitionKey string
	SortKey      string
}

GSIConfig holds GSI configuration

type HealthCommand

type HealthCommand struct{}

HealthCommand checks function health

func (*HealthCommand) Description

func (c *HealthCommand) Description() string

func (*HealthCommand) Execute

func (c *HealthCommand) Execute(_ context.Context, args []string) error

func (*HealthCommand) Name

func (c *HealthCommand) Name() string

func (*HealthCommand) Usage

func (c *HealthCommand) Usage() string

type HelpCommand

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

HelpCommand displays help information

func (*HelpCommand) Description

func (c *HelpCommand) Description() string

func (*HelpCommand) Execute

func (c *HelpCommand) Execute(_ context.Context, args []string) error

func (*HelpCommand) Name

func (c *HelpCommand) Name() string

func (*HelpCommand) Usage

func (c *HelpCommand) Usage() string

type LSIAnalysis added in v1.0.37

type LSIAnalysis struct {
	IndexName      string        `json:"index_name"`
	ProjectionType string        `json:"projection_type"`
	SortKey        AttributeSpec `json:"sort_key"`
	ItemCount      int64         `json:"item_count"`
}

LSIAnalysis contains LSI analysis

type LogsCommand

type LogsCommand struct{}

LogsCommand streams function logs

func (*LogsCommand) Description

func (c *LogsCommand) Description() string

func (*LogsCommand) Execute

func (c *LogsCommand) Execute(ctx context.Context, args []string) error

func (*LogsCommand) Name

func (c *LogsCommand) Name() string

func (*LogsCommand) Usage

func (c *LogsCommand) Usage() string

type MetricsCommand

type MetricsCommand struct{}

MetricsCommand displays function metrics

func (*MetricsCommand) Description

func (c *MetricsCommand) Description() string

func (*MetricsCommand) Execute

func (c *MetricsCommand) Execute(_ context.Context, args []string) error

func (*MetricsCommand) Name

func (c *MetricsCommand) Name() string

func (*MetricsCommand) Usage

func (c *MetricsCommand) Usage() string

type MigrationConfig added in v1.0.37

type MigrationConfig struct {
	TableName     string `json:"table_name"`
	Region        string `json:"region"`
	OutputDir     string `json:"output_dir"`
	ModelName     string `json:"model_name"`
	AnalyzeOnly   bool   `json:"analyze_only"`
	MultiTenant   bool   `json:"multi_tenant"`
	GenerateTests bool   `json:"generate_tests"`
}

MigrationConfig holds migration configuration

type NewCommand

type NewCommand struct{}

NewCommand creates a new Lift project

func (*NewCommand) Description

func (c *NewCommand) Description() string

func (*NewCommand) Execute

func (c *NewCommand) Execute(_ context.Context, args []string) error

func (*NewCommand) Name

func (c *NewCommand) Name() string

func (*NewCommand) Usage

func (c *NewCommand) Usage() string

type OperationResult added in v1.0.37

type OperationResult struct {
	Operation       string          `json:"operation"`
	Latencies       []time.Duration `json:"-"`
	TotalRequests   int64           `json:"total_requests"`
	SuccessRequests int64           `json:"success_requests"`
	FailedRequests  int64           `json:"failed_requests"`
	AvgLatency      time.Duration   `json:"avg_latency"`
	MinLatency      time.Duration   `json:"min_latency"`
	MaxLatency      time.Duration   `json:"max_latency"`
	P95Latency      time.Duration   `json:"p95_latency"`
	P99Latency      time.Duration   `json:"p99_latency"`
	Throughput      float64         `json:"throughput"`
	ErrorRate       float64         `json:"error_rate"`
}

OperationResult holds results for a specific operation

type ScaffoldConfig added in v1.0.37

type ScaffoldConfig struct {
	ModelName     string
	TableName     string
	GSIs          []GSIConfig
	MultiTenant   bool
	EnableTTL     bool
	EnableStreams bool
}

ScaffoldConfig holds the configuration for scaffolding

type StreamSpec added in v1.0.37

type StreamSpec struct {
	ViewType  string `json:"view_type"`
	StreamArn string `json:"stream_arn"`
	Enabled   bool   `json:"enabled"`
}

StreamSpec defines stream specification

type TTLSpec added in v1.0.37

type TTLSpec struct {
	AttributeName string `json:"attribute_name"`
	Enabled       bool   `json:"enabled"`
}

TTLSpec defines TTL specification

type TableAnalysis added in v1.0.37

type TableAnalysis struct {
	CreatedAt              time.Time                `json:"created_at"`
	SortKey                *AttributeSpec           `json:"sort_key,omitempty"`
	TimeToLiveSpec         *TTLSpec                 `json:"time_to_live,omitempty"`
	StreamSpec             *StreamSpec              `json:"stream,omitempty"`
	Attributes             map[string]AttributeSpec `json:"attributes"`
	RecommendedModel       string                   `json:"recommended_model"`
	TableName              string                   `json:"table_name"`
	BillingMode            string                   `json:"billing_mode"`
	MigrationComplexity    string                   `json:"migration_complexity"`
	PartitionKey           AttributeSpec            `json:"partition_key"`
	LocalSecondaryIndexes  []LSIAnalysis            `json:"local_secondary_indexes,omitempty"`
	SampleItems            []map[string]interface{} `json:"sample_items,omitempty"`
	Warnings               []string                 `json:"warnings,omitempty"`
	GlobalSecondaryIndexes []GSIAnalysis            `json:"global_secondary_indexes,omitempty"`
	TableSizeBytes         int64                    `json:"table_size_bytes"`
	ItemCount              int64                    `json:"item_count"`
	MultiTenantCandidate   bool                     `json:"multi_tenant_candidate"`
}

TableAnalysis contains the analysis results of a DynamoDB table

type TestCommand

type TestCommand struct{}

TestCommand runs tests

func (*TestCommand) Description

func (c *TestCommand) Description() string

func (*TestCommand) Execute

func (c *TestCommand) Execute(_ context.Context, args []string) error

func (*TestCommand) Name

func (c *TestCommand) Name() string

func (*TestCommand) Usage

func (c *TestCommand) Usage() string

type VersionCommand

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

VersionCommand displays version information

func (*VersionCommand) Description

func (c *VersionCommand) Description() string

func (*VersionCommand) Execute

func (c *VersionCommand) Execute(_ context.Context, _ []string) error

func (*VersionCommand) Name

func (c *VersionCommand) Name() string

func (*VersionCommand) Usage

func (c *VersionCommand) Usage() string

Jump to

Keyboard shortcuts

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