examples

package
v0.0.0-...-889be8f Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2017 License: MIT Imports: 5 Imported by: 0

README

Generating examples:

# example 1
ifacecodegen \
    -source interface.go \
    -template example1.tmpl \
    -destination example1.gen.go \
    -meta service=account \
    -imports "opentracing=github.com/opentracing/opentracing-go,tracinglog=github.com/opentracing/opentracing-go/log"

# example 2
ifacecodegen \
    -source interface.go \
    -template example2.tmpl \
    -destination example2.gen.go

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Entity

type Entity struct{}

Entity is a sample struct

type Foo

type Foo interface {
	Load(context.Context) (Entity, error)
	Save([]Entity) error
	IsValid() bool
	ValidateMulti(...Entity)
}

Foo demo interface

func NewLoggerFoo

func NewLoggerFoo(s Foo) Foo

func NewTracingFoo

func NewTracingFoo(s Foo, tracer *opentracing.Tracer) Foo

NewTracingFactory creates a new trace wrapper instance

Jump to

Keyboard shortcuts

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