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: 0

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