ent: github.com/facebookincubator/ent/schema/mixin Index | Files

package mixin

import "github.com/facebookincubator/ent/schema/mixin"

Index

Package Files

mixin.go

func AnnotateFields Uses

func AnnotateFields(m ent.Mixin, annotations ...field.Annotation) ent.Mixin

AnnotateFields adds field annotations to underlying mixin fields.

type CreateTime Uses

type CreateTime struct{ Schema }

CreateTime adds created at time field.

func (CreateTime) Fields Uses

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

Fields of the create time mixin.

type Schema Uses

type Schema struct{}

Schema is the default implementation for the ent.Mixin interface. It should be embedded in end-user mixin as follows:

type M struct {
	mixin.Schema
}

func (Schema) Edges Uses

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

Edges of the mixin.

func (Schema) Fields Uses

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

Fields of the mixin.

func (Schema) Hooks Uses

func (Schema) Hooks() []ent.Hook

Hooks of the mixin.

func (Schema) Indexes Uses

func (Schema) Indexes() []ent.Index

Indexes of the mixin.

type Time Uses

type Time struct{ Schema }

Time composes create/update time mixin.

func (Time) Fields Uses

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

Fields of the time mixin.

type UpdateTime Uses

type UpdateTime struct{ Schema }

UpdateTime adds updated at time field.

func (UpdateTime) Fields Uses

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

Fields of the update time mixin.

Package mixin imports 3 packages (graph) and is imported by 1 packages. Updated 2020-08-05. Refresh now. Tools for package owners.