feat: View (#27)

* feat: eventstore repository

* fix: remove gorm

* version

* feat: pkg

* feat: eventstore without eventstore-lib

* rename files

* gnueg

* fix: add object

* fix: global model

* feat: add global view functions

* feat(eventstore): sdk

* fix(eventstore): search query

* fix(eventstore): rename app to eventstore

* delete empty test

* remove unused func

* merge master

* fix(eventstore): tests

* fix(models): delete unused struct

* feat(eventstore): implemented push events

* feat(eventstore): overwrite context data

* feat(types): SQL-config

* feat(eventstore): options to overwrite editor

* fix: use global sql config

* fix: changes from mr

* fix: add some tests

* Update internal/eventstore/models/field.go

Co-Authored-By: livio-a <livio.a@gmail.com>

* fix(eventstore): code quality

* fix: try tests

* fix: query tests

* fix: use prepare funcs

* fix: go mod

* fix: go tests

* fix: better error func testing

* fix: merge master

* fix: changes for mr

* fix: change value to interface

* fix: searchmethods

* fix: check if value is string on equal ignore case

Co-authored-by: adlerhurst <silvan.reusser@gmail.com>
Co-authored-by: livio-a <livio.a@gmail.com>
This commit is contained in:
Fabi
2020-04-14 18:20:20 +02:00
committed by GitHub
parent 27b6aee310
commit 34e2f1bcdd
12 changed files with 1259 additions and 15 deletions

View File

@@ -1,26 +1,20 @@
package model
// code below could be generated
type SearchMethod Enum
var methods = []string{"Equals", "StartsWith", "Contains"}
type method int32
func (s method) String() string {
return methods[s]
}
type SearchMethod int32
const (
Equals method = iota
StartsWith
Contains
SEARCHMETHOD_EQUALS SearchMethod = iota
SEARCHMETHOD_STARTS_WITH
SEARCHMETHOD_CONTAINS
SEARCHMETHOD_EQUALS_IGNORE_CASE
SEARCHMETHOD_STARTS_WITH_IGNORE_CASE
SEARCHMETHOD_CONTAINS_IGNORE_CASE
)
func SearchMethodToInt(s SearchMethod) int32 {
return int32(s.(method))
return int32(s)
}
func SearchMethodFromInt(index int32) SearchMethod {
return method(index)
return SearchMethod(index)
}