Documentation ¶
Index ¶
- Constants
- Variables
- 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{})
- func (s User) String() string
- func (s *User) Table() reform.Table
- func (s *User) Values() []interface{}
- func (s *User) View() reform.View
Constants ¶
View Source
const (
SourceGitHub = "github"
)
Possible types of sources
Variables ¶
View Source
var UserTable = &userTableType{ s: parse.StructInfo{Type: "User", SQLSchema: "", SQLName: "users", Fields: []parse.FieldInfo{{Name: "ID", Type: "int64", Column: "id"}, {Name: "Name", Type: "string", Column: "name"}, {Name: "Source", Type: "string", Column: "source"}, {Name: "SessionID", Type: "*string", Column: "session_id"}, {Name: "SessionData", Type: "*string", Column: "session_data"}, {Name: "Token", Type: "*string", Column: "token"}, {Name: "Cert", Type: "*string", Column: "ca_crt"}, {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 User ¶
type User struct { ID int64 `reform:"id,pk"` Name string `reform:"name"` Source string `reform:"source"` SessionID *string `reform:"session_id"` SessionData *string `reform:"session_data"` Token *string `reform:"token"` Cert *string `reform:"ca_crt"` CreatedAt time.Time `reform:"created_at"` UpdatedAt time.Time `reform:"updated_at"` }
func (*User) BeforeInsert ¶
BeforeInsert set CreatedAt and UpdatedAt.
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.
Click to show internal directories.
Click to hide internal directories.