Documentation ¶
Index ¶
- type Config
- type Host
- type PGClient
- func (c PGClient) ChangeUserPassword(id int64, password string) (err error)
- func (c PGClient) CheckScenario(name string, gun string, projects string) (res bool, err error)
- func (c PGClient) DeleteHost(id int64) (err error)
- func (c PGClient) DeleteProject(id int64) (err error)
- func (c PGClient) DeleteRole(id int64) (err error)
- func (c PGClient) DeleteScenario(id int64) (err error)
- func (c PGClient) DeleteService(id int64) (err error)
- func (c PGClient) DeleteServiceBin(id int64) (err error)
- func (c PGClient) DeleteUser(id int64) (err error)
- func (c PGClient) GetAllGenerators() ([]Host, error)
- func (c PGClient) GetAllHosts() ([]Host, error)
- func (c PGClient) GetAllHostsWithProject(project string) ([]Host, error)
- func (c PGClient) GetAllProjects() ([]Project, error)
- func (c PGClient) GetAllRoles() ([]Role, error)
- func (c PGClient) GetAllScenarios() (*[]Scenario, error)
- func (c PGClient) GetAllServiceBinsByOwner(projectIDs []string) (*[]ServiceBinsByOwner, error)
- func (c PGClient) GetAllServiceBinsType() (*[]ServiceBin, error)
- func (c PGClient) GetAllServices() (*[]Service, error)
- func (c PGClient) GetAllUsers() (users []User, err error)
- func (c PGClient) GetLastScenarioID() (id int64, err error)
- func (c PGClient) GetNewRunID() (runID int64, err error)
- func (c PGClient) GetProjectName(id int64) (projectName string, err error)
- func (c PGClient) GetProjectsIDtoString(projects []string) (ids []string, err error)
- func (c PGClient) GetScenarioName(id int64) (res string, err error)
- func (c PGClient) GetService(id int64) (res *Service, err error)
- func (c PGClient) GetServiceBin(id int64) (*ServiceBin, error)
- func (c PGClient) GetServicesByProject(projects []string) (*[]Service, error)
- func (c PGClient) GetUserHash(user string) (hash string, err error)
- func (c PGClient) GetUserIDAndRole(user string) (id int64, role string, err error)
- func (c PGClient) GetUserPasswordExp(user string) (exp string, err error)
- func (c PGClient) GetUserProjects(userID int64) (projects []string, err error)
- func (c PGClient) GetUserRoleAndProjects(user string) (role string, projects []string, err error)
- func (c PGClient) GetUserToHost(ip string) (user string, err error)
- func (c PGClient) GetUsersAndHosts() (map[string]string, error)
- func (c PGClient) HostIfExist(ip string) (bool, error)
- func (c PGClient) NewHost(ip string, user string, hostType string, projects []string) (err error)
- func (c PGClient) NewProject(project string) (err error)
- func (c PGClient) NewRole(role string) (err error)
- func (c PGClient) NewScenario(name string, typeTest string, gun string, projects string, params string) (err error)
- func (c PGClient) NewService(name string, binsIB int64, host string, port int, typeService string, ...) (err error)
- func (c PGClient) NewServiceBin(name string, typeService string, runSTR string, own string, projects []string) (err error)
- func (c PGClient) NewUser(users string, password string, role string, projects []string) error
- func (c PGClient) SetStartTest(testName string, testType string) (err error)
- func (c PGClient) SetStopTest(runID string) error
- func (c PGClient) UpdateHost(id int64, ip string, hostType string, user string) (err error)
- func (c PGClient) UpdateProject(id int64, project string, status string) (err error)
- func (c PGClient) UpdateRole(id int64, role string) (err error)
- func (c PGClient) UpdateScenario(id int64, name string, typeTest string, gun string, projects string, ...) (err error)
- func (c PGClient) UpdateService(id int64, port int, runSTR string) (err error)
- func (c PGClient) UpdateServiceBin(id int64, runSTR string, projects []string) (err error)
- func (c PGClient) UpdateUser(id string, role string, projects []string) error
- func (c PGClient) UpdatetHostProjects(id int64, projects []string) error
- func (c PGClient) UpdatetUserProjects(id int64, projects []string) error
- type Project
- type Role
- type Scenario
- type Service
- type ServiceBin
- type ServiceBinsByOwner
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Host ¶
type Host 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"` }
Host - struct for response all hosts data
type PGClient ¶
PGClient struct for postgres client
func (PGClient) ChangeUserPassword ¶
ChangeUserPassword - delete user
func (PGClient) CheckScenario ¶
CheckScenario - Check scenario, if exist return true, if not exist return fasle
func (PGClient) DeleteHost ¶
DeleteHost - delete host
func (PGClient) DeleteProject ¶
DeleteProject - update projects values to table scenarios
func (PGClient) DeleteRole ¶
DeleteRole - update role values to table scenarios
func (PGClient) DeleteScenario ¶
DeleteScenario - delete scenario from db
func (PGClient) DeleteService ¶
DeleteService - func for delete row from db
func (PGClient) DeleteServiceBin ¶
DeleteServiceBin - delete row from table tBins
func (PGClient) DeleteUser ¶
DeleteUser - delete user
func (PGClient) GetAllGenerators ¶
GetAllGenerators - return all generators info.
func (PGClient) GetAllHosts ¶
GetAllHosts - func return all hosts
func (PGClient) GetAllHostsWithProject ¶
GetAllHostsWithProject - func return all hosts
func (PGClient) GetAllProjects ¶
GetAllProjects - func return all projects
func (PGClient) GetAllRoles ¶
GetAllRoles - func return all projects
func (PGClient) GetAllScenarios ¶
GetAllScenarios - return all scenario info
func (PGClient) GetAllServiceBinsByOwner ¶
func (c PGClient) GetAllServiceBinsByOwner(projectIDs []string) (*[]ServiceBinsByOwner, error)
GetAllServiceBinsByOwner - return all servicebins info
func (PGClient) GetAllServiceBinsType ¶
func (c PGClient) GetAllServiceBinsType() (*[]ServiceBin, error)
GetAllServiceBinsType - return all servicebins type
func (PGClient) GetAllServices ¶
GetAllServices - return all services info
func (PGClient) GetAllUsers ¶
GetAllUsers - return user password expiration
func (PGClient) GetLastScenarioID ¶
GetLastScenarioID - func to return lfst scenario id
func (PGClient) GetNewRunID ¶
GetNewRunID - return new run ID
func (PGClient) GetProjectName ¶
GetProjectName - func return project name
func (PGClient) GetProjectsIDtoString ¶
GetProjectsIDtoString - func to return all users role and project for front project and role models
func (PGClient) GetScenarioName ¶
GetScenarioName - insert new scenario values to table scenarios
func (PGClient) GetService ¶
GetService - return ONLY type,name and runSTR for service
func (PGClient) GetServiceBin ¶
func (c PGClient) GetServiceBin(id int64) (*ServiceBin, error)
GetServiceBin return serviceBin info(ONLY ID, Name, Type and runSTR)
func (PGClient) GetServicesByProject ¶
GetServicesByProject - func return all service for user project
func (PGClient) GetUserHash ¶
GetUserHash - return user password hash
func (PGClient) GetUserIDAndRole ¶
GetUserIDAndRole - func to return all users role and project for front project and role models
func (PGClient) GetUserPasswordExp ¶
GetUserPasswordExp - return user password expiration
func (PGClient) GetUserProjects ¶
GetUserProjects - func to return all users role and project for front project and role models
func (PGClient) GetUserRoleAndProjects ¶
GetUserRoleAndProjects - func to return all users role and project for front project and role models
func (PGClient) GetUserToHost ¶
GetUserToHost - func return user to host
func (PGClient) GetUsersAndHosts ¶
GetUsersAndHosts - func return ipp host and user for him
func (PGClient) HostIfExist ¶
HostIfExist - chacke host, is exist return true
func (PGClient) NewProject ¶
NewProject - insert new projects from database
func (PGClient) NewScenario ¶
func (c PGClient) NewScenario(name string, typeTest string, gun string, projects string, params string) (err error)
NewScenario - insert new scenario values to table scenarios
func (PGClient) NewService ¶
func (c PGClient) NewService(name string, binsIB int64, host string, port int, typeService string, runSTR string, projects []string, owner string) (err error)
NewService - insert new scenario values to table scenarios
func (PGClient) NewServiceBin ¶
func (c PGClient) NewServiceBin(name string, typeService string, runSTR string, own string, projects []string) (err error)
NewServiceBin - insert new scenario values to table scenarios
func (PGClient) SetStartTest ¶
SetStartTest - insert scenario values to table runs at start scenario
func (PGClient) SetStopTest ¶
SetStopTest - stop runs scenario. Send kill to parent procces a gatling
func (PGClient) UpdateHost ¶
UpdateHost - update host values to table scenarios
func (PGClient) UpdateProject ¶
UpdateProject - insert new projects from database
func (PGClient) UpdateRole ¶
UpdateRole - update role values
func (PGClient) UpdateScenario ¶
func (c PGClient) UpdateScenario(id int64, name string, typeTest string, gun string, projects string, params string) (err error)
UpdateScenario - update scenario values to table scenarios
func (PGClient) UpdateService ¶
UpdateService - update service values in database wothout string for run service
func (PGClient) UpdateServiceBin ¶
UpdateServiceBin - func for update bins info
func (PGClient) UpdateUser ¶
UpdateUser - func for update users, if len slice project ==0, projects not updatet
func (PGClient) UpdatetHostProjects ¶
UpdatetHostProjects -
type Project ¶
type Project struct { ID int64 `json:"id"` Name string `json:"name"` Status string `json:"status"` }
Project - temp struct for response all Projects data
type Scenario ¶
type Scenario 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"` }
Scenario - struct for return all scenario
type Service ¶
type Service struct { ID int64 `json:"id"` Name string `json:"name"` Host string `json:"host"` Port int `json:"port"` Owner string `json:"owner"` Type string `json:"type"` RunSTR string `json:"runstr"` BinsID int64 `json:"binsid"` Status string `json:"status,omitempty"` Projects []string `json:"projects"` }
Service - struct for return all service
type ServiceBin ¶
type ServiceBin struct { ID int64 `json:"id"` Name string `json:"name,omitempty"` Type string `json:"type,omitempty"` RunSTR string `json:"runstr,omitempty"` Owner string `json:"owner,omitempty"` LastModified string `json:"lastmodified,omitempty"` Projects []string `json:"projects,omitempty"` }
ServiceBin - substruct for AllServiceBinsByOwner
type ServiceBinsByOwner ¶
type ServiceBinsByOwner struct { Owner string `json:"owner"` Services []ServiceBin `json:"services"` }
ServiceBinsByOwner - struct for return all servicebins, sort by owner