Documentation ¶
Index ¶
- func AddRunningPlan(collectionID, planID int64) error
- func CreateCollection(name string, projectID int64) (int64, error)
- func CreatePlan(name string, projectID int64) (int64, error)
- func CreateProject(name, owner string) (int64, error)
- func DeleteRunningPlan(collectionID, planID int64) error
- type Account
- type Collection
- func (c *Collection) AddExecutionPlan(ep *ExecutionPlan) error
- func (c *Collection) Delete() error
- func (c *Collection) DeleteAllFiles() error
- func (c *Collection) DeleteExecutionPlan(collectionID, planID int64) error
- func (c *Collection) DeleteExecutionPlans() error
- func (c *Collection) DeleteFile(filename string) error
- func (c *Collection) DeleteRunHistory() error
- func (c *Collection) GetCurrentRun() (int64, error)
- func (c *Collection) GetExecutionPlans() ([]*ExecutionPlan, error)
- func (c *Collection) GetLastRun() (*RunHistory, error)
- func (c *Collection) GetRuns() ([]*RunHistory, error)
- func (c *Collection) HasRunningPlan() (bool, error)
- func (c *Collection) MakeFileName(filename string) string
- func (c *Collection) NewRun(runID int64) error
- func (c *Collection) RunFinish(runID int64) error
- func (c *Collection) StartRun() (int64, error)
- func (c *Collection) StopRun() error
- func (c *Collection) Store(ec *ExecutionCollection) error
- func (c *Collection) StoreFile(content io.ReadCloser, filename string) error
- type DBError
- type ExecutionCollection
- type ExecutionPlan
- type ExecutionWrapper
- type Plan
- func (p *Plan) Delete() error
- func (p *Plan) DeleteAllFiles() error
- func (p *Plan) DeleteFile(filename string) error
- func (p *Plan) GetPlanFiles() (*ShibuyaFile, []*ShibuyaFile, error)
- func (p *Plan) IsBeingUsed() (bool, error)
- func (p *Plan) MakeFileName(filename string) string
- func (p *Plan) StoreFile(content io.ReadCloser, filename string) error
- type Project
- type RunHistory
- type RunningPlan
- type ShibuyaFile
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddRunningPlan ¶
func CreateProject ¶
func DeleteRunningPlan ¶
Types ¶
type Account ¶
func GetAccountBySession ¶
type Collection ¶
type Collection struct { ID int64 `json:"id"` Name string `json:"name"` ProjectID int64 `json:"project_id"` ExecutionPlans []*ExecutionPlan `json:"execution_plans"` RunHistories []*RunHistory `json:"run_history"` CreatedTime time.Time `json:"created_time"` Data []*ShibuyaFile `json:"data"` CSVSplit bool `json:"csv_split"` }
func GetCollection ¶
func GetCollection(ID int64) (*Collection, error)
func (*Collection) AddExecutionPlan ¶
func (c *Collection) AddExecutionPlan(ep *ExecutionPlan) error
func (*Collection) Delete ¶
func (c *Collection) Delete() error
func (*Collection) DeleteAllFiles ¶
func (c *Collection) DeleteAllFiles() error
func (*Collection) DeleteExecutionPlan ¶
func (c *Collection) DeleteExecutionPlan(collectionID, planID int64) error
func (*Collection) DeleteExecutionPlans ¶
func (c *Collection) DeleteExecutionPlans() error
func (*Collection) DeleteFile ¶
func (c *Collection) DeleteFile(filename string) error
func (*Collection) DeleteRunHistory ¶
func (c *Collection) DeleteRunHistory() error
func (*Collection) GetCurrentRun ¶
func (c *Collection) GetCurrentRun() (int64, error)
func (*Collection) GetExecutionPlans ¶
func (c *Collection) GetExecutionPlans() ([]*ExecutionPlan, error)
func (*Collection) GetLastRun ¶
func (c *Collection) GetLastRun() (*RunHistory, error)
func (*Collection) GetRuns ¶
func (c *Collection) GetRuns() ([]*RunHistory, error)
func (*Collection) HasRunningPlan ¶
func (c *Collection) HasRunningPlan() (bool, error)
func (*Collection) MakeFileName ¶
func (c *Collection) MakeFileName(filename string) string
func (*Collection) NewRun ¶
func (c *Collection) NewRun(runID int64) error
func (*Collection) RunFinish ¶
func (c *Collection) RunFinish(runID int64) error
func (*Collection) StartRun ¶
func (c *Collection) StartRun() (int64, error)
func (*Collection) StopRun ¶
func (c *Collection) StopRun() error
func (*Collection) Store ¶
func (c *Collection) Store(ec *ExecutionCollection) error
func (*Collection) StoreFile ¶
func (c *Collection) StoreFile(content io.ReadCloser, filename string) error
type ExecutionCollection ¶
type ExecutionCollection struct { Name string `yaml:"name"` ProjectID int64 `yaml:"projectid"` CollectionID int64 `yaml:"collectionid"` Tests []*ExecutionPlan `yaml:"tests"` CSVSplit bool `yaml:"csv_split"` }
type ExecutionPlan ¶
type ExecutionPlan struct { Name string `yaml:"name" json:"name"` PlanID int64 `yaml:"testid" json:"plan_id"` Concurrency int `yaml:"concurrency" json:"concurrency"` Rampup int `yaml:"rampup" json:"rampup"` Engines int `yaml:"engines" json:"engines"` Duration int `yaml:"duration" json:"duration"` CSVSplit bool `yaml:"csv_split" json:"csv_split"` // go-sql-driver does not support tinyint mapped to bool directly: https://github.com/go-sql-driver/mysql/issues/440 }
func GetExecutionPlan ¶
func GetExecutionPlan(collectionID, planID int64) (*ExecutionPlan, error)
type ExecutionWrapper ¶
type ExecutionWrapper struct {
Content *ExecutionCollection `yaml:"multi-test"`
}
type Plan ¶
type Plan struct { ID int64 `json:"id"` Name string `json:"name"` ProjectID int64 `json:"project_id"` CreatedTime time.Time `json:"created_time"` TestFile *ShibuyaFile `json:"test_file"` Data []*ShibuyaFile `json:"data"` }
func (*Plan) DeleteAllFiles ¶
func (*Plan) DeleteFile ¶
func (*Plan) GetPlanFiles ¶
func (p *Plan) GetPlanFiles() (*ShibuyaFile, []*ShibuyaFile, error)
func (*Plan) IsBeingUsed ¶
func (*Plan) MakeFileName ¶
type Project ¶
type Project struct { ID int64 `json:"id"` Name string `json:"name"` Owner string `json:"owner"` CreatedTime time.Time `json:"created_time"` Collections []*Collection `json:"collections"` Plans []*Plan `json:"plans"` }
func GetProject ¶
func GetProjectsByOwners ¶
func (*Project) GetCollections ¶
type RunHistory ¶
type RunHistory struct { ID int64 `json:"id"` CollectionID int64 `json:"collection_id"` StartedTime time.Time `json:"started_time"` EndTime time.Time `json:"end_time"` }
func GetRun ¶
func GetRun(runID int64) (*RunHistory, error)
type RunningPlan ¶
type RunningPlan struct { CollectionID int64 `json:"collection_id"` PlanID int64 `json:"plan_id"` StartedTime time.Time `json:"started_time"` }
func GetRunningCollections ¶
func GetRunningCollections() ([]*RunningPlan, error)
func GetRunningPlan ¶
func GetRunningPlan(collectionID, planID int64) (*RunningPlan, error)
func GetRunningPlans ¶
func GetRunningPlans() ([]*RunningPlan, error)
func GetRunningPlansByCollection ¶
func GetRunningPlansByCollection(collectionID int64) ([]*RunningPlan, error)
type ShibuyaFile ¶
type ShibuyaFile struct { Filename string `json:"filename"` // Name of the file - a.txt Filepath string `json:"filepath"` // Relative path of the file - /plan/22/a.txt Filelink string `json:"filelink"` // Full url for users to download the file - storage.com/shibuya/plan/22/a.txt TotalSplits int `json:"total_splits"` CurrentSplit int `json:"current_split"` }
Click to show internal directories.
Click to hide internal directories.