Documentation ¶
Index ¶
- type SqlDb
- func (d *SqlDb) ApplyMigration(migration db.Migration) error
- func (d *SqlDb) Close(token string)
- func (d *SqlDb) Connect(token string)
- func (d *SqlDb) CreateAPIToken(token db.APIToken) (db.APIToken, error)
- func (d *SqlDb) CreateAccessKey(key db.AccessKey) (newKey db.AccessKey, err error)
- func (d *SqlDb) CreateEnvironment(env db.Environment) (newEnv db.Environment, err error)
- func (d *SqlDb) CreateEvent(evt db.Event) (newEvent db.Event, err error)
- func (d *SqlDb) CreateInventory(inventory db.Inventory) (newInventory db.Inventory, err error)
- func (d *SqlDb) CreateProject(project db.Project) (newProject db.Project, err error)
- func (d *SqlDb) CreateProjectUser(projectUser db.ProjectUser) (newProjectUser db.ProjectUser, err error)
- func (d *SqlDb) CreateRepository(repository db.Repository) (newRepo db.Repository, err error)
- func (d *SqlDb) CreateRunner(runner db.Runner) (newRunner db.Runner, err error)
- func (d *SqlDb) CreateSchedule(schedule db.Schedule) (newSchedule db.Schedule, err error)
- func (d *SqlDb) CreateSession(session db.Session) (db.Session, error)
- func (d *SqlDb) CreateTask(task db.Task) (db.Task, error)
- func (d *SqlDb) CreateTaskOutput(output db.TaskOutput) (db.TaskOutput, error)
- func (d *SqlDb) CreateTemplate(template db.Template) (newTemplate db.Template, err error)
- func (d *SqlDb) CreateUser(user db.UserWithPwd) (newUser db.User, err error)
- func (d *SqlDb) CreateUserWithoutPassword(user db.User) (newUser db.User, err error)
- func (d *SqlDb) CreateView(view db.View) (newView db.View, err error)
- func (d *SqlDb) DeleteAPIToken(userID int, tokenID string) (err error)
- func (d *SqlDb) DeleteAccessKey(projectID int, accessKeyID int) error
- func (d *SqlDb) DeleteEnvironment(projectID int, environmentID int) error
- func (d *SqlDb) DeleteGlobalRunner(runnerID int) (err error)
- func (d *SqlDb) DeleteInventory(projectID int, inventoryID int) error
- func (d *SqlDb) DeleteProject(projectID int) error
- func (d *SqlDb) DeleteProjectUser(projectID, userID int) error
- func (d *SqlDb) DeleteRepository(projectID int, repositoryId int) error
- func (d *SqlDb) DeleteRunner(projectID int, runnerID int) (err error)
- func (d *SqlDb) DeleteSchedule(projectID int, scheduleID int) error
- func (d *SqlDb) DeleteTaskWithOutputs(projectID int, taskID int) (err error)
- func (d *SqlDb) DeleteTemplate(projectID int, templateID int) error
- func (d *SqlDb) DeleteUser(userID int) error
- func (d *SqlDb) DeleteView(projectID int, viewID int) error
- func (d *SqlDb) ExpireAPIToken(userID int, tokenID string) (err error)
- func (d *SqlDb) ExpireSession(userID int, sessionID int) error
- func (d *SqlDb) GetAPIToken(tokenID string) (token db.APIToken, err error)
- func (d *SqlDb) GetAPITokens(userID int) (tokens []db.APIToken, err error)
- func (d *SqlDb) GetAccessKey(projectID int, accessKeyID int) (key db.AccessKey, err error)
- func (d *SqlDb) GetAccessKeyRefs(projectID int, keyID int) (db.ObjectReferrers, error)
- func (d *SqlDb) GetAccessKeys(projectID int, params db.RetrieveQueryParams) ([]db.AccessKey, error)
- func (d *SqlDb) GetAllProjects() (projects []db.Project, err error)
- func (d *SqlDb) GetEnvironment(projectID int, environmentID int) (db.Environment, error)
- func (d *SqlDb) GetEnvironmentRefs(projectID int, environmentID int) (db.ObjectReferrers, error)
- func (d *SqlDb) GetEnvironments(projectID int, params db.RetrieveQueryParams) ([]db.Environment, error)
- func (d *SqlDb) GetEvents(projectID int, params db.RetrieveQueryParams) ([]db.Event, error)
- func (d *SqlDb) GetGlobalRunner(runnerID int) (runner db.Runner, err error)
- func (d *SqlDb) GetGlobalRunners() (runners []db.Runner, err error)
- func (d *SqlDb) GetInventories(projectID int, params db.RetrieveQueryParams) ([]db.Inventory, error)
- func (d *SqlDb) GetInventory(projectID int, inventoryID int) (inventory db.Inventory, err error)
- func (d *SqlDb) GetInventoryRefs(projectID int, inventoryID int) (db.ObjectReferrers, error)
- func (d *SqlDb) GetProject(projectID int) (project db.Project, err error)
- func (d *SqlDb) GetProjectTasks(projectID int, params db.RetrieveQueryParams) (tasks []db.TaskWithTpl, err error)
- func (d *SqlDb) GetProjectUser(projectID, userID int) (db.ProjectUser, error)
- func (d *SqlDb) GetProjectUsers(projectID int, params db.RetrieveQueryParams) (users []db.UserWithProjectRole, err error)
- func (d *SqlDb) GetProjects(userID int) (projects []db.Project, err error)
- func (d *SqlDb) GetRepositories(projectID int, params db.RetrieveQueryParams) (repositories []db.Repository, err error)
- func (d *SqlDb) GetRepository(projectID int, repositoryID int) (db.Repository, error)
- func (d *SqlDb) GetRepositoryRefs(projectID int, repositoryID int) (db.ObjectReferrers, error)
- func (d *SqlDb) GetRunner(projectID int, runnerID int) (runner db.Runner, err error)
- func (d *SqlDb) GetRunners(projectID int) (runners []db.Runner, err error)
- func (d *SqlDb) GetSchedule(projectID int, scheduleID int) (template db.Schedule, err error)
- func (d *SqlDb) GetSchedules() (schedules []db.Schedule, err error)
- func (d *SqlDb) GetSession(userID int, sessionID int) (session db.Session, err error)
- func (d *SqlDb) GetTask(projectID int, taskID int) (task db.Task, err error)
- func (d *SqlDb) GetTaskOutputs(projectID int, taskID int) (output []db.TaskOutput, err error)
- func (d *SqlDb) GetTemplate(projectID int, templateID int) (template db.Template, err error)
- func (d *SqlDb) GetTemplateRefs(projectID int, templateID int) (db.ObjectReferrers, error)
- func (d *SqlDb) GetTemplateSchedules(projectID int, templateID int) (schedules []db.Schedule, err error)
- func (d *SqlDb) GetTemplateTasks(projectID int, templateID int, params db.RetrieveQueryParams) (tasks []db.TaskWithTpl, err error)
- func (d *SqlDb) GetTemplates(projectID int, filter db.TemplateFilter, params db.RetrieveQueryParams) (templates []db.Template, err error)
- func (d *SqlDb) GetUser(userID int) (db.User, error)
- func (d *SqlDb) GetUserByLoginOrEmail(login string, email string) (existingUser db.User, err error)
- func (d *SqlDb) GetUserEvents(userID int, params db.RetrieveQueryParams) ([]db.Event, error)
- func (d *SqlDb) GetUsers(params db.RetrieveQueryParams) (users []db.User, err error)
- func (d *SqlDb) GetView(projectID int, viewID int) (view db.View, err error)
- func (d *SqlDb) GetViews(projectID int) (views []db.View, err error)
- func (d *SqlDb) IsInitialized() (bool, error)
- func (d *SqlDb) IsMigrationApplied(migration db.Migration) (bool, error)
- func (d *SqlDb) PermanentConnection() bool
- func (d *SqlDb) PrepareQuery(query string) string
- func (d *SqlDb) RekeyAccessKeys(oldKey string) error
- func (d *SqlDb) SetScheduleCommitHash(projectID int, scheduleID int, hash string) error
- func (d *SqlDb) SetScheduleLastCommitHash(projectID int, scheduleID int, lastCommentHash string) error
- func (d *SqlDb) SetUserPassword(userID int, password string) error
- func (d *SqlDb) SetViewPositions(projectID int, positions map[int]int) error
- func (d *SqlDb) Sql() *gorp.DbMap
- func (d *SqlDb) TouchSession(userID int, sessionID int) error
- func (d *SqlDb) TryRollbackMigration(version db.Migration)
- func (d *SqlDb) UpdateAccessKey(key db.AccessKey) error
- func (d *SqlDb) UpdateEnvironment(env db.Environment) error
- func (d *SqlDb) UpdateInventory(inventory db.Inventory) error
- func (d *SqlDb) UpdateProject(project db.Project) error
- func (d *SqlDb) UpdateProjectUser(projectUser db.ProjectUser) error
- func (d *SqlDb) UpdateRepository(repository db.Repository) error
- func (d *SqlDb) UpdateRunner(runner db.Runner) (err error)
- func (d *SqlDb) UpdateSchedule(schedule db.Schedule) error
- func (d *SqlDb) UpdateTask(task db.Task) error
- func (d *SqlDb) UpdateTemplate(template db.Template) error
- func (d *SqlDb) UpdateUser(user db.UserWithPwd) error
- func (d *SqlDb) UpdateView(view db.View) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SqlDb ¶
type SqlDb struct {
// contains filtered or unexported fields
}
func (*SqlDb) ApplyMigration ¶
ApplyMigration runs executes a database migration
func (*SqlDb) CreateAPIToken ¶
func (*SqlDb) CreateAccessKey ¶
func (*SqlDb) CreateEnvironment ¶
func (d *SqlDb) CreateEnvironment(env db.Environment) (newEnv db.Environment, err error)
func (*SqlDb) CreateEvent ¶
func (*SqlDb) CreateInventory ¶
func (*SqlDb) CreateProject ¶
func (*SqlDb) CreateProjectUser ¶
func (d *SqlDb) CreateProjectUser(projectUser db.ProjectUser) (newProjectUser db.ProjectUser, err error)
func (*SqlDb) CreateRepository ¶
func (d *SqlDb) CreateRepository(repository db.Repository) (newRepo db.Repository, err error)
func (*SqlDb) CreateRunner ¶
func (*SqlDb) CreateSchedule ¶
func (*SqlDb) CreateTaskOutput ¶
func (d *SqlDb) CreateTaskOutput(output db.TaskOutput) (db.TaskOutput, error)
func (*SqlDb) CreateTemplate ¶
func (*SqlDb) CreateUser ¶
func (*SqlDb) CreateUserWithoutPassword ¶
func (*SqlDb) DeleteAPIToken ¶
func (*SqlDb) DeleteAccessKey ¶
func (*SqlDb) DeleteEnvironment ¶
func (*SqlDb) DeleteGlobalRunner ¶
func (*SqlDb) DeleteInventory ¶
func (*SqlDb) DeleteProject ¶
func (*SqlDb) DeleteProjectUser ¶
func (*SqlDb) DeleteRepository ¶
func (*SqlDb) DeleteTaskWithOutputs ¶
func (*SqlDb) DeleteUser ¶
func (*SqlDb) ExpireAPIToken ¶
func (*SqlDb) GetAPIToken ¶
func (*SqlDb) GetAPITokens ¶
func (*SqlDb) GetAccessKey ¶
func (*SqlDb) GetAccessKeyRefs ¶
func (*SqlDb) GetAccessKeys ¶
func (*SqlDb) GetEnvironment ¶
func (*SqlDb) GetEnvironmentRefs ¶
func (*SqlDb) GetEnvironments ¶
func (d *SqlDb) GetEnvironments(projectID int, params db.RetrieveQueryParams) ([]db.Environment, error)
func (*SqlDb) GetGlobalRunner ¶
func (*SqlDb) GetGlobalRunners ¶
func (*SqlDb) GetInventories ¶
func (*SqlDb) GetInventory ¶
func (*SqlDb) GetInventoryRefs ¶
func (*SqlDb) GetProject ¶
func (*SqlDb) GetProjectTasks ¶
func (d *SqlDb) GetProjectTasks(projectID int, params db.RetrieveQueryParams) (tasks []db.TaskWithTpl, err error)
func (*SqlDb) GetProjectUser ¶
func (d *SqlDb) GetProjectUser(projectID, userID int) (db.ProjectUser, error)
func (*SqlDb) GetProjectUsers ¶
func (d *SqlDb) GetProjectUsers(projectID int, params db.RetrieveQueryParams) (users []db.UserWithProjectRole, err error)
func (*SqlDb) GetProjects ¶
func (*SqlDb) GetRepositories ¶
func (d *SqlDb) GetRepositories(projectID int, params db.RetrieveQueryParams) (repositories []db.Repository, err error)
func (*SqlDb) GetRepository ¶
func (*SqlDb) GetRepositoryRefs ¶
func (*SqlDb) GetRunners ¶
func (*SqlDb) GetSchedule ¶
func (*SqlDb) GetSession ¶
func (*SqlDb) GetTaskOutputs ¶
func (*SqlDb) GetTemplate ¶
func (*SqlDb) GetTemplateRefs ¶
func (*SqlDb) GetTemplateSchedules ¶
func (*SqlDb) GetTemplateTasks ¶
func (d *SqlDb) GetTemplateTasks(projectID int, templateID int, params db.RetrieveQueryParams) (tasks []db.TaskWithTpl, err error)
func (*SqlDb) GetTemplates ¶
func (d *SqlDb) GetTemplates(projectID int, filter db.TemplateFilter, params db.RetrieveQueryParams) (templates []db.Template, err error)
func (*SqlDb) GetUserByLoginOrEmail ¶
func (*SqlDb) GetUserEvents ¶
func (*SqlDb) IsInitialized ¶
func (*SqlDb) IsMigrationApplied ¶
IsMigrationApplied queries the database to see if a migration table with this version id exists already
func (*SqlDb) PermanentConnection ¶
func (*SqlDb) PrepareQuery ¶
func (*SqlDb) RekeyAccessKeys ¶
func (*SqlDb) SetScheduleCommitHash ¶
func (*SqlDb) SetScheduleLastCommitHash ¶
func (*SqlDb) SetViewPositions ¶
func (*SqlDb) TryRollbackMigration ¶
TryRollbackMigration attempts to rollback the database to an earlier version if a rollback exists
func (*SqlDb) UpdateEnvironment ¶
func (d *SqlDb) UpdateEnvironment(env db.Environment) error
func (*SqlDb) UpdateProjectUser ¶
func (d *SqlDb) UpdateProjectUser(projectUser db.ProjectUser) error
func (*SqlDb) UpdateRepository ¶
func (d *SqlDb) UpdateRepository(repository db.Repository) error
func (*SqlDb) UpdateUser ¶
func (d *SqlDb) UpdateUser(user db.UserWithPwd) error
Click to show internal directories.
Click to hide internal directories.