repositories

package
v0.0.0-...-be30c67 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ICRUDRepository

type ICRUDRepository interface {
	// Get
	GetOneById(id string) (*entities.DataResponse, error)

	// List
	GetList(pageNumber int, pageSize int, filter map[string]interface{}) (*entities.DataListResponse, error)

	// Create
	Create(entityModel *entities.ICRUDDataModel) (*entities.DataResponse, error)

	// Update
	Update(entityModel *entities.ICRUDDataModel) (*entities.DataResponse, error)

	// UpSert
	UpSert(filter map[string]interface{}, entityModel entities.ICRUDDataModel) (interface{}, error)

	// Delete
	Delete(entityModel *entities.ICRUDDataModel) error

	// Describe
	DescribeDataSource(schema string) map[string]interface{}
}

type IUserRepository

type IUserRepository interface {
	GetUserByEmail(email string) (*entitymodels.UserModel, error)
	GetUserByUserId(userId uint) (*entitymodels.UserModel, error)
	InsertUser(userRegisterRequest *entityuser.UserRegisterRequest) (*entityuser.UserEntity, error)
	InsertOAuth(userLoginReponse *entityuser.UserLoginResponse) error
	UpsertOAuth(userLoginReponse *entityuser.UserLoginResponse) error
	FindOneOAuthByUserId(userId uint) (*entitymodels.UserTokenModel, error)
	FindOAuthByUserIdAndAccessToken(userId uint, accessToken string) (*entitymodels.UserTokenModel, error)
	DeleteOAuthByUserId(userId uint) error
	GetUserPermissionByUserId(userId uint) (*entitymodels.UserPermissionModel, error)
}

Jump to

Keyboard shortcuts

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