mirror of
https://github.com/ent/ent.git
synced 2026-05-22 09:31:45 +03:00
go: rename module from github.com/facebook/ent => entgo.io/ent (#1226)
This commit is contained in:
@@ -11,12 +11,12 @@ import (
|
||||
"fmt"
|
||||
"log"
|
||||
|
||||
"github.com/facebook/ent/examples/privacyadmin/ent/migrate"
|
||||
"entgo.io/ent/examples/privacyadmin/ent/migrate"
|
||||
|
||||
"github.com/facebook/ent/examples/privacyadmin/ent/user"
|
||||
"entgo.io/ent/examples/privacyadmin/ent/user"
|
||||
|
||||
"github.com/facebook/ent/dialect"
|
||||
"github.com/facebook/ent/dialect/sql"
|
||||
"entgo.io/ent/dialect"
|
||||
"entgo.io/ent/dialect/sql"
|
||||
)
|
||||
|
||||
// Client is the client that holds all ent builders.
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -9,11 +9,11 @@ package enttest
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/facebook/ent/examples/privacyadmin/ent"
|
||||
"entgo.io/ent/examples/privacyadmin/ent"
|
||||
// required by schema hooks.
|
||||
_ "github.com/facebook/ent/examples/privacyadmin/ent/runtime"
|
||||
_ "entgo.io/ent/examples/privacyadmin/ent/runtime"
|
||||
|
||||
"github.com/facebook/ent/dialect/sql/schema"
|
||||
"entgo.io/ent/dialect/sql/schema"
|
||||
)
|
||||
|
||||
type (
|
||||
|
||||
@@ -4,4 +4,4 @@
|
||||
|
||||
package ent
|
||||
|
||||
//go:generate go run github.com/facebook/ent/cmd/ent generate --feature schema/snapshot,privacy --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,privacy --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
|
||||
|
||||
@@ -10,7 +10,7 @@ import (
|
||||
"context"
|
||||
"fmt"
|
||||
|
||||
"github.com/facebook/ent/examples/privacyadmin/ent"
|
||||
"entgo.io/ent/examples/privacyadmin/ent"
|
||||
)
|
||||
|
||||
// The UserFunc type is an adapter to allow the use of ordinary
|
||||
|
||||
@@ -9,4 +9,4 @@
|
||||
// Package internal holds a loadable version of the latest schema.
|
||||
package internal
|
||||
|
||||
const Schema = `{"Schema":"github.com/facebook/ent/examples/privacyadmin/ent/schema","Package":"github.com/facebook/ent/examples/privacyadmin/ent","Schemas":[{"name":"User","config":{"Table":""},"fields":[{"name":"name","type":{"Type":7,"Ident":"","PkgPath":"","Nillable":false,"RType":null},"default":true,"default_value":"Unknown","default_kind":24,"position":{"Index":0,"MixedIn":false,"MixinIndex":0}}],"policy":[{"Index":0,"MixedIn":false,"MixinIndex":0}]}],"Features":["schema/snapshot","privacy"]}`
|
||||
const Schema = `{"Schema":"entgo.io/ent/examples/privacyadmin/ent/schema","Package":"entgo.io/ent/examples/privacyadmin/ent","Schemas":[{"name":"User","config":{"Table":""},"fields":[{"name":"name","type":{"Type":7,"Ident":"","PkgPath":"","Nillable":false,"RType":null},"default":true,"default_value":"Unknown","default_kind":24,"position":{"Index":0,"MixedIn":false,"MixinIndex":0}}],"policy":[{"Index":0,"MixedIn":false,"MixinIndex":0}]}],"Features":["schema/snapshot","privacy"]}`
|
||||
|
||||
@@ -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 (
|
||||
|
||||
@@ -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 (
|
||||
|
||||
@@ -11,10 +11,10 @@ import (
|
||||
"fmt"
|
||||
"sync"
|
||||
|
||||
"github.com/facebook/ent/examples/privacyadmin/ent/predicate"
|
||||
"github.com/facebook/ent/examples/privacyadmin/ent/user"
|
||||
"entgo.io/ent/examples/privacyadmin/ent/predicate"
|
||||
"entgo.io/ent/examples/privacyadmin/ent/user"
|
||||
|
||||
"github.com/facebook/ent"
|
||||
"entgo.io/ent"
|
||||
)
|
||||
|
||||
const (
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
package predicate
|
||||
|
||||
import (
|
||||
"github.com/facebook/ent/dialect/sql"
|
||||
"entgo.io/ent/dialect/sql"
|
||||
)
|
||||
|
||||
// User is the predicate function for user builders.
|
||||
|
||||
@@ -10,9 +10,9 @@ import (
|
||||
"context"
|
||||
"fmt"
|
||||
|
||||
"github.com/facebook/ent/examples/privacyadmin/ent"
|
||||
"entgo.io/ent/examples/privacyadmin/ent"
|
||||
|
||||
"github.com/facebook/ent/privacy"
|
||||
"entgo.io/ent/privacy"
|
||||
)
|
||||
|
||||
var (
|
||||
|
||||
@@ -6,4 +6,4 @@
|
||||
|
||||
package ent
|
||||
|
||||
// The schema-stitching logic is generated in github.com/facebook/ent/examples/privacyadmin/ent/runtime/runtime.go
|
||||
// The schema-stitching logic is generated in entgo.io/ent/examples/privacyadmin/ent/runtime/runtime.go
|
||||
|
||||
@@ -9,11 +9,11 @@ package runtime
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/facebook/ent/examples/privacyadmin/ent/schema"
|
||||
"github.com/facebook/ent/examples/privacyadmin/ent/user"
|
||||
"entgo.io/ent/examples/privacyadmin/ent/schema"
|
||||
"entgo.io/ent/examples/privacyadmin/ent/user"
|
||||
|
||||
"github.com/facebook/ent"
|
||||
"github.com/facebook/ent/privacy"
|
||||
"entgo.io/ent"
|
||||
"entgo.io/ent/privacy"
|
||||
)
|
||||
|
||||
// The init function reads all schema descriptors with runtime code
|
||||
|
||||
@@ -5,10 +5,10 @@
|
||||
package schema
|
||||
|
||||
import (
|
||||
"github.com/facebook/ent"
|
||||
"github.com/facebook/ent/examples/privacyadmin/ent/privacy"
|
||||
"github.com/facebook/ent/examples/privacyadmin/rule"
|
||||
"github.com/facebook/ent/schema/field"
|
||||
"entgo.io/ent"
|
||||
"entgo.io/ent/examples/privacyadmin/ent/privacy"
|
||||
"entgo.io/ent/examples/privacyadmin/rule"
|
||||
"entgo.io/ent/schema/field"
|
||||
)
|
||||
|
||||
// User holds the schema definition for the User entity.
|
||||
|
||||
@@ -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().
|
||||
|
||||
@@ -10,8 +10,8 @@ import (
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"github.com/facebook/ent/dialect/sql"
|
||||
"github.com/facebook/ent/examples/privacyadmin/ent/user"
|
||||
"entgo.io/ent/dialect/sql"
|
||||
"entgo.io/ent/examples/privacyadmin/ent/user"
|
||||
)
|
||||
|
||||
// User is the model entity for the User schema.
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
package user
|
||||
|
||||
import (
|
||||
"github.com/facebook/ent"
|
||||
"entgo.io/ent"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -42,7 +42,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/examples/privacyadmin/ent/runtime"
|
||||
// import _ "entgo.io/ent/examples/privacyadmin/ent/runtime"
|
||||
//
|
||||
var (
|
||||
Hooks [1]ent.Hook
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
package user
|
||||
|
||||
import (
|
||||
"github.com/facebook/ent/dialect/sql"
|
||||
"github.com/facebook/ent/examples/privacyadmin/ent/predicate"
|
||||
"entgo.io/ent/dialect/sql"
|
||||
"entgo.io/ent/examples/privacyadmin/ent/predicate"
|
||||
)
|
||||
|
||||
// ID filters vertices based on their ID field.
|
||||
|
||||
@@ -11,9 +11,9 @@ import (
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
"github.com/facebook/ent/dialect/sql/sqlgraph"
|
||||
"github.com/facebook/ent/examples/privacyadmin/ent/user"
|
||||
"github.com/facebook/ent/schema/field"
|
||||
"entgo.io/ent/dialect/sql/sqlgraph"
|
||||
"entgo.io/ent/examples/privacyadmin/ent/user"
|
||||
"entgo.io/ent/schema/field"
|
||||
)
|
||||
|
||||
// UserCreate is the builder for creating a User entity.
|
||||
|
||||
@@ -10,11 +10,11 @@ import (
|
||||
"context"
|
||||
"fmt"
|
||||
|
||||
"github.com/facebook/ent/dialect/sql"
|
||||
"github.com/facebook/ent/dialect/sql/sqlgraph"
|
||||
"github.com/facebook/ent/examples/privacyadmin/ent/predicate"
|
||||
"github.com/facebook/ent/examples/privacyadmin/ent/user"
|
||||
"github.com/facebook/ent/schema/field"
|
||||
"entgo.io/ent/dialect/sql"
|
||||
"entgo.io/ent/dialect/sql/sqlgraph"
|
||||
"entgo.io/ent/examples/privacyadmin/ent/predicate"
|
||||
"entgo.io/ent/examples/privacyadmin/ent/user"
|
||||
"entgo.io/ent/schema/field"
|
||||
)
|
||||
|
||||
// UserDelete is the builder for deleting a User entity.
|
||||
|
||||
@@ -12,11 +12,11 @@ import (
|
||||
"fmt"
|
||||
"math"
|
||||
|
||||
"github.com/facebook/ent/dialect/sql"
|
||||
"github.com/facebook/ent/dialect/sql/sqlgraph"
|
||||
"github.com/facebook/ent/examples/privacyadmin/ent/predicate"
|
||||
"github.com/facebook/ent/examples/privacyadmin/ent/user"
|
||||
"github.com/facebook/ent/schema/field"
|
||||
"entgo.io/ent/dialect/sql"
|
||||
"entgo.io/ent/dialect/sql/sqlgraph"
|
||||
"entgo.io/ent/examples/privacyadmin/ent/predicate"
|
||||
"entgo.io/ent/examples/privacyadmin/ent/user"
|
||||
"entgo.io/ent/schema/field"
|
||||
)
|
||||
|
||||
// UserQuery is the builder for querying User entities.
|
||||
|
||||
@@ -10,11 +10,11 @@ import (
|
||||
"context"
|
||||
"fmt"
|
||||
|
||||
"github.com/facebook/ent/dialect/sql"
|
||||
"github.com/facebook/ent/dialect/sql/sqlgraph"
|
||||
"github.com/facebook/ent/examples/privacyadmin/ent/predicate"
|
||||
"github.com/facebook/ent/examples/privacyadmin/ent/user"
|
||||
"github.com/facebook/ent/schema/field"
|
||||
"entgo.io/ent/dialect/sql"
|
||||
"entgo.io/ent/dialect/sql/sqlgraph"
|
||||
"entgo.io/ent/examples/privacyadmin/ent/predicate"
|
||||
"entgo.io/ent/examples/privacyadmin/ent/user"
|
||||
"entgo.io/ent/schema/field"
|
||||
)
|
||||
|
||||
// UserUpdate is the builder for updating User entities.
|
||||
|
||||
@@ -10,11 +10,11 @@ import (
|
||||
"fmt"
|
||||
"log"
|
||||
|
||||
"github.com/facebook/ent/examples/privacyadmin/viewer"
|
||||
"entgo.io/ent/examples/privacyadmin/viewer"
|
||||
|
||||
"github.com/facebook/ent/examples/privacyadmin/ent"
|
||||
"github.com/facebook/ent/examples/privacyadmin/ent/privacy"
|
||||
_ "github.com/facebook/ent/examples/privacyadmin/ent/runtime"
|
||||
"entgo.io/ent/examples/privacyadmin/ent"
|
||||
"entgo.io/ent/examples/privacyadmin/ent/privacy"
|
||||
_ "entgo.io/ent/examples/privacyadmin/ent/runtime"
|
||||
|
||||
_ "github.com/mattn/go-sqlite3"
|
||||
)
|
||||
|
||||
@@ -7,8 +7,8 @@ package rule
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/facebook/ent/examples/privacyadmin/ent/privacy"
|
||||
"github.com/facebook/ent/examples/privacyadmin/viewer"
|
||||
"entgo.io/ent/examples/privacyadmin/ent/privacy"
|
||||
"entgo.io/ent/examples/privacyadmin/viewer"
|
||||
)
|
||||
|
||||
// DenyIfNoViewer is a rule that returns deny decision if the viewer is missing in the context.
|
||||
|
||||
Reference in New Issue
Block a user