Versions in this module Expand all Collapse all v0 v0.2.2 Jun 19, 2020 Changes in this version + const ReleaseURL + type Database struct + Connection *gorm.DB + func (db *Database) AutoConnect() error + func (db *Database) Close() error + func (db *Database) Connect(dsn model.DSN) error + func (db *Database) CountJobs(status string) int + func (db *Database) CreateJob(job *model.Job) *model.Job + func (db *Database) DeleteJobByID(id int) + func (db *Database) DeleteJobByUUID(uuid string) + func (db *Database) GetJobByID(id int) model.Job + func (db *Database) GetJobByUUID(uuid string) model.Job + func (db *Database) GetJobs() []model.Job + func (db *Database) GetPendingJobByType(jobType string) model.Job + func (db *Database) HasTable(table string) bool + func (db *Database) JobExistByID(id int) bool + func (db *Database) JobExistByUUID(uuid string) bool + func (db *Database) Migrate() bool + func (db *Database) Ping() error + func (db *Database) ReleaseChildJobs(parentID int) + func (db *Database) Rollback() bool + func (db *Database) UpdateJobByID(job *model.Job) + type FileSystem struct + func (fs *FileSystem) DirExists(path string) bool + func (fs *FileSystem) EnsureDir(dirName string, mode int) (bool, error) + func (fs *FileSystem) FileExists(path string) bool + func (fs *FileSystem) PathExists(path string) bool + type HTTPClient struct + func NewHTTPClient() *HTTPClient + func (h *HTTPClient) BuildData(parameters map[string]string) string + func (h *HTTPClient) BuildParameters(endpoint string, parameters map[string]string) (string, error) + func (h *HTTPClient) Delete(ctx context.Context, endpoint string, parameters, headers map[string]string) (*http.Response, error) + func (h *HTTPClient) Get(ctx context.Context, endpoint string, parameters, headers map[string]string) (*http.Response, error) + func (h *HTTPClient) GetStatusCode(response *http.Response) int + func (h *HTTPClient) Post(ctx context.Context, endpoint string, data string, ...) (*http.Response, error) + func (h *HTTPClient) Put(ctx context.Context, endpoint string, data string, ...) (*http.Response, error) + func (h *HTTPClient) ToString(response *http.Response) (string, error) + type LatestRelease struct + Name string + TagName string + func GetLatestRelease() (LatestRelease, error) + func (lr *LatestRelease) ConvertToJSON() (string, error) + func (lr *LatestRelease) LoadFromJSON(data []byte) (bool, error)