demo

package
v0.0.0-...-160aec1 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2016 License: BSD-2-Clause Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const CreateHookStmt = `` /* 734-byte string literal not displayed */
View Source
const CreateIssueStmt = `` /* 238-byte string literal not displayed */
View Source
const CreateUserEmailStmt = `
CREATE UNIQUE INDEX IF NOT EXISTS user_email ON users (user_email)
`
View Source
const CreateUserLoginStmt = `
CREATE UNIQUE INDEX IF NOT EXISTS user_login ON users (user_login)
`
View Source
const CreateUserStmt = `` /* 236-byte string literal not displayed */
View Source
const DeleteHookPkeyStmt = `
DELETE FROM hooks 
WHERE hook_id=?
`
View Source
const DeleteIssuePkeyStmt = `
DELETE FROM issues 
WHERE issue_id=$1
`
View Source
const DeleteUserEmailStmt = `
DELETE FROM users 
WHERE user_email=?
`
View Source
const DeleteUserLoginStmt = `
DELETE FROM users 
WHERE user_login=?
`
View Source
const DeleteUserPkeyStmt = `
DELETE FROM users 
WHERE user_id=?
`
View Source
const InsertHookStmt = `` /* 349-byte string literal not displayed */
View Source
const InsertIssueStmt = `` /* 133-byte string literal not displayed */
View Source
const InsertUserStmt = `` /* 146-byte string literal not displayed */
View Source
const SelectHookCountStmt = `
SELECT count(1)
FROM hooks 
`
View Source
const SelectHookPkeyStmt = `` /* 333-byte string literal not displayed */
View Source
const SelectHookRangeStmt = `` /* 334-byte string literal not displayed */
View Source
const SelectHookStmt = `` /* 317-byte string literal not displayed */
View Source
const SelectIssueCountStmt = `
SELECT count(1)
FROM issues 
`
View Source
const SelectIssuePkeyStmt = `` /* 132-byte string literal not displayed */
View Source
const SelectIssueRangeStmt = `` /* 133-byte string literal not displayed */
View Source
const SelectIssueStmt = `
SELECT 
 issue_id
,issue_number
,issue_title
,issue_body
,issue_assignee
,issue_state
,issue_labels
FROM issues 
`
View Source
const SelectUserCountStmt = `
SELECT count(1)
FROM users 
`
View Source
const SelectUserEmailStmt = `` /* 147-byte string literal not displayed */
View Source
const SelectUserLoginStmt = `` /* 147-byte string literal not displayed */
View Source
const SelectUserPkeyStmt = `` /* 144-byte string literal not displayed */
View Source
const SelectUserRangeStmt = `` /* 145-byte string literal not displayed */
View Source
const SelectUserStmt = `` /* 128-byte string literal not displayed */
View Source
const UpdateHookPkeyStmt = `` /* 364-byte string literal not displayed */
View Source
const UpdateIssuePkeyStmt = `` /* 152-byte string literal not displayed */
View Source
const UpdateUserEmailStmt = `` /* 164-byte string literal not displayed */
View Source
const UpdateUserLoginStmt = `` /* 164-byte string literal not displayed */
View Source
const UpdateUserPkeyStmt = `` /* 161-byte string literal not displayed */

Variables

This section is empty.

Functions

func InsertHook

func InsertHook(db *sql.DB, query string, v *Hook) error

func InsertIssue

func InsertIssue(db *sql.DB, query string, v *Issue) error

func InsertUser

func InsertUser(db *sql.DB, query string, v *User) error

func SliceHook

func SliceHook(v *Hook) []interface{}

func SliceIssue

func SliceIssue(v *Issue) []interface{}

func SliceUser

func SliceUser(v *User) []interface{}

func UpdateHook

func UpdateHook(db *sql.DB, query string, v *Hook) error

func UpdateIssue

func UpdateIssue(db *sql.DB, query string, v *Issue) error

func UpdateUser

func UpdateUser(db *sql.DB, query string, v *User) error

Types

type Author

type Author struct {
	Name     string
	Email    string
	Username string
}

type Commit

type Commit struct {
	ID        string
	Message   string
	Timestamp string
	Author    *Author
	Committer *Author
}

type Hook

type Hook struct {
	ID         int64 `sql:"pk: true, auto: true"`
	Sha        string
	After      string
	Before     string
	Created    bool
	Deleted    bool
	Forced     bool
	HeadCommit *Commit `sql:"name: head"`
}

func ScanHook

func ScanHook(row *sql.Row) (*Hook, error)

func ScanHooks

func ScanHooks(rows *sql.Rows) ([]*Hook, error)

func SelectHook

func SelectHook(db *sql.DB, query string, args ...interface{}) (*Hook, error)

func SelectHooks

func SelectHooks(db *sql.DB, query string, args ...interface{}) ([]*Hook, error)

type Issue

type Issue struct {
	ID       int64 `sql:"pk: true, auto: true"`
	Number   int
	Title    string   `sql:"size: 512"`
	Body     string   `sql:"size: 2048"`
	Assignee string   `sql:"index: issue_assignee"`
	State    string   `sql:"size: 50"`
	Labels   []string `sql:"encode: json"`
	// contains filtered or unexported fields
}

func ScanIssue

func ScanIssue(row *sql.Row) (*Issue, error)

func ScanIssues

func ScanIssues(rows *sql.Rows) ([]*Issue, error)

func SelectIssue

func SelectIssue(db *sql.DB, query string, args ...interface{}) (*Issue, error)

func SelectIssues

func SelectIssues(db *sql.DB, query string, args ...interface{}) ([]*Issue, error)

type User

type User struct {
	ID     int64  `sql:"pk: true, auto: true"`
	Login  string `sql:"unique: user_login"`
	Email  string `sql:"unique: user_email"`
	Avatar string
	Active bool
	Admin  bool
	// contains filtered or unexported fields
}

func ScanUser

func ScanUser(row *sql.Row) (*User, error)

func ScanUsers

func ScanUsers(rows *sql.Rows) ([]*User, error)

func SelectUser

func SelectUser(db *sql.DB, query string, args ...interface{}) (*User, error)

func SelectUsers

func SelectUsers(db *sql.DB, query string, args ...interface{}) ([]*User, error)

Jump to

Keyboard shortcuts

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