entitymodel

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2022 License: MIT Imports: 3 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddNewEntityOption

func AddNewEntityOption(builder EntityOptionBuilder, params ...interface{})

AddNewEntityOption

Creates a new entity option and adds it to the given entityOptionList

Types

type DoWithEntityFunc

type DoWithEntityFunc func(EntityOptionBuilder, ...interface{})

type Entity

type Entity struct {
	gorm.Model
}

Entity ...

func (Entity) BuildEntityOption

func (e Entity) BuildEntityOption() dto.EntityOption

BuildEntityOption ...

func (*Entity) LoadRelatedEntities

func (e *Entity) LoadRelatedEntities(db *gorm.DB) error

LoadRelatedEntities implement this method in concrete entity

type EntityFactory

type EntityFactory interface {
	Get(entityName string) (interface{}, error)
	GetSlice(entityName string) (interface{}, error)
	DoWithAll(entityList interface{}, entityFunc DoWithEntityFunc, params ...interface{})
}

type EntityHolder

type EntityHolder interface {
	LoadRelated(db *gorm.DB) error
}

EntityHolder struct that holds entities

type EntityOptionBuilder

type EntityOptionBuilder interface {
	BuildEntityOption() dto.EntityOption
}

EntityOptionBuilder struct that can build entity options

Jump to

Keyboard shortcuts

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