migration

package
v0.0.0-...-befd70e Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EstimateWorkloadCosts

func EstimateWorkloadCosts(mainTfContent string, currentCosts float64, bedrockClient *bedrock.BedrockClient) (string, string, error)

EstimateWorkloadCosts estimates the costs of running the workload and provides a comparison report

func NewGitHubClient

func NewGitHubClient(token string) *github.Client

NewGitHubClient creates a new GitHub client with optional authentication

func WriteAssets

func WriteAssets(outputDir string, assets *Assets, writePrompts bool) error

WriteAssets writes the generated assets to the output directory

Types

type Assets

type Assets struct {
	ReadmeMarkdown               string
	GeneratedTerraformFiles      []GeneratedTerraform
	Dockerfiles                  []Dockerfile
	CostEstimationReportMarkdown string
}

Assets represents the generated assets for migration

func GenerateCleverCloudMigrationAssets

func GenerateCleverCloudMigrationAssets(authToken, awsKey, awsSecret, qoveryAPIKey, githubToken, destination string, bedrockClientConfig bedrock.ClientConfig, progressChan chan<- ProgressUpdate) (*Assets, error)

func GenerateHerokuMigrationAssets

func GenerateHerokuMigrationAssets(herokuAPIKey, awsKey, awsSecret, qoveryAPIKey, githubToken, destination string, bedrockClientConfig bedrock.ClientConfig, progressChan chan<- ProgressUpdate) (*Assets, error)

func GenerateMigrationAssets

func GenerateMigrationAssets(configs []sources.AppConfig, awsKey, awsSecret, qoveryAPIKey, githubToken, destination string, bedrockClientConfig bedrock.ClientConfig, progressChan chan<- ProgressUpdate) (*Assets, error)

GenerateMigrationAssets generates all necessary assets for migration and reports progress

type Dockerfile

type Dockerfile struct {
	AppName           string
	DockerfileContent string
}

Dockerfile represents a generated Dockerfile for an app

type GeneratedTerraform

type GeneratedTerraform struct {
	AppName     string
	MainTf      string
	VariablesTf string
	Prompt      string
}

func (GeneratedTerraform) SanitizeAppName

func (g GeneratedTerraform) SanitizeAppName() string

type ProgressUpdate

type ProgressUpdate struct {
	Stage    string
	Progress float64
}

ProgressUpdate represents a progress update

Jump to

Keyboard shortcuts

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