Versions in this module Expand all Collapse all v1 v1.0.0 Apr 20, 2020 Changes in this version + const TestPassword + const TestUser + var Drives = &DriveLibrary + var ErrNotFound = errors.New("not found") + var Jobs = &JobLibrary + var LibDrives = &DriveLibrary + func AddServer(s *data.Server) error + func AddServers(ss []data.Server) []string + func Endpoint(section string) string + func GenerateUUID() (string, error) + func Get(section string) (*https.Response, error) + func GetAuth(section, username, password string) (*https.Response, error) + func GetID(h http.Header) (int, error) + func GetIDFromRequest(r *http.Request) int + func GetIDFromResponse(r *https.Response) int + func InitDrive(d *data.Drive) (*data.Drive, error) + func InitJob(j *data.Job) (*data.Job, error) + func IsStarted() bool + func Log(t *testing.T, jj []JournalEntry) + func LogDetail(t *testing.T, j JournalEntry) + func LogResponse(t *testing.T, r *https.Response) + func LogURL(t *testing.T, j JournalEntry) + func PutJournal(id int, name string, r *http.Request, rr *httptest.ResponseRecorder) + func RemoveServer(uuid string) bool + func Reset() + func ResetDrives() + func ResetServers() + func SetID(h http.Header, id int) + func SetServerStatus(uuid, status string) + func Start() + func Stop() + type DriveLibrary struct + func (d *DriveLibrary) Add(drv *data.Drive) error + func (d *DriveLibrary) AddDrives(dd []data.Drive) []string + func (d *DriveLibrary) Clone(uuid string, params map[string]interface{}) (string, error) + func (d *DriveLibrary) Remove(uuid string) bool + func (d *DriveLibrary) Reset() + func (d *DriveLibrary) Resize(uuid string, size uint64) error + func (d *DriveLibrary) SetStatus(uuid, status string) + type JobLibrary struct + func (j *JobLibrary) Add(job *data.Job) error + func (j *JobLibrary) AddJobs(jj []data.Job) []string + func (j *JobLibrary) Remove(uuid string) bool + func (j *JobLibrary) Reset() + func (j *JobLibrary) SetProgress(uuid string, progress int) + func (j *JobLibrary) SetState(uuid, state string) + type JournalEntry struct + Name string + Request *http.Request + Response *httptest.ResponseRecorder + func GetJournal(id int) []JournalEntry