Documentation ¶
Overview ¶
Code generated by go generate; DO NOT EDIT.
Code generated by go generate; DO NOT EDIT.
Code generated by go generate; DO NOT EDIT.
Code generated by go generate; DO NOT EDIT.
Code generated by go generate; DO NOT EDIT.
Code generated by go generate; DO NOT EDIT.
Index ¶
- Variables
- type DB
- func (d *DB) CommitStatusArray() []any
- func (d *DB) CommitStatusDeliveryArray() []any
- func (d *DB) CommitStatusDeliveryFromArray(a []any, txID string) (*types.CommitStatusDelivery, string, error)
- func (d *DB) CommitStatusFromArray(a []any, txID string) (*types.CommitStatus, string, error)
- func (d *DB) DB() *sql.DB
- func (d *DB) DBType() sql.Type
- func (d *DB) DDL() []string
- func (d *DB) DeleteCommitStatus(tx *sql.Tx, id string) error
- func (d *DB) DeleteCommitStatusDeliveriesByCommitStatusID(tx *sql.Tx, commitStatusID string) error
- func (d *DB) DeleteCommitStatusDelivery(tx *sql.Tx, id string) error
- func (d *DB) DeleteLastRunEventSequence(tx *sql.Tx, id string) error
- func (d *DB) DeleteRunWebhook(tx *sql.Tx, id string) error
- func (d *DB) DeleteRunWebhookDeliveriesByRunWebhookID(tx *sql.Tx, runWebhookID string) error
- func (d *DB) DeleteRunWebhookDelivery(tx *sql.Tx, id string) error
- func (d *DB) Do(ctx context.Context, f func(tx *sql.Tx) error) error
- func (d *DB) FetchObjects(tx *sql.Tx, kind string, q sq.Builder) ([]sqlg.Object, error)
- func (d *DB) Flavor() sq.Flavor
- func (d *DB) GetCommitStatusByID(tx *sql.Tx, commitStatusID string) (*types.CommitStatus, error)
- func (d *DB) GetCommitStatusDeliveriesAfterSequence(tx *sql.Tx, afterSequence uint64, limit int) ([]*types.CommitStatusDelivery, error)
- func (d *DB) GetCommitStatusDeliveriesByCommitStatusID(tx *sql.Tx, commitStatusID string, deliveryStatusFilter []types.DeliveryStatus, ...) ([]*types.CommitStatusDelivery, error)
- func (d *DB) GetCommitStatusDeliveryByID(tx *sql.Tx, commitStatusDeliveryID string) (*types.CommitStatusDelivery, error)
- func (d *DB) GetCommitStatuses(tx *sql.Tx, limit int) ([]*types.CommitStatus, error)
- func (d *DB) GetCommitStatusesAfterCommitStatusID(tx *sql.Tx, afterCommitStatusID string, limit int) ([]*types.CommitStatus, error)
- func (d *DB) GetLastRunEventSequence(tx *sql.Tx) (*types.LastRunEventSequence, error)
- func (d *DB) GetProjectCommitStatusDeliveriesAfterSequenceByProjectID(tx *sql.Tx, afterSequence uint64, projectID string, ...) ([]*types.CommitStatusDelivery, error)
- func (d *DB) GetProjectRunWebhookDeliveriesAfterSequenceByProjectID(tx *sql.Tx, afterSequence uint64, projectID string, ...) ([]*types.RunWebhookDelivery, error)
- func (d *DB) GetRunWebhookByID(tx *sql.Tx, runWebhookID string) (*types.RunWebhook, error)
- func (d *DB) GetRunWebhookDeliveriesAfterSequence(tx *sql.Tx, afterSequence uint64, limit int) ([]*types.RunWebhookDelivery, error)
- func (d *DB) GetRunWebhookDeliveriesByRunWebhookID(tx *sql.Tx, runWebhookID string, deliveryStatusFilter []types.DeliveryStatus, ...) ([]*types.RunWebhookDelivery, error)
- func (d *DB) GetRunWebhookDeliveryByID(tx *sql.Tx, runWebhookDeliveryID string) (*types.RunWebhookDelivery, error)
- func (d *DB) GetRunWebhooks(tx *sql.Tx, limit int) ([]*types.RunWebhook, error)
- func (d *DB) GetRunWebhooksAfterRunWebhookID(tx *sql.Tx, afterRunWebhookID string, limit int) ([]*types.RunWebhook, error)
- func (d *DB) GetSequence(tx *sql.Tx, sequenceName string) (uint64, error)
- func (d *DB) InsertCommitStatus(tx *sql.Tx, v *types.CommitStatus) error
- func (d *DB) InsertCommitStatusDelivery(tx *sql.Tx, v *types.CommitStatusDelivery) error
- func (d *DB) InsertLastRunEventSequence(tx *sql.Tx, v *types.LastRunEventSequence) error
- func (d *DB) InsertOrUpdateCommitStatus(tx *sql.Tx, v *types.CommitStatus) error
- func (d *DB) InsertOrUpdateCommitStatusDelivery(tx *sql.Tx, v *types.CommitStatusDelivery) error
- func (d *DB) InsertOrUpdateLastRunEventSequence(tx *sql.Tx, v *types.LastRunEventSequence) error
- func (d *DB) InsertOrUpdateRunWebhook(tx *sql.Tx, v *types.RunWebhook) error
- func (d *DB) InsertOrUpdateRunWebhookDelivery(tx *sql.Tx, v *types.RunWebhookDelivery) error
- func (d *DB) InsertRawObject(tx *sql.Tx, obj sqlg.Object) error
- func (d *DB) InsertRunWebhook(tx *sql.Tx, v *types.RunWebhook) error
- func (d *DB) InsertRunWebhookDelivery(tx *sql.Tx, v *types.RunWebhookDelivery) error
- func (d *DB) LastRunEventSequenceArray() []any
- func (d *DB) LastRunEventSequenceFromArray(a []any, txID string) (*types.LastRunEventSequence, string, error)
- func (d *DB) MigrateFuncs() map[uint]sqlg.MigrateFunc
- func (d *DB) ObjectToExportJSON(obj sqlg.Object, e *json.Encoder) error
- func (d *DB) ObjectsInfo() []sqlg.ObjectInfo
- func (d *DB) PopulateSequences(tx *sql.Tx) error
- func (d *DB) RunWebhookArray() []any
- func (d *DB) RunWebhookDeliveryArray() []any
- func (d *DB) RunWebhookDeliveryFromArray(a []any, txID string) (*types.RunWebhookDelivery, string, error)
- func (d *DB) RunWebhookFromArray(a []any, txID string) (*types.RunWebhook, string, error)
- func (d *DB) SelectObject(kind string) *sq.SelectBuilder
- func (d *DB) Sequences() []sqlg.Sequence
- func (d *DB) UnmarshalExportObject(data []byte) (sqlg.Object, error)
- func (d *DB) UpdateCommitStatus(tx *sql.Tx, v *types.CommitStatus) error
- func (d *DB) UpdateCommitStatusDelivery(tx *sql.Tx, v *types.CommitStatusDelivery) error
- func (d *DB) UpdateLastRunEventSequence(tx *sql.Tx, v *types.LastRunEventSequence) error
- func (d *DB) UpdateRunWebhook(tx *sql.Tx, v *types.RunWebhook) error
- func (d *DB) UpdateRunWebhookDelivery(tx *sql.Tx, v *types.RunWebhookDelivery) error
- func (d *DB) Version() uint
Constants ¶
This section is empty.
Variables ¶
View Source
var DDLPostgres = []string{
"create table if not exists runwebhook (id varchar NOT NULL, revision bigint NOT NULL, creation_time timestamptz NOT NULL, update_time timestamptz NOT NULL, payload bytea NOT NULL, project_id varchar NOT NULL, PRIMARY KEY (id))",
"create table if not exists runwebhookdelivery (id varchar NOT NULL, revision bigint NOT NULL, creation_time timestamptz NOT NULL, update_time timestamptz NOT NULL, sequence bigint generated by default as identity NOT NULL UNIQUE, run_webhook_id varchar NOT NULL, delivery_status varchar NOT NULL, delivered_at timestamptz, status_code bigint NOT NULL, PRIMARY KEY (id), foreign key (run_webhook_id) references runwebhook(id))",
"create table if not exists lastruneventsequence (id varchar NOT NULL, revision bigint NOT NULL, creation_time timestamptz NOT NULL, update_time timestamptz NOT NULL, value bigint NOT NULL, PRIMARY KEY (id))",
"create table if not exists commitstatus (id varchar NOT NULL, revision bigint NOT NULL, creation_time timestamptz NOT NULL, update_time timestamptz NOT NULL, project_id varchar NOT NULL, state varchar NOT NULL, commit_sha varchar NOT NULL, run_counter bigint NOT NULL, description varchar NOT NULL, context varchar NOT NULL, PRIMARY KEY (id))",
"create table if not exists commitstatusdelivery (id varchar NOT NULL, revision bigint NOT NULL, creation_time timestamptz NOT NULL, update_time timestamptz NOT NULL, sequence bigint generated by default as identity NOT NULL UNIQUE, commit_status_id varchar NOT NULL, delivery_status varchar NOT NULL, delivered_at timestamptz, PRIMARY KEY (id), foreign key (commit_status_id) references commitstatus(id))",
"create index if not exists runwebhookdelivery_sequence_idx on runwebhookdelivery(sequence)",
"create index if not exists commitstatusdelivery_sequence_idx on commitstatusdelivery(sequence)",
}
View Source
var DDLSqlite3 = []string{
"create table if not exists runwebhook (id varchar NOT NULL, revision bigint NOT NULL, creation_time timestamp NOT NULL, update_time timestamp NOT NULL, payload blob NOT NULL, project_id varchar NOT NULL, PRIMARY KEY (id))",
"create table if not exists runwebhookdelivery (id varchar NOT NULL, revision bigint NOT NULL, creation_time timestamp NOT NULL, update_time timestamp NOT NULL, sequence integer NOT NULL UNIQUE, run_webhook_id varchar NOT NULL, delivery_status varchar NOT NULL, delivered_at timestamp, status_code bigint NOT NULL, PRIMARY KEY (id), foreign key (run_webhook_id) references runwebhook(id))",
"create table if not exists lastruneventsequence (id varchar NOT NULL, revision bigint NOT NULL, creation_time timestamp NOT NULL, update_time timestamp NOT NULL, value bigint NOT NULL, PRIMARY KEY (id))",
"create table if not exists commitstatus (id varchar NOT NULL, revision bigint NOT NULL, creation_time timestamp NOT NULL, update_time timestamp NOT NULL, project_id varchar NOT NULL, state varchar NOT NULL, commit_sha varchar NOT NULL, run_counter bigint NOT NULL, description varchar NOT NULL, context varchar NOT NULL, PRIMARY KEY (id))",
"create table if not exists commitstatusdelivery (id varchar NOT NULL, revision bigint NOT NULL, creation_time timestamp NOT NULL, update_time timestamp NOT NULL, sequence integer NOT NULL UNIQUE, commit_status_id varchar NOT NULL, delivery_status varchar NOT NULL, delivered_at timestamp, PRIMARY KEY (id), foreign key (commit_status_id) references commitstatus(id))",
"create index if not exists runwebhookdelivery_sequence_idx on runwebhookdelivery(sequence)",
"create index if not exists commitstatusdelivery_sequence_idx on commitstatusdelivery(sequence)",
}
View Source
var MigrationRunWebhookLimit = runWebhookLimit
View Source
var Sequences = []sqlg.Sequence{
{
Name: "runwebhookdelivery_sequence_seq",
Table: "runwebhookdelivery",
Column: "sequence",
},
{
Name: "commitstatusdelivery_sequence_seq",
Table: "commitstatusdelivery",
Column: "sequence",
},
}
Functions ¶
This section is empty.
Types ¶
type DB ¶
type DB struct {
// contains filtered or unexported fields
}
func (*DB) CommitStatusArray ¶
func (*DB) CommitStatusDeliveryArray ¶
func (*DB) CommitStatusDeliveryFromArray ¶
func (*DB) CommitStatusFromArray ¶
func (*DB) DeleteCommitStatusDeliveriesByCommitStatusID ¶
func (*DB) DeleteCommitStatusDelivery ¶
func (*DB) DeleteLastRunEventSequence ¶
func (*DB) DeleteRunWebhookDeliveriesByRunWebhookID ¶
func (*DB) DeleteRunWebhookDelivery ¶
func (*DB) FetchObjects ¶
func (*DB) GetCommitStatusByID ¶
func (*DB) GetCommitStatusDeliveriesAfterSequence ¶
func (*DB) GetCommitStatusDeliveriesByCommitStatusID ¶
func (d *DB) GetCommitStatusDeliveriesByCommitStatusID(tx *sql.Tx, commitStatusID string, deliveryStatusFilter []types.DeliveryStatus, limit int, sortDirection types.SortDirection) ([]*types.CommitStatusDelivery, error)
func (*DB) GetCommitStatusDeliveryByID ¶
func (*DB) GetCommitStatuses ¶
func (*DB) GetCommitStatusesAfterCommitStatusID ¶
func (*DB) GetLastRunEventSequence ¶
func (*DB) GetProjectCommitStatusDeliveriesAfterSequenceByProjectID ¶
func (d *DB) GetProjectCommitStatusDeliveriesAfterSequenceByProjectID(tx *sql.Tx, afterSequence uint64, projectID string, deliveryStatusFilter []types.DeliveryStatus, limit int, sortDirection types.SortDirection) ([]*types.CommitStatusDelivery, error)
func (*DB) GetProjectRunWebhookDeliveriesAfterSequenceByProjectID ¶
func (d *DB) GetProjectRunWebhookDeliveriesAfterSequenceByProjectID(tx *sql.Tx, afterSequence uint64, projectID string, deliveryStatusFilter []types.DeliveryStatus, limit int, sortDirection types.SortDirection) ([]*types.RunWebhookDelivery, error)
func (*DB) GetRunWebhookByID ¶
func (*DB) GetRunWebhookDeliveriesAfterSequence ¶
func (*DB) GetRunWebhookDeliveriesByRunWebhookID ¶
func (d *DB) GetRunWebhookDeliveriesByRunWebhookID(tx *sql.Tx, runWebhookID string, deliveryStatusFilter []types.DeliveryStatus, limit int, sortDirection types.SortDirection) ([]*types.RunWebhookDelivery, error)
func (*DB) GetRunWebhookDeliveryByID ¶
func (*DB) GetRunWebhooks ¶
func (*DB) GetRunWebhooksAfterRunWebhookID ¶
func (*DB) InsertCommitStatus ¶
func (*DB) InsertCommitStatusDelivery ¶
func (*DB) InsertLastRunEventSequence ¶
func (*DB) InsertOrUpdateCommitStatus ¶
func (*DB) InsertOrUpdateCommitStatusDelivery ¶
func (*DB) InsertOrUpdateLastRunEventSequence ¶
func (*DB) InsertOrUpdateRunWebhook ¶
func (*DB) InsertOrUpdateRunWebhookDelivery ¶
func (*DB) InsertRunWebhook ¶
func (*DB) InsertRunWebhookDelivery ¶
func (*DB) LastRunEventSequenceArray ¶
func (*DB) LastRunEventSequenceFromArray ¶
func (*DB) MigrateFuncs ¶
func (d *DB) MigrateFuncs() map[uint]sqlg.MigrateFunc
func (*DB) ObjectToExportJSON ¶
func (*DB) ObjectsInfo ¶
func (d *DB) ObjectsInfo() []sqlg.ObjectInfo
func (*DB) RunWebhookArray ¶
func (*DB) RunWebhookDeliveryArray ¶
func (*DB) RunWebhookDeliveryFromArray ¶
func (*DB) RunWebhookFromArray ¶
func (*DB) SelectObject ¶
func (d *DB) SelectObject(kind string) *sq.SelectBuilder
func (*DB) UnmarshalExportObject ¶
func (*DB) UpdateCommitStatus ¶
func (*DB) UpdateCommitStatusDelivery ¶
func (*DB) UpdateLastRunEventSequence ¶
func (*DB) UpdateRunWebhook ¶
func (*DB) UpdateRunWebhookDelivery ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.