schema

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var LogHook = func(next ent.Mutator) ent.Mutator {
	return ent.MutateFunc(func(ctx context.Context, m ent.Mutation) (ent.Value, error) {
		logger := log.With(log.NewStdLogger(os.Stdout),
			"ts", log.DefaultTimestamp,
			"service.name", "database",
		)

		defer func() {
			logger.Log(log.LevelInfo, m.Op().String())
		}()
		return next.Mutate(ctx, m)
	})
}

Functions

This section is empty.

Types

type Category added in v0.4.0

type Category struct {
	ent.Schema
}

Category holds the schema definition for the Category entity.

func (Category) Edges added in v0.4.0

func (Category) Edges() []ent.Edge

Edges of the Category.

func (Category) Fields added in v0.4.0

func (Category) Fields() []ent.Field

Fields of the Category.

type Equipment

type Equipment struct {
	ent.Schema
}

Equipment holds the schema definition for the Equipment entity.

func (Equipment) Annotations added in v0.4.0

func (Equipment) Annotations() []schema.Annotation

func (Equipment) Edges

func (Equipment) Edges() []ent.Edge

Edges of the Equipment.

func (Equipment) Fields

func (Equipment) Fields() []ent.Field

Fields of the Equipment.

func (Equipment) Mixin added in v0.4.0

func (Equipment) Mixin() []ent.Mixin

type TimeMixin added in v0.4.0

type TimeMixin struct {
	mixin.Schema
}

func (TimeMixin) Fields added in v0.4.0

func (TimeMixin) Fields() []ent.Field

type Vehicle

type Vehicle struct {
	ent.Schema
}

Vehicle holds the schema definition for the Vehicle entity.

func (Vehicle) Annotations added in v0.4.0

func (Vehicle) Annotations() []schema.Annotation

func (Vehicle) Edges

func (Vehicle) Edges() []ent.Edge

Edges of the Vehicle.

func (Vehicle) Fields

func (Vehicle) Fields() []ent.Field

Fields of the Vehicle.

func (Vehicle) Mixin added in v0.4.0

func (Vehicle) Mixin() []ent.Mixin

Jump to

Keyboard shortcuts

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