go: rename module from github.com/facebook/ent => entgo.io/ent (#1226)

This commit is contained in:
Ariel Mashraki
2021-02-02 23:03:04 +02:00
committed by GitHub
parent 7a2173f20d
commit dd4792f5b3
1087 changed files with 3956 additions and 3956 deletions

View File

@@ -11,9 +11,9 @@ import (
"strings"
"time"
"github.com/facebook/ent/dialect/sql"
"github.com/facebook/ent/entc/integration/hooks/ent/card"
"github.com/facebook/ent/entc/integration/hooks/ent/user"
"entgo.io/ent/dialect/sql"
"entgo.io/ent/entc/integration/hooks/ent/card"
"entgo.io/ent/entc/integration/hooks/ent/user"
)
// Card is the model entity for the Card schema.

View File

@@ -9,7 +9,7 @@ package card
import (
"time"
"github.com/facebook/ent"
"entgo.io/ent"
)
const (
@@ -73,7 +73,7 @@ func ValidColumn(column string) bool {
// package on the initialization of the application. Therefore,
// it should be imported in the main as follows:
//
// import _ "github.com/facebook/ent/entc/integration/hooks/ent/runtime"
// import _ "entgo.io/ent/entc/integration/hooks/ent/runtime"
//
var (
Hooks [3]ent.Hook

View File

@@ -9,9 +9,9 @@ package card
import (
"time"
"github.com/facebook/ent/dialect/sql"
"github.com/facebook/ent/dialect/sql/sqlgraph"
"github.com/facebook/ent/entc/integration/hooks/ent/predicate"
"entgo.io/ent/dialect/sql"
"entgo.io/ent/dialect/sql/sqlgraph"
"entgo.io/ent/entc/integration/hooks/ent/predicate"
)
// ID filters vertices based on their ID field.

View File

@@ -12,10 +12,10 @@ import (
"fmt"
"time"
"github.com/facebook/ent/dialect/sql/sqlgraph"
"github.com/facebook/ent/entc/integration/hooks/ent/card"
"github.com/facebook/ent/entc/integration/hooks/ent/user"
"github.com/facebook/ent/schema/field"
"entgo.io/ent/dialect/sql/sqlgraph"
"entgo.io/ent/entc/integration/hooks/ent/card"
"entgo.io/ent/entc/integration/hooks/ent/user"
"entgo.io/ent/schema/field"
)
// CardCreate is the builder for creating a Card entity.

View File

@@ -10,11 +10,11 @@ import (
"context"
"fmt"
"github.com/facebook/ent/dialect/sql"
"github.com/facebook/ent/dialect/sql/sqlgraph"
"github.com/facebook/ent/entc/integration/hooks/ent/card"
"github.com/facebook/ent/entc/integration/hooks/ent/predicate"
"github.com/facebook/ent/schema/field"
"entgo.io/ent/dialect/sql"
"entgo.io/ent/dialect/sql/sqlgraph"
"entgo.io/ent/entc/integration/hooks/ent/card"
"entgo.io/ent/entc/integration/hooks/ent/predicate"
"entgo.io/ent/schema/field"
)
// CardDelete is the builder for deleting a Card entity.

View File

@@ -12,12 +12,12 @@ import (
"fmt"
"math"
"github.com/facebook/ent/dialect/sql"
"github.com/facebook/ent/dialect/sql/sqlgraph"
"github.com/facebook/ent/entc/integration/hooks/ent/card"
"github.com/facebook/ent/entc/integration/hooks/ent/predicate"
"github.com/facebook/ent/entc/integration/hooks/ent/user"
"github.com/facebook/ent/schema/field"
"entgo.io/ent/dialect/sql"
"entgo.io/ent/dialect/sql/sqlgraph"
"entgo.io/ent/entc/integration/hooks/ent/card"
"entgo.io/ent/entc/integration/hooks/ent/predicate"
"entgo.io/ent/entc/integration/hooks/ent/user"
"entgo.io/ent/schema/field"
)
// CardQuery is the builder for querying Card entities.

View File

@@ -11,12 +11,12 @@ import (
"fmt"
"time"
"github.com/facebook/ent/dialect/sql"
"github.com/facebook/ent/dialect/sql/sqlgraph"
"github.com/facebook/ent/entc/integration/hooks/ent/card"
"github.com/facebook/ent/entc/integration/hooks/ent/predicate"
"github.com/facebook/ent/entc/integration/hooks/ent/user"
"github.com/facebook/ent/schema/field"
"entgo.io/ent/dialect/sql"
"entgo.io/ent/dialect/sql/sqlgraph"
"entgo.io/ent/entc/integration/hooks/ent/card"
"entgo.io/ent/entc/integration/hooks/ent/predicate"
"entgo.io/ent/entc/integration/hooks/ent/user"
"entgo.io/ent/schema/field"
)
// CardUpdate is the builder for updating Card entities.

View File

@@ -11,14 +11,14 @@ import (
"fmt"
"log"
"github.com/facebook/ent/entc/integration/hooks/ent/migrate"
"entgo.io/ent/entc/integration/hooks/ent/migrate"
"github.com/facebook/ent/entc/integration/hooks/ent/card"
"github.com/facebook/ent/entc/integration/hooks/ent/user"
"entgo.io/ent/entc/integration/hooks/ent/card"
"entgo.io/ent/entc/integration/hooks/ent/user"
"github.com/facebook/ent/dialect"
"github.com/facebook/ent/dialect/sql"
"github.com/facebook/ent/dialect/sql/sqlgraph"
"entgo.io/ent/dialect"
"entgo.io/ent/dialect/sql"
"entgo.io/ent/dialect/sql/sqlgraph"
)
// Client is the client that holds all ent builders.

View File

@@ -7,8 +7,8 @@
package ent
import (
"github.com/facebook/ent"
"github.com/facebook/ent/dialect"
"entgo.io/ent"
"entgo.io/ent/dialect"
)
// Option function to configure the client.

View File

@@ -11,10 +11,10 @@ import (
"fmt"
"strings"
"github.com/facebook/ent"
"github.com/facebook/ent/dialect"
"github.com/facebook/ent/dialect/sql"
"github.com/facebook/ent/dialect/sql/sqlgraph"
"entgo.io/ent"
"entgo.io/ent/dialect"
"entgo.io/ent/dialect/sql"
"entgo.io/ent/dialect/sql/sqlgraph"
)
// ent aliases to avoid import conflicts in user's code.

View File

@@ -9,11 +9,11 @@ package enttest
import (
"context"
"github.com/facebook/ent/entc/integration/hooks/ent"
"entgo.io/ent/entc/integration/hooks/ent"
// required by schema hooks.
_ "github.com/facebook/ent/entc/integration/hooks/ent/runtime"
_ "entgo.io/ent/entc/integration/hooks/ent/runtime"
"github.com/facebook/ent/dialect/sql/schema"
"entgo.io/ent/dialect/sql/schema"
)
type (

View File

@@ -4,4 +4,4 @@
package ent
//go:generate go run github.com/facebook/ent/cmd/ent generate --feature schema/snapshot --header "// Copyright 2019-present Facebook Inc. All rights reserved.\n// This source code is licensed under the Apache 2.0 license found\n// in the LICENSE file in the root directory of this source tree.\n\n// Code generated by entc, DO NOT EDIT." ./schema
//go:generate go run entgo.io/ent/cmd/ent generate --feature schema/snapshot --header "// Copyright 2019-present Facebook Inc. All rights reserved.\n// This source code is licensed under the Apache 2.0 license found\n// in the LICENSE file in the root directory of this source tree.\n\n// Code generated by entc, DO NOT EDIT." ./schema

View File

@@ -10,7 +10,7 @@ import (
"context"
"fmt"
"github.com/facebook/ent/entc/integration/hooks/ent"
"entgo.io/ent/entc/integration/hooks/ent"
)
// The CardFunc type is an adapter to allow the use of ordinary

View File

@@ -9,4 +9,4 @@
// Package internal holds a loadable version of the latest schema.
package internal
const Schema = `{"Schema":"github.com/facebook/ent/entc/integration/hooks/ent/schema","Package":"github.com/facebook/ent/entc/integration/hooks/ent","Schemas":[{"name":"Card","config":{"Table":""},"edges":[{"name":"owner","type":"User","ref_name":"cards","unique":true,"inverse":true}],"fields":[{"name":"number","type":{"Type":7,"Ident":"","PkgPath":"","Nillable":false,"RType":null},"default":true,"default_value":"unknown","default_kind":24,"immutable":true,"validators":1,"position":{"Index":0,"MixedIn":false,"MixinIndex":0}},{"name":"name","type":{"Type":7,"Ident":"","PkgPath":"","Nillable":false,"RType":null},"optional":true,"position":{"Index":1,"MixedIn":false,"MixinIndex":0},"comment":"Exact name written on card"},{"name":"created_at","type":{"Type":2,"Ident":"","PkgPath":"time","Nillable":false,"RType":null},"default":true,"default_kind":19,"position":{"Index":2,"MixedIn":false,"MixinIndex":0}},{"name":"in_hook","type":{"Type":7,"Ident":"","PkgPath":"","Nillable":false,"RType":null},"position":{"Index":3,"MixedIn":false,"MixinIndex":0},"comment":"A mandatory field that is set by the hook"}],"hooks":[{"Index":0,"MixedIn":true,"MixinIndex":0},{"Index":0,"MixedIn":false,"MixinIndex":0},{"Index":1,"MixedIn":false,"MixinIndex":0}]},{"name":"User","config":{"Table":""},"edges":[{"name":"cards","type":"Card"},{"name":"friends","type":"User"},{"name":"best_friend","type":"User","unique":true}],"fields":[{"name":"version","type":{"Type":12,"Ident":"","PkgPath":"","Nillable":false,"RType":null},"default":true,"default_value":0,"default_kind":2,"position":{"Index":0,"MixedIn":true,"MixinIndex":0}},{"name":"name","type":{"Type":7,"Ident":"","PkgPath":"","Nillable":false,"RType":null},"position":{"Index":0,"MixedIn":false,"MixinIndex":0}},{"name":"worth","type":{"Type":17,"Ident":"","PkgPath":"","Nillable":false,"RType":null},"optional":true,"position":{"Index":1,"MixedIn":false,"MixinIndex":0}}],"hooks":[{"Index":0,"MixedIn":true,"MixinIndex":0}]}],"Features":["schema/snapshot"]}`
const Schema = `{"Schema":"entgo.io/ent/entc/integration/hooks/ent/schema","Package":"entgo.io/ent/entc/integration/hooks/ent","Schemas":[{"name":"Card","config":{"Table":""},"edges":[{"name":"owner","type":"User","ref_name":"cards","unique":true,"inverse":true}],"fields":[{"name":"number","type":{"Type":7,"Ident":"","PkgPath":"","Nillable":false,"RType":null},"default":true,"default_value":"unknown","default_kind":24,"immutable":true,"validators":1,"position":{"Index":0,"MixedIn":false,"MixinIndex":0}},{"name":"name","type":{"Type":7,"Ident":"","PkgPath":"","Nillable":false,"RType":null},"optional":true,"position":{"Index":1,"MixedIn":false,"MixinIndex":0},"comment":"Exact name written on card"},{"name":"created_at","type":{"Type":2,"Ident":"","PkgPath":"time","Nillable":false,"RType":null},"default":true,"default_kind":19,"position":{"Index":2,"MixedIn":false,"MixinIndex":0}},{"name":"in_hook","type":{"Type":7,"Ident":"","PkgPath":"","Nillable":false,"RType":null},"position":{"Index":3,"MixedIn":false,"MixinIndex":0},"comment":"A mandatory field that is set by the hook"}],"hooks":[{"Index":0,"MixedIn":true,"MixinIndex":0},{"Index":0,"MixedIn":false,"MixinIndex":0},{"Index":1,"MixedIn":false,"MixinIndex":0}]},{"name":"User","config":{"Table":""},"edges":[{"name":"cards","type":"Card"},{"name":"friends","type":"User"},{"name":"best_friend","type":"User","unique":true}],"fields":[{"name":"version","type":{"Type":12,"Ident":"","PkgPath":"","Nillable":false,"RType":null},"default":true,"default_value":0,"default_kind":2,"position":{"Index":0,"MixedIn":true,"MixinIndex":0}},{"name":"name","type":{"Type":7,"Ident":"","PkgPath":"","Nillable":false,"RType":null},"position":{"Index":0,"MixedIn":false,"MixinIndex":0}},{"name":"worth","type":{"Type":17,"Ident":"","PkgPath":"","Nillable":false,"RType":null},"optional":true,"position":{"Index":1,"MixedIn":false,"MixinIndex":0}}],"hooks":[{"Index":0,"MixedIn":true,"MixinIndex":0}]}],"Features":["schema/snapshot"]}`

View File

@@ -11,8 +11,8 @@ import (
"fmt"
"io"
"github.com/facebook/ent/dialect"
"github.com/facebook/ent/dialect/sql/schema"
"entgo.io/ent/dialect"
"entgo.io/ent/dialect/sql/schema"
)
var (

View File

@@ -7,8 +7,8 @@
package migrate
import (
"github.com/facebook/ent/dialect/sql/schema"
"github.com/facebook/ent/schema/field"
"entgo.io/ent/dialect/sql/schema"
"entgo.io/ent/schema/field"
)
var (

View File

@@ -12,11 +12,11 @@ import (
"sync"
"time"
"github.com/facebook/ent/entc/integration/hooks/ent/card"
"github.com/facebook/ent/entc/integration/hooks/ent/predicate"
"github.com/facebook/ent/entc/integration/hooks/ent/user"
"entgo.io/ent/entc/integration/hooks/ent/card"
"entgo.io/ent/entc/integration/hooks/ent/predicate"
"entgo.io/ent/entc/integration/hooks/ent/user"
"github.com/facebook/ent"
"entgo.io/ent"
)
const (

View File

@@ -7,7 +7,7 @@
package predicate
import (
"github.com/facebook/ent/dialect/sql"
"entgo.io/ent/dialect/sql"
)
// Card is the predicate function for card builders.

View File

@@ -6,4 +6,4 @@
package ent
// The schema-stitching logic is generated in github.com/facebook/ent/entc/integration/hooks/ent/runtime/runtime.go
// The schema-stitching logic is generated in entgo.io/ent/entc/integration/hooks/ent/runtime/runtime.go

View File

@@ -9,9 +9,9 @@ package runtime
import (
"time"
"github.com/facebook/ent/entc/integration/hooks/ent/card"
"github.com/facebook/ent/entc/integration/hooks/ent/schema"
"github.com/facebook/ent/entc/integration/hooks/ent/user"
"entgo.io/ent/entc/integration/hooks/ent/card"
"entgo.io/ent/entc/integration/hooks/ent/schema"
"entgo.io/ent/entc/integration/hooks/ent/user"
)
// The init function reads all schema descriptors with runtime code

View File

@@ -9,13 +9,13 @@ import (
"fmt"
"time"
"github.com/facebook/ent"
gen "github.com/facebook/ent/entc/integration/hooks/ent"
"github.com/facebook/ent/entc/integration/hooks/ent/card"
"github.com/facebook/ent/entc/integration/hooks/ent/hook"
"github.com/facebook/ent/schema/edge"
"github.com/facebook/ent/schema/field"
"github.com/facebook/ent/schema/mixin"
"entgo.io/ent"
gen "entgo.io/ent/entc/integration/hooks/ent"
"entgo.io/ent/entc/integration/hooks/ent/card"
"entgo.io/ent/entc/integration/hooks/ent/hook"
"entgo.io/ent/schema/edge"
"entgo.io/ent/schema/field"
"entgo.io/ent/schema/mixin"
)
// RejectMany rejects all update operations

View File

@@ -8,12 +8,12 @@ import (
"context"
"fmt"
"github.com/facebook/ent/entc/integration/hooks/ent/hook"
"entgo.io/ent/entc/integration/hooks/ent/hook"
"github.com/facebook/ent"
"github.com/facebook/ent/schema/edge"
"github.com/facebook/ent/schema/field"
"github.com/facebook/ent/schema/mixin"
"entgo.io/ent"
"entgo.io/ent/schema/edge"
"entgo.io/ent/schema/field"
"entgo.io/ent/schema/mixin"
)
// User holds the schema definition for the User entity.

View File

@@ -10,7 +10,7 @@ import (
"context"
"sync"
"github.com/facebook/ent/dialect"
"entgo.io/ent/dialect"
)
// Tx is a transactional client that is created by calling Client.Tx().

View File

@@ -10,8 +10,8 @@ import (
"fmt"
"strings"
"github.com/facebook/ent/dialect/sql"
"github.com/facebook/ent/entc/integration/hooks/ent/user"
"entgo.io/ent/dialect/sql"
"entgo.io/ent/entc/integration/hooks/ent/user"
)
// User is the model entity for the User schema.

View File

@@ -7,7 +7,7 @@
package user
import (
"github.com/facebook/ent"
"entgo.io/ent"
)
const (
@@ -84,7 +84,7 @@ func ValidColumn(column string) bool {
// package on the initialization of the application. Therefore,
// it should be imported in the main as follows:
//
// import _ "github.com/facebook/ent/entc/integration/hooks/ent/runtime"
// import _ "entgo.io/ent/entc/integration/hooks/ent/runtime"
//
var (
Hooks [1]ent.Hook

View File

@@ -7,9 +7,9 @@
package user
import (
"github.com/facebook/ent/dialect/sql"
"github.com/facebook/ent/dialect/sql/sqlgraph"
"github.com/facebook/ent/entc/integration/hooks/ent/predicate"
"entgo.io/ent/dialect/sql"
"entgo.io/ent/dialect/sql/sqlgraph"
"entgo.io/ent/entc/integration/hooks/ent/predicate"
)
// ID filters vertices based on their ID field.

View File

@@ -11,10 +11,10 @@ import (
"errors"
"fmt"
"github.com/facebook/ent/dialect/sql/sqlgraph"
"github.com/facebook/ent/entc/integration/hooks/ent/card"
"github.com/facebook/ent/entc/integration/hooks/ent/user"
"github.com/facebook/ent/schema/field"
"entgo.io/ent/dialect/sql/sqlgraph"
"entgo.io/ent/entc/integration/hooks/ent/card"
"entgo.io/ent/entc/integration/hooks/ent/user"
"entgo.io/ent/schema/field"
)
// UserCreate is the builder for creating a User entity.

View File

@@ -10,11 +10,11 @@ import (
"context"
"fmt"
"github.com/facebook/ent/dialect/sql"
"github.com/facebook/ent/dialect/sql/sqlgraph"
"github.com/facebook/ent/entc/integration/hooks/ent/predicate"
"github.com/facebook/ent/entc/integration/hooks/ent/user"
"github.com/facebook/ent/schema/field"
"entgo.io/ent/dialect/sql"
"entgo.io/ent/dialect/sql/sqlgraph"
"entgo.io/ent/entc/integration/hooks/ent/predicate"
"entgo.io/ent/entc/integration/hooks/ent/user"
"entgo.io/ent/schema/field"
)
// UserDelete is the builder for deleting a User entity.

View File

@@ -13,12 +13,12 @@ import (
"fmt"
"math"
"github.com/facebook/ent/dialect/sql"
"github.com/facebook/ent/dialect/sql/sqlgraph"
"github.com/facebook/ent/entc/integration/hooks/ent/card"
"github.com/facebook/ent/entc/integration/hooks/ent/predicate"
"github.com/facebook/ent/entc/integration/hooks/ent/user"
"github.com/facebook/ent/schema/field"
"entgo.io/ent/dialect/sql"
"entgo.io/ent/dialect/sql/sqlgraph"
"entgo.io/ent/entc/integration/hooks/ent/card"
"entgo.io/ent/entc/integration/hooks/ent/predicate"
"entgo.io/ent/entc/integration/hooks/ent/user"
"entgo.io/ent/schema/field"
)
// UserQuery is the builder for querying User entities.

View File

@@ -10,12 +10,12 @@ import (
"context"
"fmt"
"github.com/facebook/ent/dialect/sql"
"github.com/facebook/ent/dialect/sql/sqlgraph"
"github.com/facebook/ent/entc/integration/hooks/ent/card"
"github.com/facebook/ent/entc/integration/hooks/ent/predicate"
"github.com/facebook/ent/entc/integration/hooks/ent/user"
"github.com/facebook/ent/schema/field"
"entgo.io/ent/dialect/sql"
"entgo.io/ent/dialect/sql/sqlgraph"
"entgo.io/ent/entc/integration/hooks/ent/card"
"entgo.io/ent/entc/integration/hooks/ent/predicate"
"entgo.io/ent/entc/integration/hooks/ent/user"
"entgo.io/ent/schema/field"
)
// UserUpdate is the builder for updating User entities.

View File

@@ -10,12 +10,12 @@ import (
"sort"
"testing"
"github.com/facebook/ent/entc/integration/hooks/ent"
"github.com/facebook/ent/entc/integration/hooks/ent/card"
"github.com/facebook/ent/entc/integration/hooks/ent/enttest"
"github.com/facebook/ent/entc/integration/hooks/ent/hook"
"github.com/facebook/ent/entc/integration/hooks/ent/migrate"
"github.com/facebook/ent/entc/integration/hooks/ent/user"
"entgo.io/ent/entc/integration/hooks/ent"
"entgo.io/ent/entc/integration/hooks/ent/card"
"entgo.io/ent/entc/integration/hooks/ent/enttest"
"entgo.io/ent/entc/integration/hooks/ent/hook"
"entgo.io/ent/entc/integration/hooks/ent/migrate"
"entgo.io/ent/entc/integration/hooks/ent/user"
_ "github.com/mattn/go-sqlite3"
"github.com/stretchr/testify/require"