cmd

package
v0.0.0-...-9a622ba Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2024 License: EUPL-1.2 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run() error

Types

type Context

type Context struct {
	Logger         slog.Logger
	PSQLSchemaName string
}

type InitCmd

type InitCmd struct {
	PostgresDSN string `env:"MK_POSTGRES_DSN" required:"" name:"postgres-dsn" help:"Postgres Connection URL."`
}

func (*InitCmd) Run

func (opt *InitCmd) Run(ctx *Context) error

type MigrateCmd

type MigrateCmd struct {
	Up   UpCmd   `cmd:"" help:"Migrate the API."`
	Init InitCmd `cmd:"" help:"Init the API."`
}

type ServeCmd

type ServeCmd struct {
	BackendListenAddress string `env:"MK_BACKEND_LISTEN_ADDRESS" default:":8080" name:"backend-listen-address" help:"Address to listen  on."`
	PostgresDSN          string `env:"MK_POSTGRES_DSN" required:"" name:"postgres-dsn" help:"Postgres Connection URL."`
}

func (*ServeCmd) Run

func (opt *ServeCmd) Run(ctx *Context) error

type UpCmd

type UpCmd struct {
	PostgresDSN string `env:"MK_POSTGRES_DSN" required:"" name:"postgres-dsn" help:"Postgres Connection URL."`
}

func (*UpCmd) Run

func (opt *UpCmd) Run(ctx *Context) error

Jump to

Keyboard shortcuts

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