github.com/angryronald/go-kit@v0.0.0-20240505173814-ff2bd9c79dbf/generic/repository/generic.constant.go (about) 1 package repository 2 3 import "errors" 4 5 type OrderBy string 6 type ConditionalOperation string 7 type RelationalOperation string 8 type RepositoryError error 9 10 const ( 11 ASC OrderBy = "ASC" 12 DESC OrderBy = "DESC" 13 14 EQUAL_WITH ConditionalOperation = "=" 15 LIKE ConditionalOperation = "LIKE" 16 ILIKE ConditionalOperation = "ILIKE" 17 GREATER_THAN ConditionalOperation = ">" 18 GREATER_THAN_EQUAL ConditionalOperation = ">=" 19 LESS_THAN ConditionalOperation = "<" 20 LESS_THAN_EQUAL ConditionalOperation = "<=" 21 IS ConditionalOperation = "IS" 22 NOT ConditionalOperation = "NOT" 23 IS_NOT ConditionalOperation = "IS NOT" 24 IN ConditionalOperation = "IN" 25 26 AND RelationalOperation = "AND" 27 OR RelationalOperation = "OR" 28 ) 29 30 var ( 31 ErrBadParameters RepositoryError = errors.New("parameters or conditional operation or relational operation number is not valid") 32 ErrNotImplement RepositoryError = errors.New("the operation or the function is not implemented") 33 ErrNotFound RepositoryError = errors.New("not found") 34 ErrOperationIsNotAllowed RepositoryError = errors.New("the parameters for memcached operation must be all keyIndetifiers or all filtered parameters") 35 ErrConflict RepositoryError = errors.New("conflict") 36 ErrPropertyNotFound RepositoryError = errors.New("property not found") 37 ErrPropertyTypeNotMatch RepositoryError = errors.New("property type not match") 38 )