common

package module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

README

magefile-common

Magefile Common Targets

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ClientDirs []string
View Source
var DirsToCleanUp []string
View Source
var DockerfileSettings []*DockerfileParams
View Source
var GobinPkgs []*GobinPkgParams
View Source
var LoadEnv = func() {}
View Source
var MainPackage string

Functions

func Air

func Air() error

Air launches the server process and keeps it live-reloading.

noinspection GoUnusedExportedFunction, GoUnnecessarilyExportedIdentifiers

func Bufgen

func Bufgen() error

Bufgen generates protocol buffer binding code.

noinspection GoUnusedExportedFunction, GoUnnecessarilyExportedIdentifiers

func Clean

func Clean()

Clean cleans up generated files.

noinspection GoUnusedExportedFunction, GoUnnecessarilyExportedIdentifiers

func Dev

func Dev()

Dev is an alias for 'air'.

noinspection GoUnusedExportedFunction, GoUnnecessarilyExportedIdentifiers

func Dockerfiles

func Dockerfiles() error

Dockerfiles generates dockerfiles from the template.

noinspection GoUnusedExportedFunction, GoUnnecessarilyExportedIdentifiers

func Exec

func Exec(command string) error

Exec (command string) executes the given command prioritizing binaries in .gobin/ directory.

noinspection GoUnusedExportedFunction, GoUnnecessarilyExportedIdentifiers

func Gen

func Gen() error

Gen generates binding codes.

noinspection GoUnusedExportedFunction, GoUnnecessarilyExportedIdentifiers

func Gobin

func Gobin(name string) error

Gobin installs the Go binary with the given command name or package name.

noinspection GoUnusedExportedFunction, GoUnnecessarilyExportedIdentifiers

func Gobins

func Gobins()

Gobins installs necessary Go binaries.

noinspection GoUnusedExportedFunction, GoUnnecessarilyExportedIdentifiers

func Lint

func Lint() error

Lint analyses.

noinspection GoUnusedExportedFunction, GoUnnecessarilyExportedIdentifiers

func Pbgen

func Pbgen()

Pbgen is an alias of 'bufgen'.

noinspection GoUnusedExportedFunction, GoUnnecessarilyExportedIdentifiers

func Psql

func Psql() error

Psql executes psql(1) command on the database defined in .env* file

noinspection GoUnusedExportedFunction, GoUnnecessarilyExportedIdentifiers

func Pwhash

func Pwhash(password string)

Pwhash (password string) prints the bcrypt hash of the specified argument.

noinspection GoUnusedExportedFunction, GoUnnecessarilyExportedIdentifiers

func RunWith

func RunWith(env map[string]string, cmd string, args ...string) error

RunWith runs the given command prioritizing binaries in .gobin/ directory. It is not a task function.

func Start

func Start()

Start is an alias for 'air'.

noinspection GoUnusedExportedFunction, GoUnnecessarilyExportedIdentifiers

Types

type AirInfoParams

type AirInfoParams struct {
	BuildPackage string
	TargetEnv    string
	ExcludeDirs  []string
}
var AirInfo *AirInfoParams

type Build

type Build mg.Namespace

noinspection GoUnusedExportedType, GoUnnecessarilyExportedIdentifiers

func (Build) Cross

func (Build) Cross(goarch string) error

Cross (goarch string) builds a binary for a specified architecture.

noinspection GoUnusedExportedFunction, GoUnnecessarilyExportedIdentifiers

func (Build) Native

func (Build) Native() error

Native builds the main binary for the current environment.

noinspection GoUnusedExportedFunction, GoUnnecessarilyExportedIdentifiers

type Client

type Client mg.Namespace

noinspection GoUnusedExportedType, GoUnnecessarilyExportedIdentifiers

func (Client) Build

func (Client) Build() error

Build builds web client application.

noinspection GoUnusedExportedFunction, GoUnnecessarilyExportedIdentifiers

type Db

type Db mg.Namespace

noinspection GoUnusedExportedType, GoUnnecessarilyExportedIdentifiers

func (Db) Converge

func (Db) Converge() error

Converge converges a PostgreSQL database.

noinspection GoUnusedExportedFunction, GoUnnecessarilyExportedIdentifiers

func (Db) Create

func (Db) Create() error

Create creates a new PostgreSQL database.

noinspection GoUnusedExportedFunction, GoUnnecessarilyExportedIdentifiers

func (Db) Down

func (Db) Down() error

Down rolls back the database version by 1.

noinspection GoUnusedExportedFunction, GoUnnecessarilyExportedIdentifiers

func (Db) Drop

func (Db) Drop() error

Drop drops a PostgreSQL database if exists.

noinspection GoUnusedExportedFunction, GoUnnecessarilyExportedIdentifiers

func (Db) Dump

func (Db) Dump() error

Dump dumps a database.

noinspection GoUnusedExportedFunction, GoUnnecessarilyExportedIdentifiers

func (Db) Fix

func (Db) Fix() error

Fix applies sequential ordering to migrations.

noinspection GoUnusedExportedFunction, GoUnnecessarilyExportedIdentifiers

func (Db) Migrate

func (db Db) Migrate() error

Migrate migrates the database to the most recent version available.

noinspection GoUnusedExportedFunction, GoUnnecessarilyExportedIdentifiers

func (Db) New

func (Db) New(name string) error

New (name string) creates a new migration file with the current timestamp.

noinspection GoUnusedExportedFunction, GoUnnecessarilyExportedIdentifiers

func (Db) Reset

func (Db) Reset() error

Reset rolls back all migrations.

noinspection GoUnusedExportedFunction, GoUnnecessarilyExportedIdentifiers

func (Db) Seed

func (Db) Seed() error

Seed inserts seed data into the database.

noinspection GoUnusedExportedFunction, GoUnnecessarilyExportedIdentifiers

func (Db) Up

func (Db) Up() error

Up migrates the database up by 1.

noinspection GoUnusedExportedFunction, GoUnnecessarilyExportedIdentifiers

type DockerfileParams

type DockerfileParams struct {
	Filename string
	Goarch   string
	Prebuilt bool
}

type Env

type Env mg.Namespace

noinspection GoUnusedExportedType, GoUnnecessarilyExportedIdentifiers

func (Env) Compose

func (Env) Compose()

Compose prints text in the .env format that references the Docker Compose configuration.

noinspection GoUnusedExportedFunction, GoUnnecessarilyExportedIdentifiers

func (Env) Print

func (Env) Print(host string, port int, user, password, database string)

Print (host string, port int, user, password, database string) prints text in the .env format that references the CDK configuration.

noinspection GoUnusedExportedFunction, GoUnnecessarilyExportedIdentifiers

type GobinPkgParams

type GobinPkgParams struct {
	Name    string
	Version string
	Tags    string
}

type Sqlc

type Sqlc mg.Namespace

func (Sqlc) Gen

func (Sqlc) Gen() error

Gen generates sqlc queries code.

noinspection GoUnusedExportedFunction, GoUnnecessarilyExportedIdentifiers

func (Sqlc) Vet

func (Sqlc) Vet() error

Vet runs queries through a set of lint rules.

noinspection GoUnusedExportedFunction, GoUnnecessarilyExportedIdentifiers

Jump to

Keyboard shortcuts

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