deploy

package
v0.406.5 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2025 License: AGPL-3.0 Imports: 63 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UpAction     = "up"
	RemoveAction = "remove"
)
View Source
const (
	StackOutputApiURL               = "apiUrl"
	StackOutputDatabaseEndpoint     = "databaseEndpoint"
	StackOutputDatabaseDbName       = "databaseDbName"
	StackOutputDatabaseSecretArn    = "databaseSecretArn"
	StackOutputApiLambdaName        = "apiLambdaName"
	StackOutputSubscriberLambdaName = "subscriberLambdaName"
	StackOutputJobsLambdaName       = "jobsLambdaName"
	StackOutputFunctionsLambdaName  = "functionsLambdaName"
)

Variables

View Source
var (
	IconCross = colors.Red("✘").String()
	IconTick  = colors.Green("✔").String()
	IconPipe  = colors.Yellow("|").String()
	LogIndent = "  "
)

Functions

func DeleteSecret

func DeleteSecret(ctx context.Context, args *DeleteSecretArgs) error

func GetSecret

func GetSecret(ctx context.Context, args *GetSecretArgs) (*types.Parameter, error)

func ListSecrets

func ListSecrets(ctx context.Context, args *ListSecretsArgs) ([]types.Parameter, error)

func ResolveKeelConfig

func ResolveKeelConfig(args *ResolveKeelConfigArgs) (*config.ConfigFile, error)

func Run

func Run(ctx context.Context, args *RunArgs) error

func SetSecret

func SetSecret(ctx context.Context, args *SetSecretArgs) error

func StreamLogs

func StreamLogs(ctx context.Context, args *StreamLogsArgs) error

TODO: refactor this function to use an error channel

Types

type AwsIdentityResult

type AwsIdentityResult struct {
	AccountID string
	UserID    string
}

type BuildArgs

type BuildArgs struct {
	// Absolute path to Keel project
	ProjectRoot string
	Env         string
	// Where to pull the pre-built runtime binary from. Can be an absolute local path or a URL.
	RuntimeBinary string
	// A hook for modifying the schema after it's been loaded and validated. Our main use-case
	// for this is in integration tests where we make an API containing all models/actions.
	OnLoadSchema func(s *proto.Schema) *proto.Schema
}

type BuildCollectorConfigArgs

type BuildCollectorConfigArgs struct {
	ProjectRoot string
	Env         string
	Config      *config.ProjectConfig
}

type BuildFunctionsArgs

type BuildFunctionsArgs struct {
	// Absolute path to Keel project being built
	ProjectRoot string
	Schema      *proto.Schema
	Config      *config.ProjectConfig
	// YAML string containing an OTEL collector config
	CollectorConfig *string
}

type BuildFunctionsResult

type BuildFunctionsResult struct {
	// Path to directory containing build for functions Lambda
	Path string
}

type BuildResult

type BuildResult struct {
	Schema *proto.Schema
	Config *config.ProjectConfig
	// Path to the directory containing the files needed for the runtime Lambda
	RuntimePath string
	// Path to the directory containing the files needed for the functions Lambda
	FunctionsPath string
}

func Build

func Build(ctx context.Context, args *BuildArgs) (*BuildResult, error)

type BuildRuntimeArgs

type BuildRuntimeArgs struct {
	// Absolute path of Keel project being built
	ProjectRoot string
	Env         string
	Schema      *proto.Schema
	Config      *config.ProjectConfig
	// Where to pull the pre-built runtime binary from. Can be a local path or URL.
	RuntimeBinaryURL string
	// A YAML string containing an OTEL collector config.
	CollectorConfig *string
}

type BuildRuntimeResult

type BuildRuntimeResult struct {
	SchemaPath string
	ConfigPath string
	Path       string
}

type CreatePrivateKeySecretArgs

type CreatePrivateKeySecretArgs struct {
	AwsConfig   aws.Config
	ProjectName string
	Env         string
}

type CreateRDSResourcesArgs

type CreateRDSResourcesArgs struct {
	Config   *config.ProjectConfig
	Env      string
	BaseTags pulumi.StringMap
}

type CreateRDSResourcesResult

type CreateRDSResourcesResult struct {
	Instance  *rds.Instance
	SecretARN pulumi.StringPtrOutput
}

type DeleteSecretArgs

type DeleteSecretArgs struct {
	ProjectRoot string
	Env         string
	Key         string
}

type GetSecretArgs

type GetSecretArgs struct {
	ProjectRoot string
	Env         string
	Key         string
}

type GetStackOutputsArgs

type GetStackOutputsArgs struct {
	Config       *config.ProjectConfig
	PulumiConfig *PulumiConfig
}

type ListSecretsArgs

type ListSecretsArgs struct {
	ProjectRoot string
	Env         string
	Silent      bool
}

type NewProgramArgs

type NewProgramArgs struct {
	AwsConfig    aws.Config
	AwsAccountID string
	// Absolute path to built runtime lambda files
	RuntimeLambdaPath string
	// Absolute path to built functions lambda files
	FunctionsLambdaPath string
	Env                 string
	Config              *config.ProjectConfig
	Schema              *proto.Schema
}

type PulumiConfig

type PulumiConfig struct {
	StackName        string
	WorkspaceOptions []auto.LocalWorkspaceOption
}

type ResolveKeelConfigArgs

type ResolveKeelConfigArgs struct {
	ProjectRoot string
	Env         string
	Silent      bool
}

type RunArgs

type RunArgs struct {
	Action        string
	ProjectRoot   string
	Env           string
	RuntimeBinary string
}

type RunMigrationsArgs

type RunMigrationsArgs struct {
	AwsConfig aws.Config
	Stack     *auto.Stack
	Env       string
	Schema    *proto.Schema
	Config    *config.ProjectConfig
	DryRun    bool
}

type SecretSetupArgs

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

type SecretSetupResult

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

type SelectStackArgs

type SelectStackArgs struct {
	AwsConfig           aws.Config
	PulumiConfig        *PulumiConfig
	Env                 string
	Schema              *proto.Schema
	Config              *config.ProjectConfig
	AccountID           string
	RuntimeLambdaPath   string
	FunctionsLambdaPath string
}

type SetSecretArgs

type SetSecretArgs struct {
	ProjectRoot string
	Env         string
	Key         string
	Value       string
}

type SetupPulumiArgs

type SetupPulumiArgs struct {
	AwsConfig aws.Config
	Config    *config.ProjectConfig
	Env       string
}

type StackOutputs

type StackOutputs struct {
	ApiURL               string
	DatabaseEndpoint     string
	DatabaseDbName       string
	DatabaseSecretArn    string
	ApiLambdaName        string
	SubscriberLambdaName string
	JobsLambdaName       string
	FunctionsLambdaName  string
}

type StreamLogsArgs

type StreamLogsArgs struct {
	ProjectRoot string
	Env         string
	StartTime   time.Time
}

type Timing

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

func NewTiming

func NewTiming() *Timing

func (*Timing) Since

func (t *Timing) Since() string

Since returns a gray string containing the duration since it was last called or the Timing struct was created

Directories

Path Synopsis
lambdas

Jump to

Keyboard shortcuts

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