store

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2020 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsUniqueConstraintError

func IsUniqueConstraintError(err string, indexName []string) bool

Types

type IssueStore

type IssueStore interface {
	Save(issue *model.Issue) (*model.Issue, error)
	Get(repoOwner, repoName string, number int) (*model.Issue, error)
}

func NewSQLIssueStore

func NewSQLIssueStore(sqlStore *SQLStore) IssueStore

type PullRequestStore

type PullRequestStore interface {
	Save(pr *model.PullRequest) (*model.PullRequest, error)
	Get(repoOwner, repoName string, number int) (*model.PullRequest, error)
	ListOpen() ([]*model.PullRequest, error)
}

func NewSQLPullRequestStore

func NewSQLPullRequestStore(sqlStore *SQLStore) PullRequestStore

type SQLIssueStore

type SQLIssueStore struct {
	*SQLStore
}

func (SQLIssueStore) CreateIndexesIfNotExists

func (s SQLIssueStore) CreateIndexesIfNotExists()

func (SQLIssueStore) Get

func (s SQLIssueStore) Get(repoOwner, repoName string, number int) (*model.Issue, error)

func (SQLIssueStore) Save

func (s SQLIssueStore) Save(issue *model.Issue) (*model.Issue, error)

type SQLPullRequestStore

type SQLPullRequestStore struct {
	*SQLStore
}

func (SQLPullRequestStore) CreateIndexesIfNotExists

func (s SQLPullRequestStore) CreateIndexesIfNotExists()

func (SQLPullRequestStore) Get

func (s SQLPullRequestStore) Get(repoOwner, repoName string, number int) (*model.PullRequest, error)

func (SQLPullRequestStore) ListOpen

func (s SQLPullRequestStore) ListOpen() ([]*model.PullRequest, error)

func (SQLPullRequestStore) Save

type SQLSpinmintStore

type SQLSpinmintStore struct {
	*SQLStore
}

func (SQLSpinmintStore) CreateIndexesIfNotExists

func (s SQLSpinmintStore) CreateIndexesIfNotExists()

func (SQLSpinmintStore) Delete

func (s SQLSpinmintStore) Delete(instanceID string) error

func (SQLSpinmintStore) Get

func (s SQLSpinmintStore) Get(prNumber int, repoName string) (*model.Spinmint, error)

func (SQLSpinmintStore) List

func (s SQLSpinmintStore) List() ([]*model.Spinmint, error)

func (SQLSpinmintStore) Save

func (s SQLSpinmintStore) Save(spinmint *model.Spinmint) (*model.Spinmint, error)

type SQLStore

type SQLStore struct {
	SchemaVersion string
	// contains filtered or unexported fields
}

func (*SQLStore) AlterColumnTypeIfExists

func (ss *SQLStore) AlterColumnTypeIfExists(tableName string, columnName string, mySQLColType string, postgresColType string) bool

func (*SQLStore) Close

func (ss *SQLStore) Close()

func (*SQLStore) CreateColumnIfNotExists

func (ss *SQLStore) CreateColumnIfNotExists(tableName string, columnName string, mySQLColType string, postgresColType string, defaultValue string) bool

func (*SQLStore) CreateFullTextIndexIfNotExists

func (ss *SQLStore) CreateFullTextIndexIfNotExists(indexName string, tableName string, columnName string) bool

func (*SQLStore) CreateIndexIfNotExists

func (ss *SQLStore) CreateIndexIfNotExists(indexName string, tableName string, columnName string) bool

func (*SQLStore) CreateUniqueIndexIfNotExists

func (ss *SQLStore) CreateUniqueIndexIfNotExists(indexName string, tableName string, columnName string) bool

func (*SQLStore) DoesColumnExist

func (ss *SQLStore) DoesColumnExist(tableName string, columnName string) bool

func (*SQLStore) DoesTableExist

func (ss *SQLStore) DoesTableExist(tableName string) bool

func (*SQLStore) DropAllTables

func (ss *SQLStore) DropAllTables()

func (*SQLStore) GetAllConns

func (ss *SQLStore) GetAllConns() []*gorp.DbMap

func (*SQLStore) GetMaster

func (ss *SQLStore) GetMaster() *gorp.DbMap

func (*SQLStore) GetMaxLengthOfColumnIfExists

func (ss *SQLStore) GetMaxLengthOfColumnIfExists(tableName string, columnName string) string

func (*SQLStore) GetReplica

func (ss *SQLStore) GetReplica() *gorp.DbMap

func (*SQLStore) Issue

func (ss *SQLStore) Issue() IssueStore

func (*SQLStore) PullRequest

func (ss *SQLStore) PullRequest() PullRequestStore

func (*SQLStore) RemoveColumnIfExists

func (ss *SQLStore) RemoveColumnIfExists(tableName string, columnName string) bool

func (*SQLStore) RemoveIndexIfExists

func (ss *SQLStore) RemoveIndexIfExists(indexName string, tableName string) bool

func (*SQLStore) RenameColumnIfExists

func (ss *SQLStore) RenameColumnIfExists(tableName string, oldColumnName string, newColumnName string, colType string) bool

func (*SQLStore) Spinmint

func (ss *SQLStore) Spinmint() SpinmintStore

type SpinmintStore

type SpinmintStore interface {
	Save(spinmint *model.Spinmint) (*model.Spinmint, error)
	Delete(instanceID string) error
	Get(prNumber int, repoName string) (*model.Spinmint, error)
	List() ([]*model.Spinmint, error)
}

func NewSQLSpinmintStore

func NewSQLSpinmintStore(sqlStore *SQLStore) SpinmintStore

type Store

type Store interface {
	PullRequest() PullRequestStore
	Issue() IssueStore
	Spinmint() SpinmintStore
	Close()
	DropAllTables()
}

func NewSQLStore

func NewSQLStore(driverName, dataSource string) Store

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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