Documentation ¶
Index ¶
- Variables
- func CommitData()
- func CreatePath(objectInterfaceStructPtr interface{}, path string) (interface{}, error)
- func DisplayCache(cache cacheSQL)
- func GetCache(object interface{}, fieldIndexName string, values ...string) (interface{}, error)
- func GetPath(pathInterfaceStructPtr interface{}, path string) (interface{}, error)
- func InsertCache(object interface{}) error
- func SaveData(data interface{}) error
- func SavePath(pathInterfaceStructPtr interface{}) (pathInterfaceStructPtrInCache interface{}, err error)
- type FileTemplate
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // SEPARATOR_FIELDS filedName/value into string transformation cache SEPARATOR_FIELDS string = "||" // ErrRecordNotFound record not found error ErrRecordNotFound = gorm.ErrRecordNotFound // ErrRecordNotFound stucture not found error ErrStructureNotFound = fmt.Errorf("Impossible trouver la structure") // ErrErrNotPointer ErrErrNotPointer = fmt.Errorf("LA structure n'est pas un pointer") )
View Source
var DB *gorm.DB
View Source
var DEBUG bool
View Source
var ErrRecordExistCache error = fmt.Errorf("Record Exist into cache")
Functions ¶
func CommitData ¶
func CommitData()
func CreatePath ¶
Create Path into cache
func DisplayCache ¶
func DisplayCache(cache cacheSQL)
func InsertCache ¶
func InsertCache(object interface{}) error
Types ¶
type FileTemplate ¶
type FileTemplate struct { ID uint `gorm:"primarykey"` ParentID uint `gorm:"index:idx_parentid_name,unique"` Name string `gorm:"index:idx_parentid_name,unique"` // Path: Indicatif Path string `gorm:"-"` // contains filtered or unexported fields }
func (*FileTemplate) GetPathParent ¶
func (fileTemplate *FileTemplate) GetPathParent() (pathParent string)
GetParent
func (FileTemplate) ListKeyUnique ¶
func (fileTemplate FileTemplate) ListKeyUnique() []string
ListKeyUnique: List index into cache memory
Click to show internal directories.
Click to hide internal directories.