package
2.5.1+incompatible
Repository: https://github.com/codyguo/semaphore.git
Documentation: pkg.go.dev

# Functions

Close closes the mysql connection and reports any errors called from main with a defer.
Connect ensures that the db is connected and mapped properly with gorp.
FetchUser retrieves a user from the database by ID.
GetParsedTime returns the timestamp as it will retrieved from the database This allows us to create timestamp consistency on return values from create requests.
MigrateAll checks for db migrations and executes them.
SetupDBLink is called by main after initialization of the Mysql object to create or return an existing table map.

# Constants

DatabaseTimeFormat represents the format that dredd uses to validate the datetime.

# Variables

Mysql is the gorp database map db.Connect must be called to set this up correctly.
Versions holds all sql schema version references.

# Structs

AccessKey represents a key used to access a machine with ansible from semaphore.
APIToken is given to a user to allow API access.
Environment is used to pass additional arguments, in json form to ansible.
Event represents information generated by ansible or api action captured to the database during execution.
Inventory is the model of an ansible inventory file.
Project is the top level structure in Semaphore.
Repository is the model for code stored in a git repository.
Session is a connection to the API.
Task is a model of a task which will be executed by the runner.
TaskOutput is the ansible log output from the task.
Template is a user defined model that is used to run a task.
User is the model for an entity which has access to the API.
Version represents an sql schema version.