Documentation ¶
Index ¶
- Constants
- Variables
- func GetAdminTenantsBillingAction(ctx context.Context, beforeTenantID string, ag *agent.Agent) (*http.Response, error, string)
- func GetFile(ctx context.Context, ag *agent.Agent, path string) (*http.Response, error)
- func GetOrganizerBillingAction(ctx context.Context, ag *agent.Agent) (*http.Response, error, string)
- func GetOrganizerCompetitionsAction(ctx context.Context, ag *agent.Agent) (*http.Response, error, string)
- func GetOrganizerPlayersListAction(ctx context.Context, ag *agent.Agent) (*http.Response, error, string)
- func GetPlayerAction(ctx context.Context, playerID string, ag *agent.Agent) (*http.Response, error, string)
- func GetPlayerCompetitionRankingAction(ctx context.Context, competitionID string, rankAfter string, ag *agent.Agent) (*http.Response, error, string)
- func GetPlayerCompetitionsAction(ctx context.Context, ag *agent.Agent) (*http.Response, error, string)
- func InitializeData()
- func LoadFromJSONFile[T LoadModel](jsonFile string) ([]*T, error)
- func PostAdminTenantsAddAction(ctx context.Context, name, displayName string, ag *agent.Agent) (*http.Response, error, string)
- func PostInitializeAction(ctx context.Context, ag *agent.Agent) (*http.Response, error)
- func PostOrganizerApiPlayerDisqualifiedAction(ctx context.Context, playerID string, ag *agent.Agent) (*http.Response, error, string)
- func PostOrganizerCompetitionFinishAction(ctx context.Context, competitionID string, ag *agent.Agent) (*http.Response, error, string)
- func PostOrganizerCompetitionScoreAction(ctx context.Context, competitionID string, csv []byte, ag *agent.Agent) (*http.Response, error, string)
- func PostOrganizerCompetitionsAddAction(ctx context.Context, title string, ag *agent.Agent) (*http.Response, error, string)
- func PostOrganizerPlayersAddAction(ctx context.Context, playerDisplayNames []string, ag *agent.Agent) (*http.Response, error, string)
- func RequestWithRetry(ctx context.Context, reqFn func() (*http.Request, error), ...) (*http.Response, error)
- func SleepWithCtx(ctx context.Context, sleepTime time.Duration)
- type Account
- type CompactLogger
- type CompetitionData
- type InitialDataRow
- type InitialDataRows
- type InitialDataTenantRow
- type InitialDataTenantRows
- type LoadModel
- type Option
- type OrganizerJobConfig
- type OrganizerJobResult
- type PlayerData
- type Response
- type ResponseAPI
- type ResponseAPIBase
- type ResponseAPIBilling
- type ResponseAPICompetitionRanking
- type ResponseAPICompetitionRankingFinish
- type ResponseAPICompetitionResult
- type ResponseAPICompetitions
- type ResponseAPICompetitionsAdd
- type ResponseAPIInitialize
- type ResponseAPIPlayer
- type ResponseAPIPlayerDisqualified
- type ResponseAPIPlayersAdd
- type ResponseAPIPlayersList
- type ResponseAPITenantsAdd
- type ResponseAPITenantsBilling
- type ResponseValidator
- func WithBodySameFile(filePath string) ResponseValidator
- func WithCacheControlPrivate() ResponseValidator
- func WithContentType(wantContentType string) ResponseValidator
- func WithErrorResponse[T ResponseAPI]() ResponseValidator
- func WithStatusCode(statusCodes ...int) ResponseValidator
- func WithSuccessResponse[T ResponseAPI](validates ...func(res T) error) ResponseValidator
- type Scenario
- func (sc *Scenario) AddCriticalCount()
- func (sc *Scenario) AddErrorCount()
- func (sc *Scenario) AddScoreByScenario(step *isucandar.BenchmarkStep, scoreTag score.ScoreTag, ...)
- func (sc *Scenario) AdminBillingScenario(ctx context.Context, step *isucandar.BenchmarkStep, scTag ScenarioTag) error
- func (sc *Scenario) AdminBillingScenarioWorker(step *isucandar.BenchmarkStep, p int32) (Worker, error)
- func (sc *Scenario) AdminBillingValidate(ctx context.Context, step *isucandar.BenchmarkStep) error
- func (sc *Scenario) AdminBillingValidateWorker(step *isucandar.BenchmarkStep, p int32) (*adminBillingValidateWorker, error)
- func (sc *Scenario) CountWorker(name string)
- func (sc *Scenario) CountdownWorker(ctx context.Context, name string)
- func (sc *Scenario) GetAccountAndAgent(role, tenantName, playerID string) (*Account, *agent.Agent, error)
- func (sc *Scenario) Load(ctx context.Context, step *isucandar.BenchmarkStep) error
- func (sc *Scenario) NewTenantScenario(ctx context.Context, step *isucandar.BenchmarkStep, tenant *isuports.TenantRow) error
- func (sc *Scenario) NewTenantScenarioWorker(step *isucandar.BenchmarkStep, tenant *isuports.TenantRow, p int32) (*newTenantScenarioWorker, error)
- func (sc *Scenario) OrganizerJob(ctx context.Context, step *isucandar.BenchmarkStep, conf *OrganizerJobConfig) (*OrganizerJobResult, error)
- func (sc *Scenario) PlayerAddCountAdd(num int)
- func (sc *Scenario) PlayerAddCountPrint()
- func (sc *Scenario) PlayerDelCountAdd(num int)
- func (sc *Scenario) PlayerDelCountPrint()
- func (sc *Scenario) PlayerScenario(ctx context.Context, step *isucandar.BenchmarkStep, scTag ScenarioTag, ...) error
- func (sc *Scenario) PlayerScenarioReproduce(ctx context.Context, step *isucandar.BenchmarkStep, scTag ScenarioTag, ...) error
- func (sc *Scenario) PlayerScenarioWorker(step *isucandar.BenchmarkStep, p int32, tenantName, playerID string) (Worker, error)
- func (sc *Scenario) PlayerValidateScenario(ctx context.Context, step *isucandar.BenchmarkStep, scTag ScenarioTag) error
- func (sc *Scenario) PlayerValidateScenarioWorker(step *isucandar.BenchmarkStep, p int32) (Worker, error)
- func (sc *Scenario) PopularTenantScenario(ctx context.Context, step *isucandar.BenchmarkStep, scTag ScenarioTag, ...) error
- func (sc *Scenario) PopularTenantScenarioWorker(step *isucandar.BenchmarkStep, p int32, isHeavyTenant bool) (Worker, error)
- func (sc *Scenario) Prepare(ctx context.Context, step *isucandar.BenchmarkStep) error
- func (sc *Scenario) PrintScenarioCount()
- func (sc *Scenario) PrintScenarioScoreMap()
- func (sc *Scenario) PrintWorkerCount()
- func (sc *Scenario) ScenarioError(scTag ScenarioTag, err error)
- func (sc *Scenario) ScenarioStart(scTag ScenarioTag)
- func (sc *Scenario) TenantBillingValidate(ctx context.Context, step *isucandar.BenchmarkStep) error
- func (sc *Scenario) TenantBillingValidateWorker(step *isucandar.BenchmarkStep, p int32) (*tenantBillingValidateWorker, error)
- func (sc *Scenario) ValidationScenario(ctx context.Context, step *isucandar.BenchmarkStep) error
- type ScenarioTag
- type ScoreRow
- type ScoreRows
- type TenantData
- type ValidationError
- type Worker
Constants ¶
const ( ConstMaxError = 30 ConstMaxCriticalError = 10 // PlayerScenario ConstPlayerScenarioCompetitionLoopCount = 10 // 一周でいくつ大会を見るか ConstPlayerScenarioMaxPlayerCount = 10 // 大会1つあたり何人のプレイヤー詳細を見るか(最大値) // TenantBillingValidateScenario ConstTenantBillingValidateScenarioPlayerNum = 100 // TenantBilling検証用テナントのplayer数 // AdminBillingValidateScenario ConstAdminBillingValidateScenarioPlayerNum = 100 // TenantBilling検証用テナントのplayer数 )
const ( AccountRoleAdmin = "admin" AccountRoleOrganizer = "organizer" AccountRolePlayer = "player" )
const ( ErrFailedPrepare failure.StringCode = "fail-prepare" ErrFailedLoad failure.StringCode = "fail-load" ErrNormalError failure.StringCode = "error-normal" ErrCriticalError failure.StringCode = "error-critical" )
const ( ScorePOSTAdminTenantsAdd score.ScoreTag = "POST /api/admin/tenants/add" ScoreGETAdminTenantsBilling score.ScoreTag = "GET /api/admin/tenants/billing" ScoreGETOrganizerPlayersList score.ScoreTag = "GET /api/organizer/players/list" ScorePOSTOrganizerPlayersAdd score.ScoreTag = "POST /api/organizer/players/add" ScorePOSTOrganizerPlayerDisqualified score.ScoreTag = "POST /api/organizer/player/:player_name/disqualified" ScorePOSTOrganizerCompetitionsAdd score.ScoreTag = "POST /api/organizer/competitions/add" ScorePOSTOrganizerCompetitionFinish score.ScoreTag = "POST /api/organizer/competition/:competition_id/finish" ScorePOSTOrganizerCompetitionScore score.ScoreTag = "POST /api/organizer/competition/:competition_id/score" ScoreGETOrganizerBilling score.ScoreTag = "GET /api/organizer/billing" ScoreGETOrganizerCompetitions score.ScoreTag = "GET /api/organizer/competitions" ScoreGETPlayerDetails score.ScoreTag = "GET /api/player/player/:player_name" ScoreGETPlayerRanking score.ScoreTag = "GET /api/player/competition/:competition_id/ranking" ScoreGETPlayerCompetitions score.ScoreTag = "GET /api/player/competitions" )
シナリオで発生するスコアのタグ
const (
ErrValidation failure.StringCode = "load-validation"
)
failure.NewError で用いるエラーコード定義
Variables ¶
var ( // NOTE: 初期データ範囲 // 1: ISUコングロマリット(巨大テナント) ConstPopularTenantScenarioIDRange = []int{1, 29} // 破壊的変更NGで ConstValidateScenarioAdminBillingIDRange = []int{12, 29} // 整合性チェックで利用 ConstAdminBillingValidateScenarioIDRange = []int{30, 69} // 大会追加OK ConstPlayerValidateScenarioIDRange = []int{70, 99} // 破壊的変更OK )
var ( // 選手向け情報を出力するロガー ContestantLogger = log.New(os.Stdout, "", log.Ltime|log.Lmicroseconds) // 大会運営向け情報を出力するロガー AdminLogger = log.New(os.Stderr, "[ADMIN] ", log.Ltime|log.Lmicroseconds) )
var ( Debug = false // これ以上エラーが出たら打ち切り MaxErrors = 30 // エラーが発生したらこの時間だけSleepする(暴発防止) SleepOnError = time.Second )
var ( ScenarioTagList = []ScenarioTag{ ScenarioTagAdminBilling, ScenarioTagOrganizerNewTenant, ScenarioTagOrganizerPopularTenant, ScenarioTagOrganizerPeacefulTenant, ScenarioTagPlayer, ScenarioTagPlayerValidate, ScenarioTagTenantBillingValidate, ScenarioTagAdminBillingValidate, } ScoreTagList = []score.ScoreTag{ ScorePOSTAdminTenantsAdd, ScoreGETAdminTenantsBilling, ScorePOSTOrganizerPlayersAdd, ScorePOSTOrganizerPlayerDisqualified, ScorePOSTOrganizerCompetitionsAdd, ScorePOSTOrganizerCompetitionFinish, ScorePOSTOrganizerCompetitionScore, ScoreGETOrganizerBilling, ScoreGETPlayerDetails, ScoreGETPlayerRanking, ScoreGETPlayerCompetitions, } )
各tagのリスト
var ResultScoreMap = map[score.ScoreTag]int64{ ScoreGETOrganizerBilling: 10, ScorePOSTAdminTenantsAdd: 10, ScorePOSTOrganizerCompetitionsAdd: 10, ScorePOSTOrganizerCompetitionScore: 10, ScorePOSTOrganizerPlayersAdd: 10, ScorePOSTOrganizerCompetitionFinish: 10, ScorePOSTOrganizerPlayerDisqualified: 1, ScoreGETAdminTenantsBilling: 1, ScoreGETOrganizerPlayersList: 1, ScoreGETOrganizerCompetitions: 1, ScoreGETPlayerDetails: 1, ScoreGETPlayerRanking: 1, ScoreGETPlayerCompetitions: 1, }
ScoreTag毎の倍率
Functions ¶
func GetPlayerAction ¶
func InitializeData ¶
func InitializeData()
func LoadFromJSONFile ¶
func PostInitializeAction ¶
Types ¶
type Account ¶
type Account struct { Agent *agent.Agent Option Option // SetJWT時にGetAgentをしたいのでしぶしぶ含めた Role string TenantName string // JWTのaudience adminの場合は空(あるいは無視) PlayerID string // JWTのsubject // Invalid JWT用 セットされていなければ有効な鍵がセットされる InvalidRSAKey bool InvalidKeyArgo bool // contains filtered or unexported fields }
func (*Account) GetRequestURL ¶
{admin,[tenantName]}.t.isucon.dev 的なURLを組み立てる
type CompactLogger ¶
type CompactLogger struct {
// contains filtered or unexported fields
}
func NewCompactLog ¶
func NewCompactLog(lgr *log.Logger, wg sync.WaitGroup) *CompactLogger
func (*CompactLogger) Log ¶
func (cl *CompactLogger) Log()
func (*CompactLogger) Printf ¶
func (cl *CompactLogger) Printf(format string, args ...any)
type CompetitionData ¶
type InitialDataRow ¶
type InitialDataRow data.BenchmarkerSource
type InitialDataRows ¶
type InitialDataRows []*InitialDataRow
func GetInitialData ¶
func GetInitialData() (InitialDataRows, error)
func (InitialDataRows) Choise ¶
func (idrs InitialDataRows) Choise() *InitialDataRow
type InitialDataTenantRow ¶
type InitialDataTenantRow data.BenchmarkerTenantSource
type InitialDataTenantRows ¶
type InitialDataTenantRows []*InitialDataTenantRow
func GetInitialDataTenant ¶
func GetInitialDataTenant() (InitialDataTenantRows, error)
type LoadModel ¶
type LoadModel interface { InitialDataRow | InitialDataTenantRow }
type Option ¶
type Option struct { TargetURL string TargetAddr string RequestTimeout time.Duration InitializeRequestTimeout time.Duration ExitErrorOnFail bool Duration time.Duration PrepareOnly bool SkipPrepare bool DataDir string Debug bool StrictPrepare bool Reproduce bool }
func (Option) NewTransport ¶
type OrganizerJobConfig ¶
type OrganizerJobConfig struct {
// contains filtered or unexported fields
}
type OrganizerJobResult ¶
type OrganizerJobResult struct {
ScoredPlayerNum int
}
type PlayerData ¶
type ResponseAPI ¶
type ResponseAPI interface { ResponseAPIBase | ResponseAPITenantsAdd | ResponseAPITenantsBilling | ResponseAPIPlayersAdd | ResponseAPIPlayersList | ResponseAPIPlayerDisqualified | ResponseAPICompetitionsAdd | ResponseAPIBilling | ResponseAPIPlayer | ResponseAPICompetitionRanking | ResponseAPICompetitions | ResponseAPIInitialize | ResponseAPICompetitionRankingFinish | ResponseAPICompetitionResult IsSuccess() bool ErrorMessage() string }
type ResponseAPIBase ¶
type ResponseAPIBase struct { Status bool `json:"status"` Message string `json:"message,omitempty"` }
func (ResponseAPIBase) ErrorMessage ¶
func (r ResponseAPIBase) ErrorMessage() string
func (ResponseAPIBase) IsSuccess ¶
func (r ResponseAPIBase) IsSuccess() bool
type ResponseAPIBilling ¶
type ResponseAPIBilling struct { ResponseAPIBase Data isuports.BillingHandlerResult `json:"data"` }
type ResponseAPICompetitionRanking ¶
type ResponseAPICompetitionRanking struct { ResponseAPIBase Data isuports.CompetitionRankingHandlerResult `json:"data"` }
type ResponseAPICompetitionRankingFinish ¶
type ResponseAPICompetitionRankingFinish struct {
ResponseAPIBase
}
type ResponseAPICompetitionResult ¶
type ResponseAPICompetitionResult struct { ResponseAPIBase Data isuports.ScoreHandlerResult `json:"data"` }
type ResponseAPICompetitions ¶
type ResponseAPICompetitions struct { ResponseAPIBase Data isuports.CompetitionsHandlerResult `json:"data"` }
type ResponseAPICompetitionsAdd ¶
type ResponseAPICompetitionsAdd struct { ResponseAPIBase Data isuports.CompetitionsAddHandlerResult `json:"data"` }
type ResponseAPIInitialize ¶
type ResponseAPIInitialize struct { ResponseAPIBase Data isuports.InitializeHandlerResult `json:"data"` }
type ResponseAPIPlayer ¶
type ResponseAPIPlayer struct { ResponseAPIBase Data isuports.PlayerHandlerResult `json:"data"` }
type ResponseAPIPlayerDisqualified ¶
type ResponseAPIPlayerDisqualified struct { ResponseAPIBase Data isuports.PlayerDisqualifiedHandlerResult `json:"data"` }
type ResponseAPIPlayersAdd ¶
type ResponseAPIPlayersAdd struct { ResponseAPIBase Data isuports.PlayersAddHandlerResult `json:"data"` }
type ResponseAPIPlayersList ¶
type ResponseAPIPlayersList struct { ResponseAPIBase Data isuports.PlayersListHandlerResult `json:"data"` }
type ResponseAPITenantsAdd ¶
type ResponseAPITenantsAdd struct { ResponseAPIBase Data isuports.TenantsAddHandlerResult `json:"data"` }
type ResponseAPITenantsBilling ¶
type ResponseAPITenantsBilling struct { ResponseAPIBase Data isuports.TenantsBillingHandlerResult `json:"data"` }
type ResponseValidator ¶
レスポンスを検証するバリデータ関数の型
func WithBodySameFile ¶
func WithBodySameFile(filePath string) ResponseValidator
func WithCacheControlPrivate ¶
func WithCacheControlPrivate() ResponseValidator
func WithContentType ¶
func WithContentType(wantContentType string) ResponseValidator
func WithErrorResponse ¶
func WithErrorResponse[T ResponseAPI]() ResponseValidator
func WithStatusCode ¶
func WithStatusCode(statusCodes ...int) ResponseValidator
ステータスコードコードを検証するバリデータ関数を返す高階関数 例: ValidateResponse(res, WithStatusCode(200, 304))
func WithSuccessResponse ¶
func WithSuccessResponse[T ResponseAPI](validates ...func(res T) error) ResponseValidator
type Scenario ¶
type Scenario struct { Option Option Errors failure.Errors ScenarioScoreMap sync.Map // map[string]*int64 ScenarioCountMap map[ScenarioTag][]int WorkerCountMap map[string]int ScenarioCountMutex sync.Mutex WorkerCountMutex sync.Mutex InitialData InitialDataRows InitialDataTenant InitialDataTenantRows DisqualifiedPlayer map[string]struct{} RawKey *rsa.PrivateKey WorkerCh chan Worker ErrorCh chan struct{} CriticalErrorCh chan struct{} HeavyTenantCount int CompetitionAddLog *CompactLogger TenantAddLog *CompactLogger PlayerAddCountMu sync.Mutex PlayerAddCount int PlayerDelCountMu sync.Mutex PlayerDelCount int // contains filtered or unexported fields }
オプションと全データを持つシナリオ構造体
func (*Scenario) AddCriticalCount ¶
func (sc *Scenario) AddCriticalCount()
func (*Scenario) AddErrorCount ¶
func (sc *Scenario) AddErrorCount()
func (*Scenario) AddScoreByScenario ¶
func (sc *Scenario) AddScoreByScenario(step *isucandar.BenchmarkStep, scoreTag score.ScoreTag, scenarioTag ScenarioTag)
どのシナリオから加算されたスコアかをカウントしならがスコアを追加する
func (*Scenario) AdminBillingScenario ¶
func (sc *Scenario) AdminBillingScenario(ctx context.Context, step *isucandar.BenchmarkStep, scTag ScenarioTag) error
func (*Scenario) AdminBillingScenarioWorker ¶
func (sc *Scenario) AdminBillingScenarioWorker(step *isucandar.BenchmarkStep, p int32) (Worker, error)
ずっと/admin/billingを見続けるシナリオ
func (*Scenario) AdminBillingValidate ¶
func (*Scenario) AdminBillingValidateWorker ¶
func (sc *Scenario) AdminBillingValidateWorker(step *isucandar.BenchmarkStep, p int32) (*adminBillingValidateWorker, error)
func (*Scenario) CountWorker ¶
func (*Scenario) CountdownWorker ¶
func (*Scenario) GetAccountAndAgent ¶
func (sc *Scenario) GetAccountAndAgent(role, tenantName, playerID string) (*Account, *agent.Agent, error)
Accountを作成してAccountとagent.Agentを返す
func (*Scenario) NewTenantScenario ¶
func (*Scenario) NewTenantScenarioWorker ¶
func (*Scenario) OrganizerJob ¶
func (sc *Scenario) OrganizerJob(ctx context.Context, step *isucandar.BenchmarkStep, conf *OrganizerJobConfig) (*OrganizerJobResult, error)
大会を作成, スコアを増やしながら入れる, 確定する
func (*Scenario) PlayerAddCountAdd ¶
func (*Scenario) PlayerAddCountPrint ¶
func (sc *Scenario) PlayerAddCountPrint()
func (*Scenario) PlayerDelCountAdd ¶
func (*Scenario) PlayerDelCountPrint ¶
func (sc *Scenario) PlayerDelCountPrint()
func (*Scenario) PlayerScenario ¶
func (sc *Scenario) PlayerScenario(ctx context.Context, step *isucandar.BenchmarkStep, scTag ScenarioTag, tenantName, playerID string) error
本来意図していた挙動版
func (*Scenario) PlayerScenarioReproduce ¶
func (sc *Scenario) PlayerScenarioReproduce(ctx context.Context, step *isucandar.BenchmarkStep, scTag ScenarioTag, tenantName, playerID string) error
以下は予選開催時の状態
func (*Scenario) PlayerScenarioWorker ¶
func (sc *Scenario) PlayerScenarioWorker(step *isucandar.BenchmarkStep, p int32, tenantName, playerID string) (Worker, error)
competition一覧を取り、rankingを参照するプレイヤー
func (*Scenario) PlayerValidateScenario ¶
func (sc *Scenario) PlayerValidateScenario(ctx context.Context, step *isucandar.BenchmarkStep, scTag ScenarioTag) error
func (*Scenario) PlayerValidateScenarioWorker ¶
func (sc *Scenario) PlayerValidateScenarioWorker(step *isucandar.BenchmarkStep, p int32) (Worker, error)
PlayerHandlerが不正な値を返さないかチェックする
func (*Scenario) PopularTenantScenario ¶
func (sc *Scenario) PopularTenantScenario(ctx context.Context, step *isucandar.BenchmarkStep, scTag ScenarioTag, isHeavyTenant bool) error
func (*Scenario) PopularTenantScenarioWorker ¶
func (*Scenario) Prepare ¶
isucandar.PrepeareScenario を満たすメソッド isucandar.Benchmark の Prepare ステップで実行される
func (*Scenario) PrintScenarioCount ¶
func (sc *Scenario) PrintScenarioCount()
func (*Scenario) PrintWorkerCount ¶
func (sc *Scenario) PrintWorkerCount()
func (*Scenario) ScenarioError ¶
func (sc *Scenario) ScenarioError(scTag ScenarioTag, err error)
func (*Scenario) TenantBillingValidate ¶
func (*Scenario) TenantBillingValidateWorker ¶
func (sc *Scenario) TenantBillingValidateWorker(step *isucandar.BenchmarkStep, p int32) (*tenantBillingValidateWorker, error)
3回までリトライOK
func (*Scenario) ValidationScenario ¶
ベンチ実行前の整合性検証シナリオ isucandar.ValidateScenarioを満たすメソッド isucandar.Benchmark の validation ステップで実行される
type ScenarioTag ¶
type ScenarioTag string
シナリオ分別用タグ
const ( ScenarioTagAdminBilling ScenarioTag = "AdminBilling" ScenarioTagOrganizerNewTenant ScenarioTag = "OrganizerNewTenant" ScenarioTagOrganizerPopularTenant ScenarioTag = "OrganizerPopularTenant" ScenarioTagOrganizerPeacefulTenant ScenarioTag = "OrganizerPeacefulTenant" ScenarioTagPlayer ScenarioTag = "Player" ScenarioTagPlayerValidate ScenarioTag = "PlayerValidate" ScenarioTagTenantBillingValidate ScenarioTag = "TenantBillingValidate" ScenarioTagAdminBillingValidate ScenarioTag = "AdminBillingValidate" )
func (ScenarioTag) String ¶
func (st ScenarioTag) String() string
type TenantData ¶
type ValidationError ¶
func ValidateResponse ¶
func ValidateResponse(title string, step *isucandar.BenchmarkStep, res *http.Response, err error, validators ...ResponseValidator) ValidationError
レスポンスを検証する関数 複数のバリデータ関数を受け取ってすべてでレスポンスを検証し、 ValidationError を返す
func ValidateResponseWithMsg ¶
func ValidateResponseWithMsg(title string, step *isucandar.BenchmarkStep, res *http.Response, err error, msg string, validators ...ResponseValidator) ValidationError
func (ValidationError) Add ¶
func (v ValidationError) Add(step *isucandar.BenchmarkStep)
func (ValidationError) Error ¶
func (v ValidationError) Error() string
error インターフェースを満たす Error メソッド
func (ValidationError) IsEmpty ¶
func (v ValidationError) IsEmpty() bool
ValidationError が空かを判定 NOTE: contextのキャンセルによって返されるValidationErrorは、IsEmptyはfalseでErrorsは空
Source Files ¶
- action.go
- constants.go
- init.go
- job_organizer.go
- logger.go
- models.go
- option.go
- scenario.go
- scenario_admin_billing.go
- scenario_admin_billing_validate.go
- scenario_new_tenant.go
- scenario_player.go
- scenario_player_validate.go
- scenario_popular_tenant.go
- scenario_tenant_billing_validate.go
- scenario_util.go
- scenario_validation.go
- tags.go
- validation.go