Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AllGenerator ¶
type AllGenerator struct { ID int64 `json:"id"` Host string `json:"host"` State string `json:"state"` Projects []string `json:"projects"` }
AllGenerator - struct for response all generators data
type AllHost ¶
type AllHost struct { ID int64 `json:"id"` Host string `json:"host"` Type string `json:"type` User string `json:user` State string `json:"state,omitempty"` Projects []string `json:"projects"` }
AllHost - struct for response all hosts data
type AllProjects ¶
type AllProjects struct { ID int64 `json:"id"` Name string `json:"name"` Status string `json:"status"` }
AllProjects - struct for response all Projects data
type AllScenario ¶
type AllScenario struct { ID int64 `json:"id"` Name string `json:"name"` Type string `json:"type"` Gun string `json:"gun"` LastModified string `json:"lastmodified"` Projects string `json:"projects"` TreadGroups string `json:"params"` }
AllScenario - struct for return all scenario
type AllService ¶
type AllService struct { ID int64 `json:"id"` Name string `json:"name"` Host string `json:"host"` Port string `json:"uri"` Type string `json:"type"` Projects []string `json:"projects"` }
AllService - struct for return all service
type AllServiceBinType ¶
AllServiceBinType - struct for return all type servicebins
type AllServiceBinsByOwner ¶
type AllServiceBinsByOwner struct { Owner string `json:"owner"` Services []ServicesBin `json:"services"` }
AllServiceBinsByOwner - struct for return all servicebins, sort by owner
type AllServiceBinsNoSort ¶
type AllServiceBinsNoSort struct { ID int64 `json:"id"` Name string `json:"name"` Type string `json:"type"` RunSTR string `json:"runstr"` Owner string `json:"owner"` LastModified string `json:"lastmodified"` Projects []string `json:"projects"` }
AllServiceBinsNoSort - struct for return all servicebins, no sotr
type AllUser ¶
type AllUser struct { ID int64 `json:id` User string `json:user` Password string `json:password,omitempty` Role string `json:role` Projects []string `json:"projects"` }
AllUser - struct for response all users data
type PGClient ¶
type PGClient interface { //runs GetLastRunID() (runID int64, err error) GetNewRunID() (runID int64, err error) SetStartTest(testName string, testType string) error SetStopTest(runID string) error //services NewServiceBin(name string, typeService string, runSTR string, own string, projects []string) (err error) UpdateServiceBin(id int64, runSTR string, projects []string) (err error) DeleteServiceBin(id int64) (err error) GetAllServiceBinsNoSort(projectIDs []string) (*[]AllServiceBinsNoSort, error) GetAllServiceBinsByOwner(projectIDs []string) (*[]AllServiceBinsByOwner, error) GetAllServiceBinsType() (*[]AllServiceBinType, error) NewService(name string, host string, uri string, typeService string, runSTR string, projects []string, owner string) (err error) GetAllServices() (*[]AllService, error) GetLastServiceID() (ID int64, err error) GetProjectServices(project string) (*[]AllService, error) UpdateServiceWithRunSTR(id int64, name string, host string, uri string, typeTest string, runSTR string) (err error) UpdateServiceWithOutRunSTR(id int64, name string, host string, uri string, typeTest string) error UpdatetServiceProjects(id int64, projects []string) error DeleteService(id int64) (err error) //scenario NewScenario(name string, typeTest string, gun string, projects string, params string) error CheckScenario(name string, gun string, projects string) (res bool, err error) GetAllScenarios() (*[]AllScenario, error) GetLastScenarioID() (ID int64, err error) GetScenarioName(id int64) (res string, err error) UpdateScenario(id int64, name string, typeTest string, gun string, projects string, params string) (err error) DeleteScenario(id int64) (err error) //Generators GetAllGenerators() ([]AllHost, error) GetLastGeneratorsID() (ID int64, err error) //hosts GetAllHosts() ([]AllHost, error) GetAllHostsWithProject(project string) ([]AllHost, error) HostIfExist(ip string) (bool, error) NewHost(ip string, user string, hostType string, projects []string) (err error) UpdateHost(id int64, ip string, hostType string, user string) (err error) DeleteHost(id int64) (err error) UpdatetHostProjects(id int64, projects []string) error GetUsersAndHosts() (map[string]string, error) GetUserToHost(ip string) (user string, err error) //users GetUserIDAndRole(user string) (id int64, role string, err error) GetUserProjects(userID int64) (projects []string, err error) GetProjectsIDtoString(projects []string) (ids []string, err error) GetProjectsIDtoInt(projects []string) (ids []int, err error) GetProjectName(id int64) (projectName string, err error) GetUserHash(user string) (hash string, err error) // GetUserPasswordExp(user string) (exp string, err error) // GetAllUsers() ([]AllUser, error) // NewUser(users string, password string, role string, projects []string) error // GetUserRoleAndProject(user string) (role string, projects []string, err error) // UpdateUser(id int64, role string) error // DeleteUser(user int64) (err error) // ChangeUserPassword(id int64, password string) (err error) // UpdatetUserProjects(user int64, projects []string) error // //projects GetAllProjects() ([]AllProjects, error) NewProject(project string) (err error) UpdateProject(id int64, project string, status string) (err error) DeleteProject(id int64) (err error) //role NewRole(role string) (err error) UpdateRole(id int64, role string) (err error) DeleteRole(id int64) (err error) GetAllRoles() ([]AllRoles, error) }
PGClient - postgres client impl
type SSHClient ¶
type SSHClient interface { Run(target string, str string) error RunNoWait(target string, str string) error Ping(target string) (res bool, err error) SCP(target, filePath, destinationPath string) error CombinedOutput(target string, str string) ([]byte, error) InstallServiceToRemoteHost(serviceType string, name string, target string, archType string) (err error) DeleteServiceFromRemoteHost(serviceType string, name string, target string) (err error) }
SSHClient - ssh package impl
Click to show internal directories.
Click to hide internal directories.