generator

package
v0.0.0-...-50fba6d Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DependencyMap = map[string][]string{

	"database:postgres": {
		"github.com/jackc/pgx/v5",
		"github.com/jackc/pgx/v5/pgxpool",
	},
	"database:mysql": {
		"github.com/go-sql-driver/mysql",
	},
	"database:sqlite": {
		"modernc.org/sqlite",
	},
	"database:mongodb": {
		"go.mongodb.org/mongo-driver/mongo",
		"go.mongodb.org/mongo-driver/bson",
	},
	"database:arangodb": {
		"github.com/arangodb/go-driver/v2/arangodb",
		"github.com/arangodb/go-driver/v2/connection",
	},

	"cache:redis": {
		"github.com/redis/go-redis/v9",
	},
	"cache:valkey": {
		"github.com/redis/go-redis/v9",
	},

	"config:yaml": {
		"gopkg.in/yaml.v3",
	},
	"config:vault": {
		"github.com/hashicorp/vault/api",
	},

	"observability:otlp": {
		"go.opentelemetry.io/otel",
		"go.opentelemetry.io/otel/sdk/trace",
		"go.opentelemetry.io/otel/sdk/metric",
		"go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc",
		"go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc",
		"go.opentelemetry.io/otel/trace",
		"go.opentelemetry.io/otel/metric",
		"go.opentelemetry.io/otel/attribute",
		"go.opentelemetry.io/otel/propagation",
		"go.opentelemetry.io/otel/semconv/v1.24.0",
	},

	"auth:jwt": {
		"github.com/golang-jwt/jwt/v5",
	},
	"auth:rbac": {
		"github.com/casbin/casbin/v2",
	},
	"auth:crypto": {
		"golang.org/x/crypto",
	},
	"auth:mfa": {
		"github.com/pquerna/otp",
		"github.com/pquerna/otp/totp",
	},

	"oauth:google": {
		"golang.org/x/oauth2",
		"golang.org/x/oauth2/google",
	},
	"oauth:microsoft": {
		"golang.org/x/oauth2",
	},
	"oauth:apple": {
		"github.com/Timothylock/go-signin-with-apple/apple",
	},

	"email:ses": {
		"github.com/aws/aws-sdk-go-v2/service/ses",
		"github.com/aws/aws-sdk-go-v2/config",
	},

	"common": {
		"go.uber.org/zap",
		"github.com/google/uuid",
	},
}

DependencyMap maps feature selections to their required Go dependencies

Functions

func GetDependencies

func GetDependencies(features []string) []string

GetDependencies returns all dependencies for the given features

Types

type Generator

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

Generator orchestrates the project generation

func NewGenerator

func NewGenerator(cfg *config.ProjectConfig) *Generator

NewGenerator creates a new generator

func (*Generator) Generate

func (g *Generator) Generate(ctx context.Context) error

Generate generates the project

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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