ent

package
v0.3.21 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2021 License: MIT Imports: 4 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EntClient

type EntClient interface {
	Close() error

	GetSchema() EntClientSchema

	BeginTxGeneric(ctx context.Context, opts *sql.TxOptions) (EntTx, error)

	EntityClient(string) EntityClient
}

type EntClientSchema

type EntClientSchema interface {
	Create(ctx context.Context, opts ...schema.MigrateOption) error
}

Generic ent-style Schema (ent doesn't provide an interface for this)

type EntTx

type EntTx interface {
	Commit() error
	Rollback() error
}

type EntityClient

type EntityClient interface {
	CreateEntity() EntityCreate
}

type EntityCreate

type EntityCreate interface {
	EntityMutation() ent.Mutation
	SaveEntity(context.Context) (interface{}, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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