db

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DB

type DB struct {
	*gorm.DB
}

DB struct offer database connection and some common table manipulations

func CreateDbConnect

func CreateDbConnect(config *config.Database) *DB

CreateDbConnect create database connect to TiDB or MySQL

func (*DB) CreatePullRequestModel

func (d *DB) CreatePullRequestModel(repo *types.Repo, pull *github.PullRequest) *types.PullRequest

CreatePullRequestModel create pull request model from github pull request

func (*DB) GetPullByNumber

func (d *DB) GetPullByNumber(repo *types.Repo, pullNumber int) (*types.PullRequest, error)

GetPullByNumber finds pull by pull number

func (*DB) PatchPullRequestModel

func (d *DB) PatchPullRequestModel(model *types.PullRequest, repo *types.Repo, pull *github.PullRequest) *types.PullRequest

PatchPullRequestModel update pull request model

func (*DB) SavePull

func (d *DB) SavePull(pull *types.PullRequest) error

SavePull creates or updates pull request

Jump to

Keyboard shortcuts

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