Documentation ¶
Index ¶
- Constants
- Variables
- type Build
- func (b *Build) BeforeInsert() error
- func (b *Build) BeforeUpdate() error
- func (s *Build) HasPK() bool
- func (s *Build) PKPointer() interface{}
- func (s *Build) PKValue() interface{}
- func (s *Build) Pointers() []interface{}
- func (s *Build) SetPK(pk interface{})
- func (s Build) String() string
- func (s *Build) Table() reform.Table
- func (s *Build) Values() []interface{}
- func (s *Build) View() reform.View
- type Installation
- func (i *Installation) BeforeInsert() error
- func (i *Installation) BeforeUpdate() error
- func (s *Installation) HasPK() bool
- func (s *Installation) PKPointer() interface{}
- func (s *Installation) PKValue() interface{}
- func (s *Installation) Pointers() []interface{}
- func (s *Installation) SetPK(pk interface{})
- func (s Installation) String() string
- func (s *Installation) Table() reform.Table
- func (s *Installation) Values() []interface{}
- func (s *Installation) View() reform.View
Constants ¶
const (
SourceGitHub = "github"
)
Possible types of sources
Variables ¶
var BuildTable = &buildTableType{ s: parse.StructInfo{Type: "Build", SQLSchema: "", SQLName: "builds", Fields: []parse.FieldInfo{{Name: "ID", Type: "int64", Column: "id"}, {Name: "UUID", Type: "string", Column: "uuid"}, {Name: "Username", Type: "string", Column: "username"}, {Name: "Repository", Type: "string", Column: "repository"}, {Name: "Commit", Type: "string", Column: "commit"}, {Name: "Passed", Type: "bool", Column: "passed"}, {Name: "Log", Type: "string", Column: "log"}, {Name: "CreatedAt", Type: "time.Time", Column: "created_at"}, {Name: "UpdatedAt", Type: "time.Time", Column: "updated_at"}}, PKFieldIndex: 0}, z: new(Build).Values(), }
BuildTable represents builds view or table in SQL database.
var InstallationTable = &installationTableType{ s: parse.StructInfo{Type: "Installation", SQLSchema: "", SQLName: "installations", Fields: []parse.FieldInfo{{Name: "ID", Type: "int64", Column: "id"}, {Name: "Username", Type: "string", Column: "username"}, {Name: "InstallationID", Type: "int", Column: "installation_id"}, {Name: "CreatedAt", Type: "time.Time", Column: "created_at"}, {Name: "UpdatedAt", Type: "time.Time", Column: "updated_at"}}, PKFieldIndex: 0}, z: new(Installation).Values(), }
InstallationTable represents installations view or table in SQL database.
Functions ¶
This section is empty.
Types ¶
type Build ¶
type Build struct { ID int64 `reform:"id,pk" json:"-"` UUID string `reform:"uuid" json:"uuid"` Username string `reform:"username" json:"username"` Repository string `reform:"repository" json:"repository"` Commit string `reform:"commit" json:"commit"` Passed bool `reform:"passed" json:"passed"` Log string `reform:"log" json:"log"` CreatedAt time.Time `reform:"created_at" json:"created_at"` UpdatedAt time.Time `reform:"updated_at" json:"updated_at"` }
func (*Build) BeforeInsert ¶
BeforeInsert set CreatedAt and UpdatedAt.
func (*Build) PKPointer ¶
func (s *Build) PKPointer() interface{}
PKPointer returns a pointer to primary key field for that record. Returned interface{} value is never untyped nil.
func (*Build) PKValue ¶
func (s *Build) PKValue() interface{}
PKValue returns a value of primary key for that record. Returned interface{} value is never untyped nil.
func (*Build) Pointers ¶
func (s *Build) Pointers() []interface{}
Pointers returns a slice of pointers to struct or record fields. Returned interface{} values are never untyped nils.
func (*Build) Table ¶
func (s *Build) Table() reform.Table
Table returns Table object for that record.
type Installation ¶
type Installation struct { ID int64 `reform:"id,pk"` Username string `reform:"username"` InstallationID int `reform:"installation_id"` CreatedAt time.Time `reform:"created_at"` UpdatedAt time.Time `reform:"updated_at"` }
func (*Installation) BeforeInsert ¶
func (i *Installation) BeforeInsert() error
BeforeInsert set CreatedAt and UpdatedAt.
func (*Installation) BeforeUpdate ¶
func (i *Installation) BeforeUpdate() error
BeforeUpdate set UpdatedAt.
func (*Installation) HasPK ¶
func (s *Installation) HasPK() bool
HasPK returns true if record has non-zero primary key set, false otherwise.
func (*Installation) PKPointer ¶
func (s *Installation) PKPointer() interface{}
PKPointer returns a pointer to primary key field for that record. Returned interface{} value is never untyped nil.
func (*Installation) PKValue ¶
func (s *Installation) PKValue() interface{}
PKValue returns a value of primary key for that record. Returned interface{} value is never untyped nil.
func (*Installation) Pointers ¶
func (s *Installation) Pointers() []interface{}
Pointers returns a slice of pointers to struct or record fields. Returned interface{} values are never untyped nils.
func (*Installation) SetPK ¶
func (s *Installation) SetPK(pk interface{})
SetPK sets record primary key.
func (Installation) String ¶
func (s Installation) String() string
String returns a string representation of this struct or record.
func (*Installation) Table ¶
func (s *Installation) Table() reform.Table
Table returns Table object for that record.
func (*Installation) Values ¶
func (s *Installation) Values() []interface{}
Values returns a slice of struct or record field values. Returned interface{} values are never untyped nils.
func (*Installation) View ¶
func (s *Installation) View() reform.View
View returns View object for that struct.