repository

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ProfileRepository

type ProfileRepository interface {
	Exist(ctx context.Context, model *ent.Profile) (bool, error)
	List(ctx context.Context, limit, page int, sort string, model *ent.Profile) (total int, profiles []*ent.Profile, err error)
	Get(ctx context.Context, id uuid.UUID) (*ent.Profile, error)
	GetByUserID(ctx context.Context, userId uuid.UUID) (*ent.Profile, error)
	Create(ctx context.Context, model *ent.Profile) (*ent.Profile, error)
}

ProfileRepository interface

func NewProfileRepository

func NewProfileRepository(dbClient *ent.Client) ProfileRepository

NewProfileRepository returns an instance of `ProfileRepository`.

type UserRepository

type UserRepository interface {
	Exist(ctx context.Context, model *ent.User) (bool, error)
	List(ctx context.Context, limit, page int, sort string, model *ent.User) (total int, users []*ent.User, err error)
	Get(ctx context.Context, id uuid.UUID) (*ent.User, error)
	Create(ctx context.Context, model *ent.User) (*ent.User, error)
	Update(ctx context.Context, model *ent.User) (*ent.User, error)
	DeleteFull(ctx context.Context, model *ent.User) (*ent.User, error)
	Delete(ctx context.Context, id uuid.UUID) (*ent.User, error)
	Count(ctx context.Context) (int, error)
}

UserRepository interface

func NewUserRepository

func NewUserRepository(dbClient *ent.Client) UserRepository

NewUserRepository returns an instance of `UserRepository`.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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