repository

package
v0.0.0-...-65df244 Latest Latest
Warning

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

Go to latest
Published: May 31, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Entity

type Entity interface {
	GetId() interface{}
}

type MotionNoSQLRepository

type MotionNoSQLRepository[T Entity] struct {
	// contains filtered or unexported fields
}

func NewPortfolioRepository

func NewPortfolioRepository(ctx context.Context, mongoConnection *mongo.Client) *MotionNoSQLRepository[nosqlDomain.Portfolio]

func (MotionNoSQLRepository[T]) DeleteById

func (m MotionNoSQLRepository[T]) DeleteById(i interface{}) error

func (MotionNoSQLRepository[T]) ExistByField

func (m MotionNoSQLRepository[T]) ExistByField(s string, i interface{}) bool

func (MotionNoSQLRepository[T]) FindAll

func (m MotionNoSQLRepository[T]) FindAll(limit, page int) ([]T, error)

func (MotionNoSQLRepository[T]) FindByField

func (m MotionNoSQLRepository[T]) FindByField(s string, i interface{}) (T, error)

func (MotionNoSQLRepository[T]) FindById

func (m MotionNoSQLRepository[T]) FindById(i interface{}) (T, error)

func (MotionNoSQLRepository[T]) Save

func (m MotionNoSQLRepository[T]) Save(t T) (T, error)

type MotionRepository

type MotionRepository[T Entity] interface {
	FindById(interface{}) (T, error)
	FindByField(string, interface{}) (T, error)
	ExistByField(string, interface{}) bool
	FindAll(int, int) ([]T, error)
	DeleteById(interface{}) error
	Save(T) (T, error)
}

type MotionSQLRepository

type MotionSQLRepository[T Entity] struct {
	// contains filtered or unexported fields
}

func NewCompanyRepository

func NewCompanyRepository(conn *gorm.DB) *MotionSQLRepository[sqlDomain.Company]

func NewProfileRepository

func NewProfileRepository(conn *gorm.DB) *MotionSQLRepository[sqlDomain.Profile]

func NewRoleRepository

func NewRoleRepository(conn *gorm.DB) *MotionSQLRepository[sqlDomain.Role]

func NewSessionRepository

func NewSessionRepository(conn *gorm.DB) *MotionSQLRepository[sqlDomain.Session]

func NewUserRepository

func NewUserRepository(conn *gorm.DB) *MotionSQLRepository[sqlDomain.MotionUser]

func (MotionSQLRepository[T]) DeleteById

func (m MotionSQLRepository[T]) DeleteById(s interface{}) error

func (MotionSQLRepository[T]) ExistByField

func (m MotionSQLRepository[T]) ExistByField(field string, fieldvalue interface{}) bool

func (MotionSQLRepository[T]) FindAll

func (m MotionSQLRepository[T]) FindAll(limit, page int) ([]T, error)

func (MotionSQLRepository[T]) FindByField

func (m MotionSQLRepository[T]) FindByField(field string, fieldvalue interface{}) (T, error)

func (MotionSQLRepository[T]) FindById

func (m MotionSQLRepository[T]) FindById(s interface{}) (T, error)

func (MotionSQLRepository[T]) FindWithPreloads

func (m MotionSQLRepository[T]) FindWithPreloads(preloads string, s interface{}) (T, error)

func (MotionSQLRepository[T]) Save

func (m MotionSQLRepository[T]) Save(structValue T) (T, error)

Jump to

Keyboard shortcuts

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