Documentation
¶
Index ¶
- type Model
- func (model *Model) Create(fields map[string]string) map[string]string
- func (model *Model) Db() *sql.DB
- func (model *Model) Delete(id int) map[string]any
- func (model *Model) GetList(params map[string]string, additionalFilters []map[string]any) customStructs.ListResponse
- func (model *Model) GetOneByField(field, value, withRelation string) customStructs.SimpleResponse
- func (model *Model) GetOneById(id int) customStructs.SimpleResponse
- func (model *Model) Save() map[string]string
- func (model *Model) SetDb(db *sql.DB)
- func (model *Model) SetTable(tableTitle string)
- func (model *Model) Table() string
- func (model *Model) Update(fields map[string]string, id string) map[string]string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Model ¶
type Model struct {
Fields, FieldTypes map[string]string
GuardedFields []string
// contains filtered or unexported fields
}
func (*Model) GetList ¶
func (model *Model) GetList(params map[string]string, additionalFilters []map[string]any) customStructs.ListResponse
func (*Model) GetOneByField ¶
func (model *Model) GetOneByField(field, value, withRelation string) customStructs.SimpleResponse
func (*Model) GetOneById ¶
func (model *Model) GetOneById(id int) customStructs.SimpleResponse
Click to show internal directories.
Click to hide internal directories.