repo

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2025 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrRepositoryNotSetInContext = "repository is not set in context"
	RepositoryContextValue       = "repository"
)

Functions

func CompareUniqueInput

func CompareUniqueInput(a interface{}, b interface{}) bool

func OrderFunc

func OrderFunc(o ent.OrderDirection, field string) func(*sql.Selector)

TODO @David find better location for these (in api?)

func SnakeCase

func SnakeCase(str string) string

Types

type AdminUser

type AdminUser struct {
	// contains filtered or unexported fields
}

func NewAdminUser

func NewAdminUser(c *ent.Client) *AdminUser

func (*AdminUser) Connection

func (r *AdminUser) Connection(ctx context.Context, where *ent.AdminUserWhereInput, orderBy *ent.AdminUserOrder, skip *int, first *int, last *int) (*ent.AdminUserConnection, error)

func (*AdminUser) Create

func (*AdminUser) CreateMany

func (r *AdminUser) CreateMany(ctx context.Context, data []ent.CreateAdminUserInput) ([]*ent.AdminUser, error)

func (*AdminUser) CreateManyTx

func (r *AdminUser) CreateManyTx(ctx context.Context, tx *ent.Tx, data []ent.CreateAdminUserInput) ([]*ent.AdminUser, error)

func (*AdminUser) CreateTx

func (r *AdminUser) CreateTx(ctx context.Context, tx *ent.Tx, data ent.CreateAdminUserInput) (*ent.AdminUser, error)

func (*AdminUser) Delete

func (*AdminUser) DeleteMany

func (r *AdminUser) DeleteMany(ctx context.Context, where ent.AdminUserWhereInput) (int, error)

func (*AdminUser) DeleteManyTx

func (r *AdminUser) DeleteManyTx(ctx context.Context, tx *ent.Tx, where ent.AdminUserWhereInput) (int, error)

func (*AdminUser) DeleteTx

func (r *AdminUser) DeleteTx(ctx context.Context, tx *ent.Tx, where ent.AdminUserWhereUniqueInput) (*ent.AdminUser, error)

func (*AdminUser) Get

func (r *AdminUser) Get(ctx context.Context, where *ent.AdminUserWhereInput, orderBy *ent.AdminUserOrder, skip *int, first *int, last *int) ([]*ent.AdminUser, error)

func (*AdminUser) GetOne

func (*AdminUser) GetOneTx

func (r *AdminUser) GetOneTx(ctx context.Context, tx *ent.Tx, where ent.AdminUserWhereUniqueInput) (*ent.AdminUser, error)

func (*AdminUser) GetTx

func (r *AdminUser) GetTx(ctx context.Context, tx *ent.Tx, where *ent.AdminUserWhereInput, orderBy *ent.AdminUserOrder, skip *int, first *int, last *int) ([]*ent.AdminUser, error)

func (*AdminUser) Update

func (*AdminUser) UpdateMany

func (r *AdminUser) UpdateMany(ctx context.Context, where ent.AdminUserWhereInput, data ent.UpdateAdminUserInput) (int, error)

func (*AdminUser) UpdateManyTx

func (r *AdminUser) UpdateManyTx(ctx context.Context, tx *ent.Tx, where ent.AdminUserWhereInput, data ent.UpdateAdminUserInput) (int, error)

func (*AdminUser) UpdateTx

func (*AdminUser) Upsert

func (r *AdminUser) Upsert(ctx context.Context, data ent.CreateAdminUserInput) (upsertedAdminUser *ent.AdminUser, err error)

func (*AdminUser) UpsertMany

func (r *AdminUser) UpsertMany(ctx context.Context, data []ent.CreateAdminUserInput) (int, error)

func (*AdminUser) UpsertManyTx

func (r *AdminUser) UpsertManyTx(ctx context.Context, tx *ent.Tx, data []ent.CreateAdminUserInput) (int, error)

func (*AdminUser) UpsertTx

func (r *AdminUser) UpsertTx(ctx context.Context, tx *ent.Tx, data ent.CreateAdminUserInput) (upsertedAdminUser *ent.AdminUser, err error)

type File

type File struct {
	// contains filtered or unexported fields
}

func NewFile

func NewFile(c *ent.Client) *File

func (*File) Connection

func (r *File) Connection(ctx context.Context, where *ent.FileWhereInput, orderBy *ent.FileOrder, skip *int, first *int, last *int) (*ent.FileConnection, error)

func (*File) Create

func (r *File) Create(ctx context.Context, data ent.CreateFileInput) (*ent.File, error)

func (*File) CreateMany

func (r *File) CreateMany(ctx context.Context, data []ent.CreateFileInput) ([]*ent.File, error)

func (*File) CreateManyTx

func (r *File) CreateManyTx(ctx context.Context, tx *ent.Tx, data []ent.CreateFileInput) ([]*ent.File, error)

func (*File) CreateTx

func (r *File) CreateTx(ctx context.Context, tx *ent.Tx, data ent.CreateFileInput) (*ent.File, error)

func (*File) Delete

func (r *File) Delete(ctx context.Context, where ent.FileWhereUniqueInput) (*ent.File, error)

func (*File) DeleteMany

func (r *File) DeleteMany(ctx context.Context, where ent.FileWhereInput) (int, error)

func (*File) DeleteManyTx

func (r *File) DeleteManyTx(ctx context.Context, tx *ent.Tx, where ent.FileWhereInput) (int, error)

func (*File) DeleteTx

func (r *File) DeleteTx(ctx context.Context, tx *ent.Tx, where ent.FileWhereUniqueInput) (*ent.File, error)

func (*File) Get

func (r *File) Get(ctx context.Context, where *ent.FileWhereInput, orderBy *ent.FileOrder, skip *int, first *int, last *int) ([]*ent.File, error)

func (*File) GetOne

func (r *File) GetOne(ctx context.Context, where ent.FileWhereUniqueInput) (*ent.File, error)

func (*File) GetOneTx

func (r *File) GetOneTx(ctx context.Context, tx *ent.Tx, where ent.FileWhereUniqueInput) (*ent.File, error)

func (*File) GetTx

func (r *File) GetTx(ctx context.Context, tx *ent.Tx, where *ent.FileWhereInput, orderBy *ent.FileOrder, skip *int, first *int, last *int) ([]*ent.File, error)

func (*File) Update

func (r *File) Update(ctx context.Context, where ent.FileWhereUniqueInput, data ent.UpdateFileInput) (*ent.File, error)

func (*File) UpdateMany

func (r *File) UpdateMany(ctx context.Context, where ent.FileWhereInput, data ent.UpdateFileInput) (int, error)

func (*File) UpdateManyTx

func (r *File) UpdateManyTx(ctx context.Context, tx *ent.Tx, where ent.FileWhereInput, data ent.UpdateFileInput) (int, error)

func (*File) UpdateTx

func (r *File) UpdateTx(ctx context.Context, tx *ent.Tx, where ent.FileWhereUniqueInput, data ent.UpdateFileInput) (*ent.File, error)

func (*File) Upsert

func (r *File) Upsert(ctx context.Context, data ent.CreateFileInput) (upsertedFile *ent.File, err error)

func (*File) UpsertMany

func (r *File) UpsertMany(ctx context.Context, data []ent.CreateFileInput) (int, error)

func (*File) UpsertManyTx

func (r *File) UpsertManyTx(ctx context.Context, tx *ent.Tx, data []ent.CreateFileInput) (int, error)

func (*File) UpsertTx

func (r *File) UpsertTx(ctx context.Context, tx *ent.Tx, data ent.CreateFileInput) (upsertedFile *ent.File, err error)

type Permission

type Permission struct {
	// contains filtered or unexported fields
}

func NewPermission

func NewPermission(c *ent.Client) *Permission

func (*Permission) Connection

func (r *Permission) Connection(ctx context.Context, where *ent.PermissionWhereInput, orderBy *ent.PermissionOrder, skip *int, first *int, last *int) (*ent.PermissionConnection, error)

func (*Permission) Create

func (*Permission) CreateMany

func (r *Permission) CreateMany(ctx context.Context, data []ent.CreatePermissionInput) ([]*ent.Permission, error)

func (*Permission) CreateManyTx

func (r *Permission) CreateManyTx(ctx context.Context, tx *ent.Tx, data []ent.CreatePermissionInput) ([]*ent.Permission, error)

func (*Permission) CreateTx

func (r *Permission) CreateTx(ctx context.Context, tx *ent.Tx, data ent.CreatePermissionInput) (*ent.Permission, error)

func (*Permission) Delete

func (*Permission) DeleteMany

func (r *Permission) DeleteMany(ctx context.Context, where ent.PermissionWhereInput) (int, error)

func (*Permission) DeleteManyTx

func (r *Permission) DeleteManyTx(ctx context.Context, tx *ent.Tx, where ent.PermissionWhereInput) (int, error)

func (*Permission) DeleteTx

func (r *Permission) DeleteTx(ctx context.Context, tx *ent.Tx, where ent.PermissionWhereUniqueInput) (*ent.Permission, error)

func (*Permission) Get

func (r *Permission) Get(ctx context.Context, where *ent.PermissionWhereInput, orderBy *ent.PermissionOrder, skip *int, first *int, last *int) ([]*ent.Permission, error)

func (*Permission) GetOne

func (*Permission) GetOneTx

func (r *Permission) GetOneTx(ctx context.Context, tx *ent.Tx, where ent.PermissionWhereUniqueInput) (*ent.Permission, error)

func (*Permission) GetTx

func (r *Permission) GetTx(ctx context.Context, tx *ent.Tx, where *ent.PermissionWhereInput, orderBy *ent.PermissionOrder, skip *int, first *int, last *int) ([]*ent.Permission, error)

func (*Permission) Update

func (*Permission) UpdateMany

func (*Permission) UpdateManyTx

func (r *Permission) UpdateManyTx(ctx context.Context, tx *ent.Tx, where ent.PermissionWhereInput, data ent.UpdatePermissionInput) (int, error)

func (*Permission) UpdateTx

func (*Permission) Upsert

func (r *Permission) Upsert(ctx context.Context, data ent.CreatePermissionInput) (upsertedPermission *ent.Permission, err error)

func (*Permission) UpsertMany

func (r *Permission) UpsertMany(ctx context.Context, data []ent.CreatePermissionInput) (int, error)

func (*Permission) UpsertManyTx

func (r *Permission) UpsertManyTx(ctx context.Context, tx *ent.Tx, data []ent.CreatePermissionInput) (int, error)

func (*Permission) UpsertTx

func (r *Permission) UpsertTx(ctx context.Context, tx *ent.Tx, data ent.CreatePermissionInput) (upsertedPermission *ent.Permission, err error)

type Repository

type Repository struct {
	// Node                  repo.Node
	Tx         Txer
	Permission repo.Permission
	Role       repo.Role
	User       repo.User
	AdminUser  repo.AdminUser
	File       repo.File
}

func New

func New(client *ent.Client) *Repository

type Role

type Role struct {
	// contains filtered or unexported fields
}

func NewRole

func NewRole(c *ent.Client) *Role

func (*Role) Connection

func (r *Role) Connection(ctx context.Context, where *ent.RoleWhereInput, orderBy *ent.RoleOrder, skip *int, first *int, last *int) (*ent.RoleConnection, error)

func (*Role) Create

func (r *Role) Create(ctx context.Context, data ent.CreateRoleInput) (*ent.Role, error)

func (*Role) CreateMany

func (r *Role) CreateMany(ctx context.Context, data []ent.CreateRoleInput) ([]*ent.Role, error)

func (*Role) CreateManyTx

func (r *Role) CreateManyTx(ctx context.Context, tx *ent.Tx, data []ent.CreateRoleInput) ([]*ent.Role, error)

func (*Role) CreateTx

func (r *Role) CreateTx(ctx context.Context, tx *ent.Tx, data ent.CreateRoleInput) (*ent.Role, error)

func (*Role) Delete

func (r *Role) Delete(ctx context.Context, where ent.RoleWhereUniqueInput) (*ent.Role, error)

func (*Role) DeleteMany

func (r *Role) DeleteMany(ctx context.Context, where ent.RoleWhereInput) (int, error)

func (*Role) DeleteManyTx

func (r *Role) DeleteManyTx(ctx context.Context, tx *ent.Tx, where ent.RoleWhereInput) (int, error)

func (*Role) DeleteTx

func (r *Role) DeleteTx(ctx context.Context, tx *ent.Tx, where ent.RoleWhereUniqueInput) (*ent.Role, error)

func (*Role) Get

func (r *Role) Get(ctx context.Context, where *ent.RoleWhereInput, orderBy *ent.RoleOrder, skip *int, first *int, last *int) ([]*ent.Role, error)

func (*Role) GetOne

func (r *Role) GetOne(ctx context.Context, where ent.RoleWhereUniqueInput) (*ent.Role, error)

func (*Role) GetOneTx

func (r *Role) GetOneTx(ctx context.Context, tx *ent.Tx, where ent.RoleWhereUniqueInput) (*ent.Role, error)

func (*Role) GetTx

func (r *Role) GetTx(ctx context.Context, tx *ent.Tx, where *ent.RoleWhereInput, orderBy *ent.RoleOrder, skip *int, first *int, last *int) ([]*ent.Role, error)

func (*Role) Update

func (r *Role) Update(ctx context.Context, where ent.RoleWhereUniqueInput, data ent.UpdateRoleInput) (*ent.Role, error)

func (*Role) UpdateMany

func (r *Role) UpdateMany(ctx context.Context, where ent.RoleWhereInput, data ent.UpdateRoleInput) (int, error)

func (*Role) UpdateManyTx

func (r *Role) UpdateManyTx(ctx context.Context, tx *ent.Tx, where ent.RoleWhereInput, data ent.UpdateRoleInput) (int, error)

func (*Role) UpdateTx

func (r *Role) UpdateTx(ctx context.Context, tx *ent.Tx, where ent.RoleWhereUniqueInput, data ent.UpdateRoleInput) (*ent.Role, error)

func (*Role) Upsert

func (r *Role) Upsert(ctx context.Context, data ent.CreateRoleInput) (upsertedRole *ent.Role, err error)

func (*Role) UpsertMany

func (r *Role) UpsertMany(ctx context.Context, data []ent.CreateRoleInput) (int, error)

func (*Role) UpsertManyTx

func (r *Role) UpsertManyTx(ctx context.Context, tx *ent.Tx, data []ent.CreateRoleInput) (int, error)

func (*Role) UpsertTx

func (r *Role) UpsertTx(ctx context.Context, tx *ent.Tx, data ent.CreateRoleInput) (upsertedRole *ent.Role, err error)

type Tx

type Tx struct {
	// contains filtered or unexported fields
}

func NewTx

func NewTx(c *ent.Client) *Tx

func (*Tx) Commit

func (r *Tx) Commit(ctx context.Context, tx *ent.Tx) error

func (*Tx) Create

func (r *Tx) Create(ctx context.Context) (*ent.Tx, error)

type Txer

type Txer interface {
	Create(ctx context.Context) (*ent.Tx, error)
	Commit(ctx context.Context, tx *ent.Tx) error
}

type User

type User struct {
	// contains filtered or unexported fields
}

func NewUser

func NewUser(c *ent.Client) *User

func (*User) Connection

func (r *User) Connection(ctx context.Context, where *ent.UserWhereInput, orderBy *ent.UserOrder, skip *int, first *int, last *int) (*ent.UserConnection, error)

func (*User) Create

func (r *User) Create(ctx context.Context, data ent.CreateUserInput) (*ent.User, error)

func (*User) CreateMany

func (r *User) CreateMany(ctx context.Context, data []ent.CreateUserInput) ([]*ent.User, error)

func (*User) CreateManyTx

func (r *User) CreateManyTx(ctx context.Context, tx *ent.Tx, data []ent.CreateUserInput) ([]*ent.User, error)

func (*User) CreateTx

func (r *User) CreateTx(ctx context.Context, tx *ent.Tx, data ent.CreateUserInput) (*ent.User, error)

func (*User) Delete

func (r *User) Delete(ctx context.Context, where ent.UserWhereUniqueInput) (*ent.User, error)

func (*User) DeleteMany

func (r *User) DeleteMany(ctx context.Context, where ent.UserWhereInput) (int, error)

func (*User) DeleteManyTx

func (r *User) DeleteManyTx(ctx context.Context, tx *ent.Tx, where ent.UserWhereInput) (int, error)

func (*User) DeleteTx

func (r *User) DeleteTx(ctx context.Context, tx *ent.Tx, where ent.UserWhereUniqueInput) (*ent.User, error)

func (*User) Get

func (r *User) Get(ctx context.Context, where *ent.UserWhereInput, orderBy *ent.UserOrder, skip *int, first *int, last *int) ([]*ent.User, error)

func (*User) GetOne

func (r *User) GetOne(ctx context.Context, where ent.UserWhereUniqueInput) (*ent.User, error)

func (*User) GetOneTx

func (r *User) GetOneTx(ctx context.Context, tx *ent.Tx, where ent.UserWhereUniqueInput) (*ent.User, error)

func (*User) GetTx

func (r *User) GetTx(ctx context.Context, tx *ent.Tx, where *ent.UserWhereInput, orderBy *ent.UserOrder, skip *int, first *int, last *int) ([]*ent.User, error)

func (*User) Update

func (r *User) Update(ctx context.Context, where ent.UserWhereUniqueInput, data ent.UpdateUserInput) (*ent.User, error)

func (*User) UpdateMany

func (r *User) UpdateMany(ctx context.Context, where ent.UserWhereInput, data ent.UpdateUserInput) (int, error)

func (*User) UpdateManyTx

func (r *User) UpdateManyTx(ctx context.Context, tx *ent.Tx, where ent.UserWhereInput, data ent.UpdateUserInput) (int, error)

func (*User) UpdateTx

func (r *User) UpdateTx(ctx context.Context, tx *ent.Tx, where ent.UserWhereUniqueInput, data ent.UpdateUserInput) (*ent.User, error)

func (*User) Upsert

func (r *User) Upsert(ctx context.Context, data ent.CreateUserInput) (upsertedUser *ent.User, err error)

func (*User) UpsertMany

func (r *User) UpsertMany(ctx context.Context, data []ent.CreateUserInput) (int, error)

func (*User) UpsertManyTx

func (r *User) UpsertManyTx(ctx context.Context, tx *ent.Tx, data []ent.CreateUserInput) (int, error)

func (*User) UpsertTx

func (r *User) UpsertTx(ctx context.Context, tx *ent.Tx, data ent.CreateUserInput) (upsertedUser *ent.User, err error)

Jump to

Keyboard shortcuts

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