konga

package module
Version: v0.0.0-...-e3b82f8 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2020 License: GPL-3.0 Imports: 2 Imported by: 6

README

KONGA Backend

wercker status Go Report Card GoDoc

Backend project for Konga, a full-fledged management interface for Kong API Platform.

Build the Konga Backend

There are two ways here available to build the code; a targetted method and a cross-platform builder script. Both allow to create portable executables, compatible with Alpine Linux, compiled statically linking C bindings -installsuffix 'static', and omitting the symbol and debug info -ldflags "-s -w".

Targetted build, based on your system/architecture
# change according to your system/architecture
CGO_ENABLED=0 GOARCH=[amd64|386] GOOS=[linux|darwin] go build -ldflags="-w -s" -a -installsuffix 'static' -o konga cmd/konga/main.go
Multiplatform build with Docker

To trigger a multiplatform build, from the root diretory of this repository, run:

rm -rf $(pwd)/releases/*

docker run --rm -it -v "$PWD":/usr/src/app -w /usr/src/app golang:latest bash -c '
for GOOS in darwin linux; do
    for GOARCH in 386 amd64; do
      export GOOS GOARCH
      CGO_ENABLED=0 GO111MODULE=on go build -ldflags="-w -s -X main.minversion=`date -u +.%Y%m%d.%H%M%S`" \
      -a -installsuffix "static" -o releases/konga-$GOOS-$GOARCH cmd/konga/main.go
    done
done
'
Local testing with the inmemory strategy

For local testing run the code as follow:

./init-modules.bash && go run cmd/konga/main.go --database.type="inmemory"

Or execute the compiled binary:

./releases/konga-darwin-amd64 --database.type="inmemory"

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInconsistentIDs = errors.New("inconsistent IDs")
	ErrAlreadyExists   = errors.New("already exists")
	ErrNotFound        = errors.New("not found")
	ErrCmdRepository   = errors.New("unable to command repository")
	ErrQueryRepository = errors.New("unable to query repository")
)

Response errors

Functions

This section is empty.

Types

type Konga

type Konga struct {
	// gorm.Model
	ID uuid.UUID `json:"uuid,omitempty" gorm:"primary_key"`
}

Konga struct

type Repository

type Repository interface {
}

Repository describes the persistence on konga model

type Service

type Service interface {
}

Service is a CRUD interface.

Directories

Path Synopsis
cockroachdb module
inmemory module
middleware module
transport module
http Module

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL