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) ChangeGroupArray() []any
- func (d *DB) ChangeGroupFromArray(a []any, txID string) (*types.ChangeGroup, string, error)
- func (d *DB) DB() *sql.DB
- func (d *DB) DBType() sql.Type
- func (d *DB) DDL() []string
- func (d *DB) DeleteChangeGroup(tx *sql.Tx, id string) error
- func (d *DB) DeleteExecutor(tx *sql.Tx, id string) error
- func (d *DB) DeleteExecutorTask(tx *sql.Tx, id string) error
- func (d *DB) DeleteRun(tx *sql.Tx, id string) error
- func (d *DB) DeleteRunConfig(tx *sql.Tx, id string) error
- func (d *DB) DeleteRunCounter(tx *sql.Tx, id string) error
- func (d *DB) DeleteRunEvent(tx *sql.Tx, id string) error
- func (d *DB) Do(ctx context.Context, f func(tx *sql.Tx) error) error
- func (d *DB) ExecutorArray() []any
- func (d *DB) ExecutorFromArray(a []any, txID string) (*types.Executor, string, error)
- func (d *DB) ExecutorTaskArray() []any
- func (d *DB) ExecutorTaskFromArray(a []any, txID string) (*types.ExecutorTask, string, 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) GetChangeGroups(tx *sql.Tx) ([]*types.ChangeGroup, error)
- func (d *DB) GetChangeGroupsByNames(tx *sql.Tx, changeGroupsNames []string) ([]*types.ChangeGroup, error)
- func (d *DB) GetExecutor(tx *sql.Tx, id string) (*types.Executor, error)
- func (d *DB) GetExecutorByExecutorID(tx *sql.Tx, executorID string) (*types.Executor, error)
- func (d *DB) GetExecutorTask(tx *sql.Tx, executorTaskID string) (*types.ExecutorTask, error)
- func (d *DB) GetExecutorTaskByRunTask(tx *sql.Tx, runID, runTaskID string) (*types.ExecutorTask, error)
- func (d *DB) GetExecutorTasks(tx *sql.Tx) ([]*types.ExecutorTask, error)
- func (d *DB) GetExecutorTasksByExecutor(tx *sql.Tx, executorID string) ([]*types.ExecutorTask, error)
- func (d *DB) GetExecutorTasksByRun(tx *sql.Tx, runID string) ([]*types.ExecutorTask, error)
- func (d *DB) GetExecutors(tx *sql.Tx) ([]*types.Executor, error)
- func (d *DB) GetGroupRuns(tx *sql.Tx, group string, phaseFilter []types.RunPhase, ...) ([]*types.Run, error)
- func (d *DB) GetLastRunEvent(tx *sql.Tx) (*types.RunEvent, error)
- func (d *DB) GetRun(tx *sql.Tx, runID string) (*types.Run, error)
- func (d *DB) GetRunByGroup(tx *sql.Tx, groupPath string, runCounter uint64) (*types.Run, error)
- func (d *DB) GetRunConfig(tx *sql.Tx, runConfigID string) (*types.RunConfig, error)
- func (d *DB) GetRunCounter(tx *sql.Tx, groupID string) (*types.RunCounter, error)
- func (d *DB) GetRunEventsFromSequence(tx *sql.Tx, startSequence uint64, limit int) ([]*types.RunEvent, error)
- func (d *DB) GetRuns(tx *sql.Tx, groups []string, lastRun bool, phaseFilter []types.RunPhase, ...) ([]*types.Run, error)
- func (d *DB) GetSequence(tx *sql.Tx, sequenceName string) (uint64, error)
- func (d *DB) GetUnarchivedRuns(tx *sql.Tx) ([]*types.Run, error)
- func (d *DB) InsertChangeGroup(tx *sql.Tx, v *types.ChangeGroup) error
- func (d *DB) InsertExecutor(tx *sql.Tx, v *types.Executor) error
- func (d *DB) InsertExecutorTask(tx *sql.Tx, v *types.ExecutorTask) error
- func (d *DB) InsertOrUpdateChangeGroup(tx *sql.Tx, v *types.ChangeGroup) error
- func (d *DB) InsertOrUpdateExecutor(tx *sql.Tx, v *types.Executor) error
- func (d *DB) InsertOrUpdateExecutorTask(tx *sql.Tx, v *types.ExecutorTask) error
- func (d *DB) InsertOrUpdateRun(tx *sql.Tx, v *types.Run) error
- func (d *DB) InsertOrUpdateRunConfig(tx *sql.Tx, v *types.RunConfig) error
- func (d *DB) InsertOrUpdateRunCounter(tx *sql.Tx, v *types.RunCounter) error
- func (d *DB) InsertOrUpdateRunEvent(tx *sql.Tx, v *types.RunEvent) error
- func (d *DB) InsertRawObject(tx *sql.Tx, obj sqlg.Object) error
- func (d *DB) InsertRun(tx *sql.Tx, v *types.Run) error
- func (d *DB) InsertRunConfig(tx *sql.Tx, v *types.RunConfig) error
- func (d *DB) InsertRunCounter(tx *sql.Tx, v *types.RunCounter) error
- func (d *DB) InsertRunEvent(tx *sql.Tx, v *types.RunEvent) error
- func (d *DB) MigrateFuncs() map[uint]sqlg.MigrateFunc
- func (d *DB) NextRunCounter(tx *sql.Tx, groupID string) (uint64, error)
- 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) RunArray() []any
- func (d *DB) RunConfigArray() []any
- func (d *DB) RunConfigFromArray(a []any, txID string) (*types.RunConfig, string, error)
- func (d *DB) RunCounterArray() []any
- func (d *DB) RunCounterFromArray(a []any, txID string) (*types.RunCounter, string, error)
- func (d *DB) RunEventArray() []any
- func (d *DB) RunEventFromArray(a []any, txID string) (*types.RunEvent, string, error)
- func (d *DB) RunFromArray(a []any, txID string) (*types.Run, 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) UpdateChangeGroup(tx *sql.Tx, v *types.ChangeGroup) error
- func (d *DB) UpdateExecutor(tx *sql.Tx, v *types.Executor) error
- func (d *DB) UpdateExecutorTask(tx *sql.Tx, v *types.ExecutorTask) error
- func (d *DB) UpdateRun(tx *sql.Tx, v *types.Run) error
- func (d *DB) UpdateRunConfig(tx *sql.Tx, v *types.RunConfig) error
- func (d *DB) UpdateRunCounter(tx *sql.Tx, v *types.RunCounter) error
- func (d *DB) UpdateRunEvent(tx *sql.Tx, v *types.RunEvent) error
- func (d *DB) Version() uint
Constants ¶
This section is empty.
Variables ¶
View Source
var DDLPostgres = []string{
"create table if not exists changegroup (id varchar NOT NULL, revision bigint NOT NULL, creation_time timestamptz NOT NULL, update_time timestamptz NOT NULL, name varchar NOT NULL, value varchar NOT NULL, PRIMARY KEY (id))",
"create table if not exists runconfig (id varchar NOT NULL, revision bigint NOT NULL, creation_time timestamptz NOT NULL, update_time timestamptz NOT NULL, name varchar NOT NULL, run_group varchar NOT NULL, setup_errors jsonb NOT NULL, annotations jsonb NOT NULL, static_environment jsonb NOT NULL, environment jsonb NOT NULL, tasks jsonb NOT NULL, cache_group varchar NOT NULL, PRIMARY KEY (id))",
"create table if not exists run (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, name varchar NOT NULL, run_config_id varchar NOT NULL, counter bigint NOT NULL, run_group varchar NOT NULL, annotations jsonb NOT NULL, phase varchar NOT NULL, result varchar NOT NULL, stop boolean NOT NULL, tasks jsonb NOT NULL, enqueue_time timestamptz, start_time timestamptz, end_time timestamptz, archived boolean NOT NULL, PRIMARY KEY (id), foreign key (run_config_id) references runconfig(id))",
"create table if not exists runcounter (id varchar NOT NULL, revision bigint NOT NULL, creation_time timestamptz NOT NULL, update_time timestamptz NOT NULL, group_id varchar NOT NULL UNIQUE, value bigint NOT NULL, PRIMARY KEY (id))",
"create table if not exists runevent (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_id varchar NOT NULL, phase varchar NOT NULL, result varchar NOT NULL, PRIMARY KEY (id))",
"create table if not exists executor (id varchar NOT NULL, revision bigint NOT NULL, creation_time timestamptz NOT NULL, update_time timestamptz NOT NULL, executor_id varchar NOT NULL, listen_url varchar NOT NULL, archs jsonb NOT NULL, labels jsonb NOT NULL, allow_privileged_containers boolean NOT NULL, active_tasks_limit bigint NOT NULL, active_tasks bigint NOT NULL, dynamic boolean NOT NULL, executor_group varchar NOT NULL, siblings_executors jsonb NOT NULL, PRIMARY KEY (id))",
"create table if not exists executortask (id varchar NOT NULL, revision bigint NOT NULL, creation_time timestamptz NOT NULL, update_time timestamptz NOT NULL, executor_id varchar NOT NULL, run_id varchar NOT NULL, run_task_id varchar NOT NULL, stop boolean NOT NULL, phase varchar NOT NULL, timedout boolean NOT NULL, fail_error varchar NOT NULL, start_time timestamptz, end_time timestamptz, setup_step jsonb NOT NULL, steps jsonb NOT NULL, PRIMARY KEY (id))",
"create index if not exists run_group_idx on run(run_group)",
"create index if not exists runcounter_group_id_idx on runcounter(group_id)",
}
View Source
var DDLSqlite3 = []string{
"create table if not exists changegroup (id varchar NOT NULL, revision bigint NOT NULL, creation_time timestamp NOT NULL, update_time timestamp NOT NULL, name varchar NOT NULL, value varchar NOT NULL, PRIMARY KEY (id))",
"create table if not exists runconfig (id varchar NOT NULL, revision bigint NOT NULL, creation_time timestamp NOT NULL, update_time timestamp NOT NULL, name varchar NOT NULL, run_group varchar NOT NULL, setup_errors text NOT NULL, annotations text NOT NULL, static_environment text NOT NULL, environment text NOT NULL, tasks text NOT NULL, cache_group varchar NOT NULL, PRIMARY KEY (id))",
"create table if not exists run (id varchar NOT NULL, revision bigint NOT NULL, creation_time timestamp NOT NULL, update_time timestamp NOT NULL, sequence integer NOT NULL UNIQUE, name varchar NOT NULL, run_config_id varchar NOT NULL, counter bigint NOT NULL, run_group varchar NOT NULL, annotations text NOT NULL, phase varchar NOT NULL, result varchar NOT NULL, stop integer NOT NULL, tasks text NOT NULL, enqueue_time timestamp, start_time timestamp, end_time timestamp, archived integer NOT NULL, PRIMARY KEY (id), foreign key (run_config_id) references runconfig(id))",
"create table if not exists runcounter (id varchar NOT NULL, revision bigint NOT NULL, creation_time timestamp NOT NULL, update_time timestamp NOT NULL, group_id varchar NOT NULL UNIQUE, value bigint NOT NULL, PRIMARY KEY (id))",
"create table if not exists runevent (id varchar NOT NULL, revision bigint NOT NULL, creation_time timestamp NOT NULL, update_time timestamp NOT NULL, sequence integer NOT NULL UNIQUE, run_id varchar NOT NULL, phase varchar NOT NULL, result varchar NOT NULL, PRIMARY KEY (id))",
"create table if not exists executor (id varchar NOT NULL, revision bigint NOT NULL, creation_time timestamp NOT NULL, update_time timestamp NOT NULL, executor_id varchar NOT NULL, listen_url varchar NOT NULL, archs text NOT NULL, labels text NOT NULL, allow_privileged_containers integer NOT NULL, active_tasks_limit bigint NOT NULL, active_tasks bigint NOT NULL, dynamic integer NOT NULL, executor_group varchar NOT NULL, siblings_executors text NOT NULL, PRIMARY KEY (id))",
"create table if not exists executortask (id varchar NOT NULL, revision bigint NOT NULL, creation_time timestamp NOT NULL, update_time timestamp NOT NULL, executor_id varchar NOT NULL, run_id varchar NOT NULL, run_task_id varchar NOT NULL, stop integer NOT NULL, phase varchar NOT NULL, timedout integer NOT NULL, fail_error varchar NOT NULL, start_time timestamp, end_time timestamp, setup_step text NOT NULL, steps text NOT NULL, PRIMARY KEY (id))",
"create index if not exists run_group_idx on run(run_group)",
"create index if not exists runcounter_group_id_idx on runcounter(group_id)",
}
View Source
var Sequences = []sqlg.Sequence{
{
Name: "run_sequence_seq",
Table: "run",
Column: "sequence",
},
{
Name: "runevent_sequence_seq",
Table: "runevent",
Column: "sequence",
},
}
Functions ¶
This section is empty.
Types ¶
type DB ¶
type DB struct {
// contains filtered or unexported fields
}
func (*DB) ChangeGroupArray ¶
func (*DB) ChangeGroupFromArray ¶
func (*DB) ExecutorArray ¶
func (*DB) ExecutorFromArray ¶
func (*DB) ExecutorTaskArray ¶
func (*DB) ExecutorTaskFromArray ¶
func (*DB) FetchObjects ¶
func (*DB) GetChangeGroups ¶
func (*DB) GetChangeGroupsByNames ¶
func (*DB) GetExecutorByExecutorID ¶
func (*DB) GetExecutorTask ¶
func (*DB) GetExecutorTaskByRunTask ¶
func (*DB) GetExecutorTasks ¶
func (*DB) GetExecutorTasksByExecutor ¶
func (*DB) GetExecutorTasksByRun ¶
func (*DB) GetGroupRuns ¶
func (*DB) GetRunByGroup ¶
func (*DB) GetRunConfig ¶
func (*DB) GetRunCounter ¶
func (*DB) GetRunEventsFromSequence ¶
func (*DB) InsertChangeGroup ¶
func (*DB) InsertExecutorTask ¶
func (*DB) InsertOrUpdateChangeGroup ¶
func (*DB) InsertOrUpdateExecutor ¶
func (*DB) InsertOrUpdateExecutorTask ¶
func (*DB) InsertOrUpdateRunConfig ¶
func (*DB) InsertOrUpdateRunCounter ¶
func (*DB) InsertOrUpdateRunEvent ¶
func (*DB) InsertRunCounter ¶
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) RunConfigArray ¶
func (*DB) RunConfigFromArray ¶
func (*DB) RunCounterArray ¶
func (*DB) RunCounterFromArray ¶
func (*DB) RunEventArray ¶
func (*DB) RunEventFromArray ¶
func (*DB) RunFromArray ¶
func (*DB) SelectObject ¶
func (d *DB) SelectObject(kind string) *sq.SelectBuilder
func (*DB) UnmarshalExportObject ¶
func (*DB) UpdateChangeGroup ¶
func (*DB) UpdateExecutorTask ¶
func (*DB) UpdateRunCounter ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.