Documentation ¶
Overview ¶
Package dao contains the data access object. Generated by protoc-ddl. protoc-gen-dao: v0.1
Index ¶
- func Desc(opt *listOpt)
- func Limit(limit int) func(opt *listOpt)
- func Sort(col string) func(*listOpt)
- type ExecOption
- type ListOption
- type Options
- type PermitPullRequest
- func (d *PermitPullRequest) Create(ctx context.Context, permitPullRequest *database.PermitPullRequest, ...) (*database.PermitPullRequest, error)
- func (d *PermitPullRequest) Delete(ctx context.Context, id int32, opt ...ExecOption) error
- func (d *PermitPullRequest) ListByRepositoryAndNumber(ctx context.Context, repository string, number int32, opt ...ListOption) ([]*database.PermitPullRequest, error)
- func (d *PermitPullRequest) Select(ctx context.Context, id int32) (*database.PermitPullRequest, error)
- func (d *PermitPullRequest) SelectMulti(ctx context.Context, id ...int32) ([]*database.PermitPullRequest, error)
- func (d *PermitPullRequest) Tx(ctx context.Context, fn func(tx *sql.Tx) error) error
- func (d *PermitPullRequest) Update(ctx context.Context, permitPullRequest *database.PermitPullRequest, ...) error
- type PermitPullRequestInterface
- type SourceRepository
- func (d *SourceRepository) Create(ctx context.Context, sourceRepository *database.SourceRepository, ...) (*database.SourceRepository, error)
- func (d *SourceRepository) Delete(ctx context.Context, id int32, opt ...ExecOption) error
- func (d *SourceRepository) ListAll(ctx context.Context, opt ...ListOption) ([]*database.SourceRepository, error)
- func (d *SourceRepository) ListByUrl(ctx context.Context, url string, opt ...ListOption) ([]*database.SourceRepository, error)
- func (d *SourceRepository) Select(ctx context.Context, id int32) (*database.SourceRepository, error)
- func (d *SourceRepository) SelectMulti(ctx context.Context, id ...int32) ([]*database.SourceRepository, error)
- func (d *SourceRepository) Tx(ctx context.Context, fn func(tx *sql.Tx) error) error
- func (d *SourceRepository) Update(ctx context.Context, sourceRepository *database.SourceRepository, ...) error
- type SourceRepositoryInterface
- type Task
- func (d *Task) Create(ctx context.Context, task *database.Task, opt ...ExecOption) (*database.Task, error)
- func (d *Task) Delete(ctx context.Context, id int32, opt ...ExecOption) error
- func (d *Task) ListAll(ctx context.Context, opt ...ListOption) ([]*database.Task, error)
- func (d *Task) ListByRepositoryId(ctx context.Context, repositoryId int32, opt ...ListOption) ([]*database.Task, error)
- func (d *Task) ListByRevision(ctx context.Context, repositoryId int32, revision string, opt ...ListOption) ([]*database.Task, error)
- func (d *Task) ListPending(ctx context.Context, opt ...ListOption) ([]*database.Task, error)
- func (d *Task) ListUniqJobName(ctx context.Context, repositoryId int32, opt ...ListOption) ([]*database.Task, error)
- func (d *Task) Select(ctx context.Context, id int32) (*database.Task, error)
- func (d *Task) SelectMulti(ctx context.Context, id ...int32) ([]*database.Task, error)
- func (d *Task) Tx(ctx context.Context, fn func(tx *sql.Tx) error) error
- func (d *Task) Update(ctx context.Context, task *database.Task, opt ...ExecOption) error
- type TaskInterface
- type TestReport
- func (d *TestReport) Create(ctx context.Context, testReport *database.TestReport, opt ...ExecOption) (*database.TestReport, error)
- func (d *TestReport) Delete(ctx context.Context, id int32, opt ...ExecOption) error
- func (d *TestReport) ListByTaskId(ctx context.Context, taskId int32, opt ...ListOption) ([]*database.TestReport, error)
- func (d *TestReport) Select(ctx context.Context, id int32) (*database.TestReport, error)
- func (d *TestReport) SelectMulti(ctx context.Context, id ...int32) ([]*database.TestReport, error)
- func (d *TestReport) Tx(ctx context.Context, fn func(tx *sql.Tx) error) error
- func (d *TestReport) Update(ctx context.Context, testReport *database.TestReport, opt ...ExecOption) error
- type TestReportInterface
- type TrustedUser
- func (d *TrustedUser) Create(ctx context.Context, trustedUser *database.TrustedUser, opt ...ExecOption) (*database.TrustedUser, error)
- func (d *TrustedUser) Delete(ctx context.Context, id int32, opt ...ExecOption) error
- func (d *TrustedUser) ListAll(ctx context.Context, opt ...ListOption) ([]*database.TrustedUser, error)
- func (d *TrustedUser) ListByGithubId(ctx context.Context, githubId int64, opt ...ListOption) ([]*database.TrustedUser, error)
- func (d *TrustedUser) Select(ctx context.Context, id int32) (*database.TrustedUser, error)
- func (d *TrustedUser) SelectMulti(ctx context.Context, id ...int32) ([]*database.TrustedUser, error)
- func (d *TrustedUser) Tx(ctx context.Context, fn func(tx *sql.Tx) error) error
- func (d *TrustedUser) Update(ctx context.Context, trustedUser *database.TrustedUser, opt ...ExecOption) error
- type TrustedUserInterface
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ExecOption ¶
type ExecOption func(opt *execOpt)
func WithTx ¶
func WithTx(tx *sql.Tx) ExecOption
type ListOption ¶
type ListOption func(opt *listOpt)
type Options ¶
type Options struct { Repository SourceRepositoryInterface Task TaskInterface TrustedUser TrustedUserInterface PermitPullRequest PermitPullRequestInterface TestReport TestReportInterface RawConnection *sql.DB }
func NewOptions ¶
type PermitPullRequest ¶
type PermitPullRequest struct {
// contains filtered or unexported fields
}
func NewPermitPullRequest ¶
func NewPermitPullRequest(conn *sql.DB) *PermitPullRequest
func (*PermitPullRequest) Create ¶
func (d *PermitPullRequest) Create(ctx context.Context, permitPullRequest *database.PermitPullRequest, opt ...ExecOption) (*database.PermitPullRequest, error)
func (*PermitPullRequest) Delete ¶
func (d *PermitPullRequest) Delete(ctx context.Context, id int32, opt ...ExecOption) error
func (*PermitPullRequest) ListByRepositoryAndNumber ¶
func (d *PermitPullRequest) ListByRepositoryAndNumber(ctx context.Context, repository string, number int32, opt ...ListOption) ([]*database.PermitPullRequest, error)
func (*PermitPullRequest) Select ¶
func (d *PermitPullRequest) Select(ctx context.Context, id int32) (*database.PermitPullRequest, error)
func (*PermitPullRequest) SelectMulti ¶
func (d *PermitPullRequest) SelectMulti(ctx context.Context, id ...int32) ([]*database.PermitPullRequest, error)
func (*PermitPullRequest) Update ¶
func (d *PermitPullRequest) Update(ctx context.Context, permitPullRequest *database.PermitPullRequest, opt ...ExecOption) error
type PermitPullRequestInterface ¶
type PermitPullRequestInterface interface { Tx(ctx context.Context, fn func(tx *sql.Tx) error) error Select(ctx context.Context, id int32) (*database.PermitPullRequest, error) SelectMulti(ctx context.Context, id ...int32) ([]*database.PermitPullRequest, error) ListByRepositoryAndNumber(ctx context.Context, repository string, number int32, opt ...ListOption) ([]*database.PermitPullRequest, error) Create(ctx context.Context, permitPullRequest *database.PermitPullRequest, opt ...ExecOption) (*database.PermitPullRequest, error) Update(ctx context.Context, permitPullRequest *database.PermitPullRequest, opt ...ExecOption) error Delete(ctx context.Context, id int32, opt ...ExecOption) error }
type SourceRepository ¶
type SourceRepository struct {
// contains filtered or unexported fields
}
func NewSourceRepository ¶
func NewSourceRepository(conn *sql.DB) *SourceRepository
func (*SourceRepository) Create ¶
func (d *SourceRepository) Create(ctx context.Context, sourceRepository *database.SourceRepository, opt ...ExecOption) (*database.SourceRepository, error)
func (*SourceRepository) Delete ¶
func (d *SourceRepository) Delete(ctx context.Context, id int32, opt ...ExecOption) error
func (*SourceRepository) ListAll ¶
func (d *SourceRepository) ListAll(ctx context.Context, opt ...ListOption) ([]*database.SourceRepository, error)
func (*SourceRepository) ListByUrl ¶
func (d *SourceRepository) ListByUrl(ctx context.Context, url string, opt ...ListOption) ([]*database.SourceRepository, error)
func (*SourceRepository) Select ¶
func (d *SourceRepository) Select(ctx context.Context, id int32) (*database.SourceRepository, error)
func (*SourceRepository) SelectMulti ¶
func (d *SourceRepository) SelectMulti(ctx context.Context, id ...int32) ([]*database.SourceRepository, error)
func (*SourceRepository) Update ¶
func (d *SourceRepository) Update(ctx context.Context, sourceRepository *database.SourceRepository, opt ...ExecOption) error
type SourceRepositoryInterface ¶
type SourceRepositoryInterface interface { Tx(ctx context.Context, fn func(tx *sql.Tx) error) error Select(ctx context.Context, id int32) (*database.SourceRepository, error) SelectMulti(ctx context.Context, id ...int32) ([]*database.SourceRepository, error) ListAll(ctx context.Context, opt ...ListOption) ([]*database.SourceRepository, error) ListByUrl(ctx context.Context, url string, opt ...ListOption) ([]*database.SourceRepository, error) Create(ctx context.Context, sourceRepository *database.SourceRepository, opt ...ExecOption) (*database.SourceRepository, error) Update(ctx context.Context, sourceRepository *database.SourceRepository, opt ...ExecOption) error Delete(ctx context.Context, id int32, opt ...ExecOption) error }
type Task ¶
type Task struct {
// contains filtered or unexported fields
}
func (*Task) ListByRepositoryId ¶
func (*Task) ListByRevision ¶
func (*Task) ListPending ¶
func (*Task) ListUniqJobName ¶
func (*Task) SelectMulti ¶
type TaskInterface ¶
type TaskInterface interface { Tx(ctx context.Context, fn func(tx *sql.Tx) error) error Select(ctx context.Context, id int32) (*database.Task, error) SelectMulti(ctx context.Context, id ...int32) ([]*database.Task, error) ListAll(ctx context.Context, opt ...ListOption) ([]*database.Task, error) ListByRepositoryId(ctx context.Context, repositoryId int32, opt ...ListOption) ([]*database.Task, error) ListPending(ctx context.Context, opt ...ListOption) ([]*database.Task, error) ListUniqJobName(ctx context.Context, repositoryId int32, opt ...ListOption) ([]*database.Task, error) ListByRevision(ctx context.Context, repositoryId int32, revision string, opt ...ListOption) ([]*database.Task, error) Create(ctx context.Context, task *database.Task, opt ...ExecOption) (*database.Task, error) Update(ctx context.Context, task *database.Task, opt ...ExecOption) error Delete(ctx context.Context, id int32, opt ...ExecOption) error }
type TestReport ¶
type TestReport struct {
// contains filtered or unexported fields
}
func NewTestReport ¶
func NewTestReport(conn *sql.DB) *TestReport
func (*TestReport) Create ¶
func (d *TestReport) Create(ctx context.Context, testReport *database.TestReport, opt ...ExecOption) (*database.TestReport, error)
func (*TestReport) Delete ¶
func (d *TestReport) Delete(ctx context.Context, id int32, opt ...ExecOption) error
func (*TestReport) ListByTaskId ¶
func (d *TestReport) ListByTaskId(ctx context.Context, taskId int32, opt ...ListOption) ([]*database.TestReport, error)
func (*TestReport) Select ¶
func (d *TestReport) Select(ctx context.Context, id int32) (*database.TestReport, error)
func (*TestReport) SelectMulti ¶
func (d *TestReport) SelectMulti(ctx context.Context, id ...int32) ([]*database.TestReport, error)
func (*TestReport) Update ¶
func (d *TestReport) Update(ctx context.Context, testReport *database.TestReport, opt ...ExecOption) error
type TestReportInterface ¶
type TestReportInterface interface { Tx(ctx context.Context, fn func(tx *sql.Tx) error) error Select(ctx context.Context, id int32) (*database.TestReport, error) SelectMulti(ctx context.Context, id ...int32) ([]*database.TestReport, error) ListByTaskId(ctx context.Context, taskId int32, opt ...ListOption) ([]*database.TestReport, error) Create(ctx context.Context, testReport *database.TestReport, opt ...ExecOption) (*database.TestReport, error) Update(ctx context.Context, testReport *database.TestReport, opt ...ExecOption) error Delete(ctx context.Context, id int32, opt ...ExecOption) error }
type TrustedUser ¶
type TrustedUser struct {
// contains filtered or unexported fields
}
func NewTrustedUser ¶
func NewTrustedUser(conn *sql.DB) *TrustedUser
func (*TrustedUser) Create ¶
func (d *TrustedUser) Create(ctx context.Context, trustedUser *database.TrustedUser, opt ...ExecOption) (*database.TrustedUser, error)
func (*TrustedUser) Delete ¶
func (d *TrustedUser) Delete(ctx context.Context, id int32, opt ...ExecOption) error
func (*TrustedUser) ListAll ¶
func (d *TrustedUser) ListAll(ctx context.Context, opt ...ListOption) ([]*database.TrustedUser, error)
func (*TrustedUser) ListByGithubId ¶
func (d *TrustedUser) ListByGithubId(ctx context.Context, githubId int64, opt ...ListOption) ([]*database.TrustedUser, error)
func (*TrustedUser) Select ¶
func (d *TrustedUser) Select(ctx context.Context, id int32) (*database.TrustedUser, error)
func (*TrustedUser) SelectMulti ¶
func (d *TrustedUser) SelectMulti(ctx context.Context, id ...int32) ([]*database.TrustedUser, error)
func (*TrustedUser) Update ¶
func (d *TrustedUser) Update(ctx context.Context, trustedUser *database.TrustedUser, opt ...ExecOption) error
type TrustedUserInterface ¶
type TrustedUserInterface interface { Tx(ctx context.Context, fn func(tx *sql.Tx) error) error Select(ctx context.Context, id int32) (*database.TrustedUser, error) SelectMulti(ctx context.Context, id ...int32) ([]*database.TrustedUser, error) ListAll(ctx context.Context, opt ...ListOption) ([]*database.TrustedUser, error) ListByGithubId(ctx context.Context, githubId int64, opt ...ListOption) ([]*database.TrustedUser, error) Create(ctx context.Context, trustedUser *database.TrustedUser, opt ...ExecOption) (*database.TrustedUser, error) Update(ctx context.Context, trustedUser *database.TrustedUser, opt ...ExecOption) error Delete(ctx context.Context, id int32, opt ...ExecOption) error }
Click to show internal directories.
Click to hide internal directories.