models

package
v0.0.0-...-2af298d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 29, 2019 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SourceGitHub = "github"
)

Possible types of sources

Variables

View Source
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.

View Source
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

func (b *Build) BeforeInsert() error

BeforeInsert set CreatedAt and UpdatedAt.

func (*Build) BeforeUpdate

func (b *Build) BeforeUpdate() error

BeforeUpdate set UpdatedAt.

func (*Build) HasPK

func (s *Build) HasPK() bool

HasPK returns true if record has non-zero primary key set, false otherwise.

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) SetPK

func (s *Build) SetPK(pk interface{})

SetPK sets record primary key.

func (Build) String

func (s Build) String() string

String returns a string representation of this struct or record.

func (*Build) Table

func (s *Build) Table() reform.Table

Table returns Table object for that record.

func (*Build) Values

func (s *Build) Values() []interface{}

Values returns a slice of struct or record field values. Returned interface{} values are never untyped nils.

func (*Build) View

func (s *Build) View() reform.View

View returns View object for that struct.

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL