record

package
v0.5.0-beta4.1 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2019 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Factory

type Factory interface {
	ActionRecorder(ctx context.Context, name string, fields ...Field) (Recorder, context.Context)
}

func ChainFactory

func ChainFactory(factorys ...Factory) Factory

type FactoryWrapper

type FactoryWrapper struct {
	Wrapper
	Factory Factory
}

func (FactoryWrapper) ActionRecorder

func (mr FactoryWrapper) ActionRecorder(ctx context.Context, name string, fields ...Field) (Recorder, context.Context)

type Field

type Field struct {
	Name string
	// contains filtered or unexported fields
}

func BoolField

func BoolField(name string, value bool) Field

func IntegerField

func IntegerField(name string, value int64) Field

func NumberField

func NumberField(name string, number float64) Field

func StringField

func StringField(name, value string) Field

func (Field) StringValue

func (f Field) StringValue() string

func (Field) Value

func (f Field) Value() interface{}

type FileValue

type FileValue interface {
	Marshal() string
	Value() interface{}
}

type MaxDurationWrapper

type MaxDurationWrapper struct {
	MaxDuration time.Duration
}

func (MaxDurationWrapper) WrapRecord

func (wrap MaxDurationWrapper) WrapRecord(ctx context.Context, name string, record Recorder) (Recorder, context.Context)

type Recorder

type Recorder interface {
	Commit(err error, fields ...Field)
}

type Wrapper

type Wrapper interface {
	WrapRecord(ctx context.Context, name string, record Recorder) (Recorder, context.Context)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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