Documentation ¶
Index ¶
- Variables
- type Category
- func (l *Category) BeforeInsert() error
- func (l *Category) BeforeUpdate() error
- func (s *Category) HasPK() bool
- func (s *Category) PKPointer() interface{}
- func (s *Category) PKValue() interface{}
- func (s *Category) Pointers() []interface{}
- func (s *Category) SetPK(pk interface{})deprecated
- func (s Category) String() string
- func (s *Category) Table() reform.Table
- func (s *Category) Values() []interface{}
- func (s *Category) View() reform.View
- type GroupedTranslations
- type Identifier
- func (l *Identifier) BeforeInsert() error
- func (l *Identifier) BeforeUpdate() error
- func (s *Identifier) HasPK() bool
- func (s *Identifier) PKPointer() interface{}
- func (s *Identifier) PKValue() interface{}
- func (s *Identifier) Pointers() []interface{}
- func (s *Identifier) SetPK(pk interface{})deprecated
- func (s Identifier) String() string
- func (s *Identifier) Table() reform.Table
- func (s *Identifier) Values() []interface{}
- func (s *Identifier) View() reform.View
- type Language
- func (s *Language) HasPK() bool
- func (s *Language) PKPointer() interface{}
- func (s *Language) PKValue() interface{}
- func (s *Language) Pointers() []interface{}
- func (s *Language) SetPK(pk interface{})deprecated
- func (s Language) String() string
- func (s *Language) Table() reform.Table
- func (s *Language) Values() []interface{}
- func (s *Language) View() reform.View
- type Localization
- func (u *Localization) BeforeInsert() error
- func (u *Localization) BeforeUpdate() error
- func (s *Localization) HasPK() bool
- func (s *Localization) PKPointer() interface{}
- func (s *Localization) PKValue() interface{}
- func (s *Localization) Pointers() []interface{}
- func (s *Localization) SetPK(pk interface{})deprecated
- func (s Localization) String() string
- func (s *Localization) Table() reform.Table
- func (s *Localization) Values() []interface{}
- func (s *Localization) View() reform.View
- type LocalizationIdentifier
- func (l *LocalizationIdentifier) BeforeInsert() error
- func (l *LocalizationIdentifier) BeforeUpdate() error
- func (s *LocalizationIdentifier) HasPK() bool
- func (s *LocalizationIdentifier) PKPointer() interface{}
- func (s *LocalizationIdentifier) PKValue() interface{}
- func (s *LocalizationIdentifier) Pointers() []interface{}
- func (s *LocalizationIdentifier) SetPK(pk interface{})deprecated
- func (s LocalizationIdentifier) String() string
- func (s *LocalizationIdentifier) Table() reform.Table
- func (s *LocalizationIdentifier) Values() []interface{}
- func (s *LocalizationIdentifier) View() reform.View
- type StatTranslation
- type Statistic
- type Translation
- func (u *Translation) BeforeInsert() error
- func (u *Translation) BeforeUpdate() error
- func (s *Translation) HasPK() bool
- func (s *Translation) PKPointer() interface{}
- func (s *Translation) PKValue() interface{}
- func (s *Translation) Pointers() []interface{}
- func (s *Translation) SetPK(pk interface{})deprecated
- func (s Translation) String() string
- func (s *Translation) Table() reform.Table
- func (s *Translation) Values() []interface{}
- func (s *Translation) View() reform.View
- type TranslationFile
- func (u *TranslationFile) BeforeInsert() error
- func (u *TranslationFile) BeforeUpdate() error
- func (s *TranslationFile) HasPK() bool
- func (s *TranslationFile) PKPointer() interface{}
- func (s *TranslationFile) PKValue() interface{}
- func (s *TranslationFile) Pointers() []interface{}
- func (s *TranslationFile) SetPK(pk interface{})deprecated
- func (s TranslationFile) String() string
- func (s *TranslationFile) Table() reform.Table
- func (s *TranslationFile) Values() []interface{}
- func (s *TranslationFile) View() reform.View
- type User
- func (u *User) BeforeInsert() error
- func (u *User) BeforeUpdate() error
- func (s *User) HasPK() bool
- func (s *User) PKPointer() interface{}
- func (s *User) PKValue() interface{}
- func (s *User) Pointers() []interface{}
- func (s *User) SetPK(pk interface{})deprecated
- func (s User) String() string
- func (s *User) Table() reform.Table
- func (s *User) Values() []interface{}
- func (s *User) View() reform.View
- type UserSession
- func (s *UserSession) HasPK() bool
- func (s *UserSession) PKPointer() interface{}
- func (s *UserSession) PKValue() interface{}
- func (s *UserSession) Pointers() []interface{}
- func (s *UserSession) SetPK(pk interface{})deprecated
- func (s UserSession) String() string
- func (s *UserSession) Table() reform.Table
- func (s *UserSession) Values() []interface{}
- func (s *UserSession) View() reform.View
- type Version
Constants ¶
This section is empty.
Variables ¶
var CategoryTable = &categoryTableType{ s: parse.StructInfo{ Type: "Category", SQLName: "categories", Fields: []parse.FieldInfo{ {Name: "ID", Type: "int64", Column: "id"}, {Name: "Name", Type: "string", Column: "name"}, {Name: "CreatedAt", Type: "time.Time", Column: "created_at"}, {Name: "UpdatedAt", Type: "*time.Time", Column: "updated_at"}, }, PKFieldIndex: 0, }, z: new(Category).Values(), }
CategoryTable represents categories view or table in SQL database.
var IdentifierTable = &identifierTableType{ s: parse.StructInfo{ Type: "Identifier", SQLName: "identifiers", Fields: []parse.FieldInfo{ {Name: "ID", Type: "int64", Column: "id"}, {Name: "Name", Type: "string", Column: "name"}, {Name: "ParentPath", Type: "string", Column: "parent_path"}, {Name: "Description", Type: "sql.NullString", Column: "description"}, {Name: "TextSingular", Type: "sql.NullString", Column: "text_singular"}, {Name: "TextPlural", Type: "sql.NullString", Column: "text_plural"}, {Name: "CreatorID", Type: "int64", Column: "creator_id"}, {Name: "CategoryID", Type: "sql.NullInt64", Column: "category_id"}, {Name: "Status", Type: "int64", Column: "status"}, {Name: "Platforms", Type: "string", Column: "platforms"}, {Name: "CreatedAt", Type: "time.Time", Column: "created_at"}, {Name: "UpdatedAt", Type: "*time.Time", Column: "updated_at"}, }, PKFieldIndex: 0, }, z: new(Identifier).Values(), }
IdentifierTable represents identifiers view or table in SQL database.
var LanguageTable = &languageTableType{ s: parse.StructInfo{ Type: "Language", SQLName: "languages", Fields: []parse.FieldInfo{ {Name: "ID", Type: "int64", Column: "id"}, {Name: "Locale", Type: "string", Column: "locale"}, {Name: "Name", Type: "string", Column: "name"}, }, PKFieldIndex: 0, }, z: new(Language).Values(), }
LanguageTable represents languages view or table in SQL database.
var LocalizationIdentifierTable = &localizationIdentifierTableType{ s: parse.StructInfo{ Type: "LocalizationIdentifier", SQLName: "localization_identifiers", Fields: []parse.FieldInfo{ {Name: "ID", Type: "int64", Column: "id"}, {Name: "LocalizationID", Type: "int64", Column: "localization_id"}, {Name: "IdentifierID", Type: "int64", Column: "identifier_id"}, {Name: "Status", Type: "int64", Column: "status"}, {Name: "CreatedAt", Type: "time.Time", Column: "created_at"}, {Name: "UpdatedAt", Type: "*time.Time", Column: "updated_at"}, }, PKFieldIndex: 0, }, z: new(LocalizationIdentifier).Values(), }
LocalizationIdentifierTable represents localization_identifiers view or table in SQL database.
var LocalizationTable = &localizationTableType{ s: parse.StructInfo{ Type: "Localization", SQLName: "localizations", Fields: []parse.FieldInfo{ {Name: "ID", Type: "int64", Column: "id"}, {Name: "CreatorID", Type: "int64", Column: "creator_id"}, {Name: "Locale", Type: "string", Column: "locale"}, {Name: "LanguageName", Type: "string", Column: "lang_name"}, {Name: "Status", Type: "int64", Column: "status"}, {Name: "CreatedAt", Type: "time.Time", Column: "created_at"}, {Name: "UpdatedAt", Type: "*time.Time", Column: "updated_at"}, }, PKFieldIndex: 0, }, z: new(Localization).Values(), }
LocalizationTable represents localizations view or table in SQL database.
var TranslationFileTable = &translationFileTableType{ s: parse.StructInfo{ Type: "TranslationFile", SQLName: "translation_files", Fields: []parse.FieldInfo{ {Name: "ID", Type: "int64", Column: "id"}, {Name: "LocalizationID", Type: "int64", Column: "localization_id"}, {Name: "CreatorID", Type: "int64", Column: "creator_id"}, {Name: "Name", Type: "string", Column: "name"}, {Name: "Path", Type: "string", Column: "path"}, {Name: "S3FileID", Type: "string", Column: "s3_file_id"}, {Name: "S3Bucket", Type: "string", Column: "s3_bucket"}, {Name: "Platform", Type: "int64", Column: "platform"}, {Name: "Status", Type: "int64", Column: "status"}, {Name: "StorageType", Type: "int64", Column: "storage_type"}, {Name: "CreatedAt", Type: "time.Time", Column: "created_at"}, {Name: "UpdatedAt", Type: "*time.Time", Column: "updated_at"}, }, PKFieldIndex: 0, }, z: new(TranslationFile).Values(), }
TranslationFileTable represents translation_files view or table in SQL database.
var TranslationTable = &translationTableType{ s: parse.StructInfo{ Type: "Translation", SQLName: "translations", Fields: []parse.FieldInfo{ {Name: "ID", Type: "int64", Column: "id"}, {Name: "LocalizationID", Type: "int64", Column: "localization_id"}, {Name: "IdentifierID", Type: "int64", Column: "identifier_id"}, {Name: "CreatorID", Type: "int64", Column: "creator_id"}, {Name: "Singular", Type: "sql.NullString", Column: "singular"}, {Name: "Plural", Type: "sql.NullString", Column: "plural"}, {Name: "Status", Type: "int64", Column: "status"}, {Name: "CreatedAt", Type: "time.Time", Column: "created_at"}, {Name: "UpdatedAt", Type: "*time.Time", Column: "updated_at"}, }, PKFieldIndex: 0, }, z: new(Translation).Values(), }
TranslationTable represents translations view or table in SQL database.
var UserSessionTable = &userSessionTableType{ s: parse.StructInfo{ Type: "UserSession", SQLName: "user_sessions", Fields: []parse.FieldInfo{ {Name: "ID", Type: "int64", Column: "id"}, {Name: "UserID", Type: "int64", Column: "user_id"}, {Name: "Token", Type: "string", Column: "token"}, {Name: "Active", Type: "bool", Column: "active"}, {Name: "CreatedAt", Type: "time.Time", Column: "created_at"}, }, PKFieldIndex: 0, }, z: new(UserSession).Values(), }
UserSessionTable represents user_sessions view or table in SQL database.
var UserTable = &userTableType{ s: parse.StructInfo{ Type: "User", SQLName: "users", Fields: []parse.FieldInfo{ {Name: "ID", Type: "int64", Column: "id"}, {Name: "UUIDID", Type: "string", Column: "uuid_id"}, {Name: "Email", Type: "string", Column: "email"}, {Name: "Password", Type: "string", Column: "password"}, {Name: "FirstName", Type: "sql.NullString", Column: "first_name"}, {Name: "SecondName", Type: "sql.NullString", Column: "second_name"}, {Name: "Status", Type: "int64", Column: "status"}, {Name: "Role", Type: "int64", Column: "role"}, {Name: "CreatedAt", Type: "time.Time", Column: "created_at"}, {Name: "UpdatedAt", Type: "*time.Time", Column: "updated_at"}, }, PKFieldIndex: 0, }, z: new(User).Values(), }
UserTable represents users view or table in SQL database.
Functions ¶
This section is empty.
Types ¶
type Category ¶
type Category struct { ID int64 `reform:"id,pk"` Name string `reform:"name"` CreatedAt time.Time `reform:"created_at"` UpdatedAt *time.Time `reform:"updated_at"` }
go:generate reform reform:categories
func (*Category) BeforeInsert ¶
func (*Category) BeforeUpdate ¶
func (*Category) HasPK ¶
HasPK returns true if record has non-zero primary key set, false otherwise.
func (*Category) PKPointer ¶
func (s *Category) PKPointer() interface{}
PKPointer returns a pointer to primary key field for that record. Returned interface{} value is never untyped nil.
func (*Category) PKValue ¶
func (s *Category) PKValue() interface{}
PKValue returns a value of primary key for that record. Returned interface{} value is never untyped nil.
func (*Category) Pointers ¶
func (s *Category) Pointers() []interface{}
Pointers returns a slice of pointers to struct or record fields. Returned interface{} values are never untyped nils.
func (*Category) Table ¶
func (s *Category) Table() reform.Table
Table returns Table object for that record.
type GroupedTranslations ¶
type GroupedTranslations struct { Locale string Translations []*Translation }
type Identifier ¶
type Identifier struct { ID int64 `reform:"id,pk"` Name string `reform:"name"` ParentPath string `reform:"parent_path"` Description sql.NullString `reform:"description"` TextSingular sql.NullString `reform:"text_singular"` TextPlural sql.NullString `reform:"text_plural"` CreatorID int64 `reform:"creator_id"` CategoryID sql.NullInt64 `reform:"category_id"` Status int64 `reform:"status"` Platforms string `reform:"platforms"` // example: web,ios,android CreatedAt time.Time `reform:"created_at"` UpdatedAt *time.Time `reform:"updated_at"` Creator *User Category *Category }
go:generate reform reform:identifiers
func (*Identifier) BeforeInsert ¶
func (l *Identifier) BeforeInsert() error
func (*Identifier) BeforeUpdate ¶
func (l *Identifier) BeforeUpdate() error
func (*Identifier) HasPK ¶
func (s *Identifier) HasPK() bool
HasPK returns true if record has non-zero primary key set, false otherwise.
func (*Identifier) PKPointer ¶
func (s *Identifier) PKPointer() interface{}
PKPointer returns a pointer to primary key field for that record. Returned interface{} value is never untyped nil.
func (*Identifier) PKValue ¶
func (s *Identifier) PKValue() interface{}
PKValue returns a value of primary key for that record. Returned interface{} value is never untyped nil.
func (*Identifier) Pointers ¶
func (s *Identifier) Pointers() []interface{}
Pointers returns a slice of pointers to struct or record fields. Returned interface{} values are never untyped nils.
func (*Identifier) SetPK
deprecated
func (s *Identifier) SetPK(pk interface{})
SetPK sets record primary key, if possible.
Deprecated: prefer direct field assignment where possible: s.ID = pk.
func (Identifier) String ¶
func (s Identifier) String() string
String returns a string representation of this struct or record.
func (*Identifier) Table ¶
func (s *Identifier) Table() reform.Table
Table returns Table object for that record.
func (*Identifier) Values ¶
func (s *Identifier) Values() []interface{}
Values returns a slice of struct or record field values. Returned interface{} values are never untyped nils.
func (*Identifier) View ¶
func (s *Identifier) View() reform.View
View returns View object for that struct.
type Language ¶
type Language struct { ID int64 `reform:"id,pk"` Locale string `reform:"locale"` Name string `reform:"name"` }
go:generate reform reform:languages
func (*Language) HasPK ¶
HasPK returns true if record has non-zero primary key set, false otherwise.
func (*Language) PKPointer ¶
func (s *Language) PKPointer() interface{}
PKPointer returns a pointer to primary key field for that record. Returned interface{} value is never untyped nil.
func (*Language) PKValue ¶
func (s *Language) PKValue() interface{}
PKValue returns a value of primary key for that record. Returned interface{} value is never untyped nil.
func (*Language) Pointers ¶
func (s *Language) Pointers() []interface{}
Pointers returns a slice of pointers to struct or record fields. Returned interface{} values are never untyped nils.
func (*Language) Table ¶
func (s *Language) Table() reform.Table
Table returns Table object for that record.
type Localization ¶
type Localization struct { ID int64 `reform:"id,pk"` CreatorID int64 `reform:"creator_id"` Locale string `reform:"locale"` LanguageName string `reform:"lang_name"` Status int64 `reform:"status"` CreatedAt time.Time `reform:"created_at"` UpdatedAt *time.Time `reform:"updated_at"` Creator *User }
go:generate reform reform:localizations
func (*Localization) BeforeInsert ¶
func (u *Localization) BeforeInsert() error
func (*Localization) BeforeUpdate ¶
func (u *Localization) BeforeUpdate() error
func (*Localization) HasPK ¶
func (s *Localization) HasPK() bool
HasPK returns true if record has non-zero primary key set, false otherwise.
func (*Localization) PKPointer ¶
func (s *Localization) PKPointer() interface{}
PKPointer returns a pointer to primary key field for that record. Returned interface{} value is never untyped nil.
func (*Localization) PKValue ¶
func (s *Localization) PKValue() interface{}
PKValue returns a value of primary key for that record. Returned interface{} value is never untyped nil.
func (*Localization) Pointers ¶
func (s *Localization) Pointers() []interface{}
Pointers returns a slice of pointers to struct or record fields. Returned interface{} values are never untyped nils.
func (*Localization) SetPK
deprecated
func (s *Localization) SetPK(pk interface{})
SetPK sets record primary key, if possible.
Deprecated: prefer direct field assignment where possible: s.ID = pk.
func (Localization) String ¶
func (s Localization) String() string
String returns a string representation of this struct or record.
func (*Localization) Table ¶
func (s *Localization) Table() reform.Table
Table returns Table object for that record.
func (*Localization) Values ¶
func (s *Localization) Values() []interface{}
Values returns a slice of struct or record field values. Returned interface{} values are never untyped nils.
func (*Localization) View ¶
func (s *Localization) View() reform.View
View returns View object for that struct.
type LocalizationIdentifier ¶
type LocalizationIdentifier struct { ID int64 `reform:"id,pk"` LocalizationID int64 `reform:"localization_id"` IdentifierID int64 `reform:"identifier_id"` Status int64 `reform:"status"` CreatedAt time.Time `reform:"created_at"` UpdatedAt *time.Time `reform:"updated_at"` Localization *Localization Identifier *Identifier }
go:generate reform reform:localization_identifiers
func (*LocalizationIdentifier) BeforeInsert ¶
func (l *LocalizationIdentifier) BeforeInsert() error
func (*LocalizationIdentifier) BeforeUpdate ¶
func (l *LocalizationIdentifier) BeforeUpdate() error
func (*LocalizationIdentifier) HasPK ¶
func (s *LocalizationIdentifier) HasPK() bool
HasPK returns true if record has non-zero primary key set, false otherwise.
func (*LocalizationIdentifier) PKPointer ¶
func (s *LocalizationIdentifier) PKPointer() interface{}
PKPointer returns a pointer to primary key field for that record. Returned interface{} value is never untyped nil.
func (*LocalizationIdentifier) PKValue ¶
func (s *LocalizationIdentifier) PKValue() interface{}
PKValue returns a value of primary key for that record. Returned interface{} value is never untyped nil.
func (*LocalizationIdentifier) Pointers ¶
func (s *LocalizationIdentifier) Pointers() []interface{}
Pointers returns a slice of pointers to struct or record fields. Returned interface{} values are never untyped nils.
func (*LocalizationIdentifier) SetPK
deprecated
func (s *LocalizationIdentifier) SetPK(pk interface{})
SetPK sets record primary key, if possible.
Deprecated: prefer direct field assignment where possible: s.ID = pk.
func (LocalizationIdentifier) String ¶
func (s LocalizationIdentifier) String() string
String returns a string representation of this struct or record.
func (*LocalizationIdentifier) Table ¶
func (s *LocalizationIdentifier) Table() reform.Table
Table returns Table object for that record.
func (*LocalizationIdentifier) Values ¶
func (s *LocalizationIdentifier) Values() []interface{}
Values returns a slice of struct or record field values. Returned interface{} values are never untyped nils.
func (*LocalizationIdentifier) View ¶
func (s *LocalizationIdentifier) View() reform.View
View returns View object for that struct.
type StatTranslation ¶
type Statistic ¶
type Statistic struct { CountUsers int64 CountCategories int64 CountIdentifiers int64 CountLocalizations int64 StatTranslations []*StatTranslation }
type Translation ¶
type Translation struct { ID int64 `reform:"id,pk"` LocalizationID int64 `reform:"localization_id"` IdentifierID int64 `reform:"identifier_id"` CreatorID int64 `reform:"creator_id"` Singular sql.NullString `reform:"singular"` Plural sql.NullString `reform:"plural"` Status int64 `reform:"status"` CreatedAt time.Time `reform:"created_at"` UpdatedAt *time.Time `reform:"updated_at"` Localization *Localization Identifier *Identifier Creator *User }
go:generate reform reform:translations
func (*Translation) BeforeInsert ¶
func (u *Translation) BeforeInsert() error
func (*Translation) BeforeUpdate ¶
func (u *Translation) BeforeUpdate() error
func (*Translation) HasPK ¶
func (s *Translation) HasPK() bool
HasPK returns true if record has non-zero primary key set, false otherwise.
func (*Translation) PKPointer ¶
func (s *Translation) PKPointer() interface{}
PKPointer returns a pointer to primary key field for that record. Returned interface{} value is never untyped nil.
func (*Translation) PKValue ¶
func (s *Translation) PKValue() interface{}
PKValue returns a value of primary key for that record. Returned interface{} value is never untyped nil.
func (*Translation) Pointers ¶
func (s *Translation) Pointers() []interface{}
Pointers returns a slice of pointers to struct or record fields. Returned interface{} values are never untyped nils.
func (*Translation) SetPK
deprecated
func (s *Translation) SetPK(pk interface{})
SetPK sets record primary key, if possible.
Deprecated: prefer direct field assignment where possible: s.ID = pk.
func (Translation) String ¶
func (s Translation) String() string
String returns a string representation of this struct or record.
func (*Translation) Table ¶
func (s *Translation) Table() reform.Table
Table returns Table object for that record.
func (*Translation) Values ¶
func (s *Translation) Values() []interface{}
Values returns a slice of struct or record field values. Returned interface{} values are never untyped nils.
func (*Translation) View ¶
func (s *Translation) View() reform.View
View returns View object for that struct.
type TranslationFile ¶
type TranslationFile struct { ID int64 `reform:"id,pk"` LocalizationID int64 `reform:"localization_id"` CreatorID int64 `reform:"creator_id"` Name string `reform:"name"` Path string `reform:"path"` S3FileID string `reform:"s3_file_id"` S3Bucket string `reform:"s3_bucket"` Platform int64 `reform:"platform"` Status int64 `reform:"status"` StorageType int64 `reform:"storage_type"` CreatedAt time.Time `reform:"created_at"` UpdatedAt *time.Time `reform:"updated_at"` Localization *Localization Creator *User }
go:generate reform reform:translation_files
func (*TranslationFile) BeforeInsert ¶
func (u *TranslationFile) BeforeInsert() error
func (*TranslationFile) BeforeUpdate ¶
func (u *TranslationFile) BeforeUpdate() error
func (*TranslationFile) HasPK ¶
func (s *TranslationFile) HasPK() bool
HasPK returns true if record has non-zero primary key set, false otherwise.
func (*TranslationFile) PKPointer ¶
func (s *TranslationFile) PKPointer() interface{}
PKPointer returns a pointer to primary key field for that record. Returned interface{} value is never untyped nil.
func (*TranslationFile) PKValue ¶
func (s *TranslationFile) PKValue() interface{}
PKValue returns a value of primary key for that record. Returned interface{} value is never untyped nil.
func (*TranslationFile) Pointers ¶
func (s *TranslationFile) Pointers() []interface{}
Pointers returns a slice of pointers to struct or record fields. Returned interface{} values are never untyped nils.
func (*TranslationFile) SetPK
deprecated
func (s *TranslationFile) SetPK(pk interface{})
SetPK sets record primary key, if possible.
Deprecated: prefer direct field assignment where possible: s.ID = pk.
func (TranslationFile) String ¶
func (s TranslationFile) String() string
String returns a string representation of this struct or record.
func (*TranslationFile) Table ¶
func (s *TranslationFile) Table() reform.Table
Table returns Table object for that record.
func (*TranslationFile) Values ¶
func (s *TranslationFile) Values() []interface{}
Values returns a slice of struct or record field values. Returned interface{} values are never untyped nils.
func (*TranslationFile) View ¶
func (s *TranslationFile) View() reform.View
View returns View object for that struct.
type User ¶
type User struct { ID int64 `reform:"id,pk"` UUIDID string `reform:"uuid_id"` Email string `reform:"email"` Password string `reform:"password"` FirstName sql.NullString `reform:"first_name"` SecondName sql.NullString `reform:"second_name"` Status int64 `reform:"status"` Role int64 `reform:"role"` CreatedAt time.Time `reform:"created_at"` UpdatedAt *time.Time `reform:"updated_at"` }
go:generate reform reform:users
func (*User) BeforeInsert ¶
func (*User) BeforeUpdate ¶
func (*User) PKPointer ¶
func (s *User) PKPointer() interface{}
PKPointer returns a pointer to primary key field for that record. Returned interface{} value is never untyped nil.
func (*User) PKValue ¶
func (s *User) PKValue() interface{}
PKValue returns a value of primary key for that record. Returned interface{} value is never untyped nil.
func (*User) Pointers ¶
func (s *User) Pointers() []interface{}
Pointers returns a slice of pointers to struct or record fields. Returned interface{} values are never untyped nils.
func (*User) Table ¶
func (s *User) Table() reform.Table
Table returns Table object for that record.
type UserSession ¶
type UserSession struct { ID int64 `reform:"id,pk"` UserID int64 `reform:"user_id"` Token string `reform:"token"` Active bool `reform:"active"` CreatedAt time.Time `reform:"created_at"` User *User }
go:generate reform reform:user_sessions
func (*UserSession) HasPK ¶
func (s *UserSession) HasPK() bool
HasPK returns true if record has non-zero primary key set, false otherwise.
func (*UserSession) PKPointer ¶
func (s *UserSession) PKPointer() interface{}
PKPointer returns a pointer to primary key field for that record. Returned interface{} value is never untyped nil.
func (*UserSession) PKValue ¶
func (s *UserSession) PKValue() interface{}
PKValue returns a value of primary key for that record. Returned interface{} value is never untyped nil.
func (*UserSession) Pointers ¶
func (s *UserSession) Pointers() []interface{}
Pointers returns a slice of pointers to struct or record fields. Returned interface{} values are never untyped nils.
func (*UserSession) SetPK
deprecated
func (s *UserSession) SetPK(pk interface{})
SetPK sets record primary key, if possible.
Deprecated: prefer direct field assignment where possible: s.ID = pk.
func (UserSession) String ¶
func (s UserSession) String() string
String returns a string representation of this struct or record.
func (*UserSession) Table ¶
func (s *UserSession) Table() reform.Table
Table returns Table object for that record.
func (*UserSession) Values ¶
func (s *UserSession) Values() []interface{}
Values returns a slice of struct or record field values. Returned interface{} values are never untyped nils.
func (*UserSession) View ¶
func (s *UserSession) View() reform.View
View returns View object for that struct.
Source Files ¶
- category.go
- category_reform.go
- identifier.go
- identifier_reform.go
- language.go
- language_reform.go
- local_ids.go
- local_ids_reform.go
- localization.go
- localization_reform.go
- statistic.go
- translate.go
- translate_reform.go
- translation_file.go
- translation_file_reform.go
- user.go
- user_reform.go
- user_session.go
- user_session_reform.go
- version.go