genmodels

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: 5 Imported by: 0

Documentation

Overview

Package genmodels contains all entities and must also have a struct which implements entitymodel.EntityFactory.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EntityFactoryImpl

type EntityFactoryImpl struct {
}

EntityFactoryImpl create Entities by name

func (EntityFactoryImpl) DoWithAll

func (ef EntityFactoryImpl) DoWithAll(entityList interface{}, entityFunc entitymodel.DoWithEntityFunc, params ...interface{})

DoWithAll Method ranges over entities and calls entityFunc with each entity. You can serve parameters with each call to entityFunc. Attention! Maybe params should be pointers to change things outside entityFunc.

func (EntityFactoryImpl) Get

func (ef EntityFactoryImpl) Get(entityName string) (interface{}, error)

Get return entity struct by name

func (EntityFactoryImpl) GetSlice

func (ef EntityFactoryImpl) GetSlice(entityName string) (interface{}, error)

GetSlice return slice of entity struct by name

type EntityType

type EntityType int

EntityType type of entity

const (
	EntityTypeUndefined EntityType = iota
	EntityTypeContact
	EntityTypeContactAddress
	EntityTypeUser
)

func EntityTypes

func EntityTypes() []EntityType

EntityTypes ...

func ParseEntityType

func ParseEntityType(s string) EntityType

ParseEntityType ...

func (EntityType) Val

func (et EntityType) Val() string

Val the value used in html template

Jump to

Keyboard shortcuts

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