kurin

package module
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2020 License: MIT Imports: 5 Imported by: 0

README

Kurin

Very little helper with an example to create simple and clean Go app. Mostly for own usage, but maybe can inspire you how to structure your own go app.

Strongly inspired by CaptaionCodeman's project, so please check his project for more details about this structure.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Adapter

type Adapter interface {
	Closable
	Open()
	OnFailure(error)
}

type App

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

func NewApp

func NewApp(name string, adapters ...Adapter) *App

func (*App) RegisterSystems

func (a *App) RegisterSystems(systems ...interface{})

func (*App) Run

func (a *App) Run()

func (*App) SetLogger

func (a *App) SetLogger(logger Logger)

type Closable

type Closable interface {
	Close()
}

type Fallible

type Fallible interface {
	NotifyFail(chan error)
}

type Logger

type Logger interface {
	Debug(args ...interface{})
	Info(args ...interface{})
	Warn(args ...interface{})
	Error(args ...interface{})
	Fatal(args ...interface{})
	Panic(args ...interface{})
}

Directories

Path Synopsis
adapters
providers

Jump to

Keyboard shortcuts

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