adsa-cms: Index | Files

package database

import ""


Package Files


func New Uses

func New(db *gorm.DB) i18n.Backend

New new DB backend for I18n

type Backend Uses

type Backend struct {
    DB *gorm.DB

Backend DB backend

func (*Backend) DeleteTranslation Uses

func (backend *Backend) DeleteTranslation(t *i18n.Translation) error

DeleteTranslation delete translation into DB backend

func (*Backend) LoadTranslations Uses

func (backend *Backend) LoadTranslations() (translations []*i18n.Translation)

LoadTranslations load translations from DB backend

func (*Backend) SaveTranslation Uses

func (backend *Backend) SaveTranslation(t *i18n.Translation) error

SaveTranslation save translation into DB backend

type Translation Uses

type Translation struct {
    Locale string `sql:"size:12;"`
    Key    string `sql:"size:4294967295;"`
    Value  string `sql:"size:4294967295"`

Translation is a struct used to save translations into databae

Package database imports 3 packages (graph) and is imported by 1 packages. Updated 2017-06-08. Refresh now. Tools for package owners.