Documentation
¶
Index ¶
- Constants
- Variables
- func CheckClear(c *client.Forum, f *Factory)
- func CheckForum(c *client.Forum, forum *models.Forum)
- func CheckForumCreateConflict(c *client.Forum, f *Factory, m *Modify)
- func CheckForumCreateSimple(c *client.Forum, f *Factory)
- func CheckForumCreateUnicode(c *client.Forum, f *Factory)
- func CheckForumCreateUserCase(c *client.Forum, f *Factory, m *Modify)
- func CheckForumCreateUserNotFound(c *client.Forum, f *Factory)
- func CheckForumGetOneCounter(c *client.Forum, f *Factory)
- func CheckForumGetOneNocase(c *client.Forum, f *Factory, m *Modify)
- func CheckForumGetOneNotFound(c *client.Forum, f *Factory)
- func CheckForumGetOneSimple(c *client.Forum, f *Factory)
- func CheckForumGetThreadsNotFound(c *client.Forum, f *Factory, m *Modify)
- func CheckForumGetThreadsSimple(c *client.Forum, f *Factory, m *Modify)
- func CheckForumGetUsersCollation(c *client.Forum, f *Factory, m *Modify)
- func CheckForumGetUsersEmpty(c *client.Forum, f *Factory, m *Modify)
- func CheckForumGetUsersNotFound(c *client.Forum, f *Factory, m *Modify)
- func CheckForumGetUsersSimple(c *client.Forum, f *Factory, m *Modify)
- func CheckForumGetUsersVote(c *client.Forum, f *Factory, m *Modify)
- func CheckIsType(expectedType interface{}, object interface{})
- func CheckNil(err interface{})
- func CheckPost(c *client.Forum, post *models.Post)
- func CheckPostCreateDeepParent(c *client.Forum, f *Factory)
- func CheckPostCreateEmpty(c *client.Forum, f *Factory, m *Modify)
- func CheckPostCreateInvalidParent(c *client.Forum, f *Factory, m *Modify)
- func CheckPostCreateNoAuthor(c *client.Forum, f *Factory, m *Modify)
- func CheckPostCreateNoThread(c *client.Forum, f *Factory, m *Modify)
- func CheckPostCreateSameTime(c *client.Forum, f *Factory, m *Modify)
- func CheckPostCreateSimple(c *client.Forum, f *Factory, m *Modify)
- func CheckPostCreateUnicode(c *client.Forum, f *Factory)
- func CheckPostCreateWithParent(c *client.Forum, f *Factory)
- func CheckPostGetOneNotFound(c *client.Forum, f *Factory, m *Modify)
- func CheckPostGetOneRelated(c *client.Forum, f *Factory, m *Modify)
- func CheckPostGetOneSimple(c *client.Forum, f *Factory)
- func CheckPostUpdateCase(c *client.Forum, f *Factory)
- func CheckPostUpdateEmpty(c *client.Forum, f *Factory)
- func CheckPostUpdateNotFound(c *client.Forum, f *Factory)
- func CheckPostUpdateSame(c *client.Forum, f *Factory)
- func CheckPostUpdateSimple(c *client.Forum, f *Factory)
- func CheckStatus(c *client.Forum, f *Factory)
- func CheckThread(c *client.Forum, thread *models.Thread)
- func CheckThreadCreateConflict(c *client.Forum, f *Factory, m *Modify)
- func CheckThreadCreateNoAuthor(c *client.Forum, f *Factory)
- func CheckThreadCreateNoCase(c *client.Forum, f *Factory, m *Modify)
- func CheckThreadCreateNoForum(c *client.Forum, f *Factory)
- func CheckThreadCreateSimple(c *client.Forum, f *Factory, m *Modify)
- func CheckThreadCreateUnicode(c *client.Forum, f *Factory)
- func CheckThreadGetOneNotFound(c *client.Forum, f *Factory)
- func CheckThreadGetOneSimple(c *client.Forum, f *Factory, m *Modify)
- func CheckThreadGetPosts(c *client.Forum, f *Factory, m *Modify, tree [][]int, limit int32)
- func CheckThreadGetPostsNotFound(c *client.Forum, f *Factory)
- func CheckThreadGetPostsSameTime(c *client.Forum, f *Factory, m *Modify)
- func CheckThreadGetPostsSimple(c *client.Forum, f *Factory, m *Modify)
- func CheckThreadUpdateEmpty(c *client.Forum, f *Factory)
- func CheckThreadUpdateNotFound(c *client.Forum, f *Factory)
- func CheckThreadUpdatePart(c *client.Forum, f *Factory, m *Modify)
- func CheckThreadUpdateSimple(c *client.Forum, f *Factory, m *Modify)
- func CheckThreadVoteSimple(c *client.Forum, f *Factory)
- func CheckThreadVoteThreadNotFound(c *client.Forum, f *Factory)
- func CheckThreadVoteUserNotFound(c *client.Forum, f *Factory)
- func CheckUser(c *client.Forum, user *models.User)
- func CheckUserCreateConflict(c *client.Forum, f *Factory, m *Modify)
- func CheckUserCreateSimple(c *client.Forum, f *Factory)
- func CheckUserCreateUnicode(c *client.Forum, f *Factory)
- func CheckUserGetOneNocase(c *client.Forum, f *Factory, m *Modify)
- func CheckUserGetOneNotFound(c *client.Forum, f *Factory)
- func CheckUserGetOneSimple(c *client.Forum, f *Factory)
- func CheckUserUpdateConflict(c *client.Forum, f *Factory, m *Modify)
- func CheckUserUpdateEmpty(c *client.Forum, f *Factory)
- func CheckUserUpdateNotFound(c *client.Forum, f *Factory)
- func CheckUserUpdatePart(c *client.Forum, f *Factory, m *Modify)
- func CheckUserUpdateSimple(c *client.Forum, f *Factory)
- func Checkpoint(c *client.Forum, message string) bool
- func Colorize(color int, message string) string
- func CreateTransport(url *url.URL) *http_transport.Runtime
- func DeltaToHtml(delta []difflib.DiffRecord) string
- func DeltaToText(delta []difflib.DiffRecord) string
- func EasyJSONConsumer() runtime.Consumer
- func Expected(statusCode int, body interface{}, prepare Filter) context.Context
- func ExpectedError(statusCode int, format string, a ...interface{}) context.Context
- func FillPosts(perf *Perf, parallel int, timeout time.Time, count int, batchSize int)
- func FillThreads(perf *Perf, parallel int, timeout time.Time, count int)
- func FillUsers(perf *Perf, parallel int, timeout time.Time, count int)
- func GetBody(stream *io.ReadCloser) ([]byte, error)
- func GetDelta(data []byte, expected interface{}, prepare Filter) (*[]difflib.DiffRecord, error)
- func GetDiff(actual string, expected string) *[]difflib.DiffRecord
- func GetRandomCase(s string) string
- func GetRandomDesc() *bool
- func GetRandomLimit() int32
- func GetRandomRelated() []string
- func GetRandomSort() string
- func GetSlugOrId(slug string, id int64) string
- func InvertCase(str string) string
- func Modifications(checker func(c *client.Forum, f *Factory, modify *Modify)) func(c *client.Forum, f *Factory)
- func ObjectsAreEqual(expected, actual interface{}) bool
- func PagePosts(posts []OrderedPost, limitType func(OrderedPost) int, limit int) []models.Posts
- func PerfForumGetOneNotFound(p *Perf, f *Factory)
- func PerfForumGetOneSuccess(p *Perf, f *Factory)
- func PerfForumGetThreadsNotFound(p *Perf, f *Factory)
- func PerfForumGetThreadsSuccess(p *Perf, f *Factory)
- func PerfForumGetUsersNotFound(p *Perf, f *Factory)
- func PerfForumGetUsersSuccess(p *Perf, f *Factory)
- func PerfPostGetOneNotFound(p *Perf, f *Factory)
- func PerfPostGetOneSuccess(p *Perf, f *Factory)
- func PerfRegister(test PerfTest)
- func PerfStatus(p *Perf, f *Factory)
- func PerfThreadGetOneNotFound(p *Perf, f *Factory)
- func PerfThreadGetOneSuccess(p *Perf, f *Factory)
- func PerfThreadGetPostsNotFound(p *Perf, f *Factory)
- func PerfThreadGetPostsSuccess(p *Perf, f *Factory)
- func PerfUserGetOneNotFound(p *Perf, f *Factory)
- func PerfUserGetOneSuccess(p *Perf, f *Factory)
- func PrettyJson(body string) string
- func RandomTime() time.Time
- func Register(checker Checker)
- func Run(url *url.URL, mask *regexp.Regexp, report_file string, keep bool) int
- func RunCheck(check Checker, report *Report, url *url.URL)
- func ToJsonPretty(obj interface{}) string
- func VersionCheck() (int, error)
- func VersionFull() string
- func VoteThreads(perf *Perf, parallel int, timeout time.Time, count int)
- type Abc
- type Checker
- type CheckerByName
- type CheckerClientResponseReader
- type CheckerTransport
- type Factory
- func (f *Factory) CreateForum(c *client.Forum, forum *models.Forum, owner *models.User) *models.Forum
- func (f *Factory) CreatePost(c *client.Forum, post *models.Post, thread *models.Thread) *models.Post
- func (f *Factory) CreatePosts(c *client.Forum, posts models.Posts, thread *models.Thread) models.Posts
- func (f *Factory) CreateThread(c *client.Forum, thread *models.Thread, forum *models.Forum, ...) *models.Thread
- func (f *Factory) CreateTree(c *client.Forum, thread *models.Thread, tree [][]int) []OrderedPost
- func (f *Factory) CreateUser(c *client.Forum, user *models.User) *models.User
- func (self *Factory) RandomEmail() strfmt.Email
- func (self *Factory) RandomForum() *models.Forum
- func (self *Factory) RandomNickname() string
- func (self *Factory) RandomPost() *models.Post
- func (self *Factory) RandomPosts(count int) []*models.Post
- func (self *Factory) RandomSlug() string
- func (self *Factory) RandomThread() *models.Thread
- func (self *Factory) RandomUser() *models.User
- type Filter
- type Modify
- type OrderedPost
- type PForum
- type PHash
- type PPost
- type PPostSortFlat
- type PPostSortParentDesc
- type PPostSortTree
- type PStatus
- type PThread
- type PThreadByCreated
- type PUser
- type PUserByNickname
- type PVersion
- type Perf
- type PerfConfig
- type PerfData
- func (self *PerfData) AddForum(forum *PForum)
- func (self *PerfData) AddPost(post *PPost)
- func (self *PerfData) AddThread(thread *PThread)
- func (self *PerfData) AddUser(user *PUser)
- func (self *PerfData) GetForum(index int) *PForum
- func (self *PerfData) GetForumBySlug(slug string) *PForum
- func (self *PerfData) GetForumThreads(forum *PForum) []*PThread
- func (self *PerfData) GetForumThreadsByCreated(forum *PForum, since *strfmt.DateTime, desc bool, limit int) []*PThread
- func (self *PerfData) GetForumUsers(forum *PForum) []*PUser
- func (self *PerfData) GetForumUsersByNickname(forum *PForum, since *string, desc bool, limit int) []*PUser
- func (self *PerfData) GetPost(index int, p float64) *PPost
- func (self *PerfData) GetPostById(id int64) *PPost
- func (self *PerfData) GetThread(index int, p float64, offset float64) *PThread
- func (self *PerfData) GetThreadById(id int32) *PThread
- func (self *PerfData) GetThreadPostsFlat(thread *PThread) []*PPost
- func (self *PerfData) GetThreadPostsParentDesc(thread *PThread) []*PPost
- func (self *PerfData) GetThreadPostsTree(thread *PThread) []*PPost
- func (self *PerfData) GetUser(index int) *PUser
- func (self *PerfData) GetUserByNickname(nickname string) *PUser
- func (self *PerfData) Normalize()
- func (self *PerfData) Save(writer io.Writer) error
- type PerfMode
- type PerfSession
- func (self *PerfSession) CheckBool(expected bool, actual bool, message string)
- func (self *PerfSession) CheckDate(expected *strfmt.DateTime, actual *strfmt.DateTime, message string)
- func (self *PerfSession) CheckHash(expected PHash, actual string, message string)
- func (self *PerfSession) CheckInt(expected int, actual int, message string)
- func (self *PerfSession) CheckInt32(expected int32, actual int32, message string)
- func (self *PerfSession) CheckInt64(expected int64, actual int64, message string)
- func (self *PerfSession) CheckStr(expected string, actual string, message string)
- func (self *PerfSession) CheckVersion(before PVersion, after PVersion) bool
- func (self *PerfSession) Expected(statusCode int) context.Context
- func (self *PerfSession) Finish(before PVersion, after PVersion)
- func (self *PerfSession) Validate(callback func(validator PerfValidator))
- type PerfTest
- type PerfValidator
- type PerfWeight
- type PostSortFlat
- type PostSortTree
- type Report
- type ReportHttp
- type ReportMessage
- type ReportPass
- type ResultType
- type Shortid
- type ThreadByCreated
- type UserByNickname
- type Validator
Constants ¶
const ( RELATED_FORUM = "forum" RELATED_USER = "user" RELATED_THREAD = "thread" )
const ( SORT_FLAT = "flat" SORT_TREE = "tree" SORT_PARENT = "parent_tree" )
const ( KEY_STATUS = "expected-status" KEY_BODY = "expected-body" KEY_FILTER = "expected-filter" KEY_SKIP = "dont-check" MaxIdleConnections int = 20 )
const ( WeightNever PerfWeight = 0 WeightRare = 1 WeightNormal = 10 )
const ( VERSION_UNKNOWN = iota VERSION_OUTDATE VERSION_LOCAL VERSION_LATEST )
const ABC_NICK = "0123456789abcdefghijklmnopqrstuvwxyz"
const ABC_SLUG = "0123456789abcdefghijklmnopqrstuvwxyz_-"
const POST_FAKE_ID int64 = 2139800938
const POST_POWER = 16
const (
SERIALIZE_VERSION int = 1
)
const THREAD_FAKE_ID = "2139800939"
Variables ¶
var ( Project = "tech-db-forum" Version = "0.3.0" BuildTag string GitCommit string )
var HttpTransport *http.Transport
Functions ¶
func CheckClear ¶ added in v0.1.0
func CheckForumCreateSimple ¶
func CheckForumCreateUnicode ¶
func CheckForumGetOneCounter ¶ added in v0.2.1
func CheckForumGetOneSimple ¶
func CheckForumGetThreadsNotFound ¶ added in v0.1.0
func CheckForumGetThreadsSimple ¶ added in v0.1.0
func CheckForumGetUsersCollation ¶ added in v0.2.0
func CheckForumGetUsersEmpty ¶ added in v0.1.0
func CheckForumGetUsersNotFound ¶ added in v0.1.0
func CheckForumGetUsersSimple ¶ added in v0.1.0
func CheckForumGetUsersVote ¶ added in v0.1.0
func CheckIsType ¶
func CheckIsType(expectedType interface{}, object interface{})
func CheckPostCreateDeepParent ¶ added in v0.1.0
func CheckPostCreateEmpty ¶ added in v0.1.0
func CheckPostCreateInvalidParent ¶ added in v0.1.0
func CheckPostCreateNoAuthor ¶ added in v0.1.0
func CheckPostCreateNoThread ¶ added in v0.1.0
func CheckPostCreateSameTime ¶ added in v0.2.1
func CheckPostCreateUnicode ¶ added in v0.1.0
func CheckPostCreateWithParent ¶ added in v0.1.0
func CheckPostGetOneNotFound ¶ added in v0.1.0
func CheckPostGetOneRelated ¶ added in v0.1.0
func CheckPostGetOneSimple ¶ added in v0.1.0
func CheckPostUpdateCase ¶ added in v0.1.0
func CheckPostUpdateEmpty ¶ added in v0.1.0
func CheckPostUpdateNotFound ¶ added in v0.1.0
func CheckPostUpdateSame ¶ added in v0.1.0
func CheckPostUpdateSimple ¶ added in v0.1.0
func CheckStatus ¶ added in v0.1.0
func CheckThreadCreateConflict ¶ added in v0.1.0
func CheckThreadCreateNoAuthor ¶ added in v0.1.0
func CheckThreadCreateNoCase ¶ added in v0.1.0
func CheckThreadCreateNoForum ¶ added in v0.1.0
func CheckThreadCreateUnicode ¶ added in v0.1.0
func CheckThreadGetOneNotFound ¶ added in v0.1.0
func CheckThreadGetOneSimple ¶ added in v0.1.0
func CheckThreadGetPosts ¶ added in v0.2.1
func CheckThreadGetPostsNotFound ¶ added in v0.1.0
func CheckThreadGetPostsSameTime ¶ added in v0.2.1
func CheckThreadGetPostsSimple ¶ added in v0.1.0
func CheckThreadUpdateEmpty ¶ added in v0.1.0
func CheckThreadUpdateNotFound ¶ added in v0.1.0
func CheckThreadUpdatePart ¶ added in v0.1.0
func CheckThreadUpdateSimple ¶ added in v0.1.0
func CheckThreadVoteSimple ¶ added in v0.1.0
func CheckThreadVoteThreadNotFound ¶ added in v0.1.0
func CheckThreadVoteUserNotFound ¶ added in v0.1.0
func CheckUserCreateSimple ¶
func CheckUserCreateUnicode ¶
func CheckUserGetOneNotFound ¶
func CheckUserGetOneSimple ¶
func CheckUserUpdateEmpty ¶
func CheckUserUpdateNotFound ¶
func CheckUserUpdateSimple ¶
func CreateTransport ¶ added in v0.2.0
func CreateTransport(url *url.URL) *http_transport.Runtime
func DeltaToHtml ¶ added in v0.2.0
func DeltaToHtml(delta []difflib.DiffRecord) string
func DeltaToText ¶ added in v0.2.0
func DeltaToText(delta []difflib.DiffRecord) string
func EasyJSONConsumer ¶ added in v0.2.1
func ExpectedError ¶ added in v0.2.1
func FillThreads ¶ added in v0.2.1
func GetDelta ¶
func GetDelta(data []byte, expected interface{}, prepare Filter) (*[]difflib.DiffRecord, error)
func GetRandomCase ¶ added in v0.2.1
func GetRandomDesc ¶ added in v0.2.1
func GetRandomDesc() *bool
func GetRandomLimit ¶ added in v0.2.1
func GetRandomLimit() int32
func GetRandomRelated ¶ added in v0.2.1
func GetRandomRelated() []string
func GetRandomSort ¶ added in v0.2.1
func GetRandomSort() string
func GetSlugOrId ¶ added in v0.2.1
func InvertCase ¶ added in v0.1.0
func Modifications ¶ added in v0.1.0
func ObjectsAreEqual ¶
func ObjectsAreEqual(expected, actual interface{}) bool
func PagePosts ¶ added in v0.2.1
func PagePosts(posts []OrderedPost, limitType func(OrderedPost) int, limit int) []models.Posts
func PerfForumGetOneNotFound ¶ added in v0.2.1
func PerfForumGetOneSuccess ¶ added in v0.2.1
func PerfForumGetThreadsNotFound ¶ added in v0.2.1
func PerfForumGetThreadsSuccess ¶ added in v0.2.1
func PerfForumGetUsersNotFound ¶ added in v0.2.1
func PerfForumGetUsersSuccess ¶ added in v0.2.1
func PerfPostGetOneNotFound ¶ added in v0.2.1
func PerfPostGetOneSuccess ¶ added in v0.2.1
func PerfRegister ¶ added in v0.2.1
func PerfRegister(test PerfTest)
func PerfStatus ¶ added in v0.2.1
func PerfThreadGetOneNotFound ¶ added in v0.2.1
func PerfThreadGetOneSuccess ¶ added in v0.2.1
func PerfThreadGetPostsNotFound ¶ added in v0.2.1
func PerfThreadGetPostsSuccess ¶ added in v0.2.1
func PerfUserGetOneNotFound ¶ added in v0.2.1
func PerfUserGetOneSuccess ¶ added in v0.2.1
func PrettyJson ¶ added in v0.2.0
func RandomTime ¶ added in v0.1.0
func ToJsonPretty ¶ added in v0.2.1
func ToJsonPretty(obj interface{}) string
func VersionCheck ¶ added in v0.2.1
func VersionFull ¶ added in v0.2.1
func VersionFull() string
Types ¶
type Abc ¶ added in v0.2.0
type Abc struct {
// contains filtered or unexported fields
}
Алфавит
func NewAbc ¶ added in v0.2.0
NewAbc constructs a new instance of shuffled alphabet to be used for Id representation.
func (*Abc) Encode ¶ added in v0.2.0
Encode encodes a given value into a slice of runes of length nsymbols. In case nsymbols==0, the length of the result is automatically computed from data. Even if fewer symbols is required to encode the data than nsymbols, all positions are used encoding 0 where required to guarantee uniqueness in case further data is added to the sequence. The value of digits [4,6] represents represents n in 2^n, which defines how much randomness flows into the algorithm: 4 -- every value can be represented by 4 symbols in the alphabet (permitting at most 16 values), 5 -- every value can be represented by 2 symbols in the alphabet (permitting at most 32 values), 6 -- every value is represented by exactly 1 symbol with no randomness (permitting 64 values).
type Checker ¶
type Checker struct { // Имя текущей проверки. Name string // Описание текущей проверки. Description string // Функция для текущей проверки. FnCheck func(c *client.Forum, f *Factory) // Тесты, без которых проверка не имеет смысл. Deps []string }
func SortedChecks ¶ added in v0.2.0
func SortedChecks() []Checker
type CheckerByName ¶ added in v0.2.0
type CheckerByName []Checker
func (CheckerByName) Len ¶ added in v0.2.0
func (a CheckerByName) Len() int
func (CheckerByName) Less ¶ added in v0.2.0
func (a CheckerByName) Less(i, j int) bool
func (CheckerByName) Swap ¶ added in v0.2.0
func (a CheckerByName) Swap(i, j int)
type CheckerClientResponseReader ¶ added in v0.2.1
type CheckerClientResponseReader struct {
// contains filtered or unexported fields
}
func (CheckerClientResponseReader) Consume ¶ added in v0.2.1
func (self CheckerClientResponseReader) Consume(r io.Reader, t interface{}) error
func (CheckerClientResponseReader) ReadResponse ¶ added in v0.2.1
func (self CheckerClientResponseReader) ReadResponse(response runtime.ClientResponse, _ runtime.Consumer) (interface{}, error)
type CheckerTransport ¶
type CheckerTransport struct {
// contains filtered or unexported fields
}
func (*CheckerTransport) Submit ¶
func (self *CheckerTransport) Submit(operation *runtime.ClientOperation) (interface{}, error)
type Factory ¶ added in v0.2.1
type Factory struct {
// contains filtered or unexported fields
}
func NewFactory ¶ added in v0.2.1
func NewFactory() *Factory
func (*Factory) CreateForum ¶ added in v0.2.1
func (*Factory) CreatePost ¶ added in v0.2.1
func (*Factory) CreatePosts ¶ added in v0.2.1
func (*Factory) CreateThread ¶ added in v0.2.1
func (*Factory) CreateTree ¶ added in v0.2.1
func (*Factory) CreateUser ¶ added in v0.2.1
func (*Factory) RandomEmail ¶ added in v0.2.1
func (*Factory) RandomForum ¶ added in v0.2.1
func (*Factory) RandomNickname ¶ added in v0.2.1
func (*Factory) RandomPost ¶ added in v0.2.1
func (*Factory) RandomPosts ¶ added in v0.2.1
func (*Factory) RandomSlug ¶ added in v0.2.1
func (*Factory) RandomThread ¶ added in v0.2.1
func (*Factory) RandomUser ¶ added in v0.2.1
type OrderedPost ¶ added in v0.1.0
type OrderedPost struct {
// contains filtered or unexported fields
}
type PForum ¶ added in v0.2.1
type PPost ¶ added in v0.2.1
type PPost struct { Version PVersion ID int64 Author *PUser Thread *PThread Parent *PPost Created strfmt.DateTime IsEdited bool MessageHash PHash Index int32 Path []int32 }
func (*PPost) GetParentId ¶ added in v0.2.1
type PPostSortFlat ¶ added in v0.2.1
type PPostSortFlat []*PPost
func (PPostSortFlat) Len ¶ added in v0.2.1
func (a PPostSortFlat) Len() int
func (PPostSortFlat) Less ¶ added in v0.2.1
func (a PPostSortFlat) Less(i, j int) bool
func (PPostSortFlat) Swap ¶ added in v0.2.1
func (a PPostSortFlat) Swap(i, j int)
type PPostSortParentDesc ¶ added in v0.2.1
type PPostSortParentDesc []*PPost
func (PPostSortParentDesc) Len ¶ added in v0.2.1
func (a PPostSortParentDesc) Len() int
func (PPostSortParentDesc) Less ¶ added in v0.2.1
func (a PPostSortParentDesc) Less(i, j int) bool
func (PPostSortParentDesc) Swap ¶ added in v0.2.1
func (a PPostSortParentDesc) Swap(i, j int)
type PPostSortTree ¶ added in v0.2.1
type PPostSortTree []*PPost
func (PPostSortTree) Len ¶ added in v0.2.1
func (a PPostSortTree) Len() int
func (PPostSortTree) Less ¶ added in v0.2.1
func (a PPostSortTree) Less(i, j int) bool
func (PPostSortTree) Swap ¶ added in v0.2.1
func (a PPostSortTree) Swap(i, j int)
type PThread ¶ added in v0.2.1
type PThreadByCreated ¶ added in v0.2.1
type PThreadByCreated []*PThread
func (PThreadByCreated) Len ¶ added in v0.2.1
func (a PThreadByCreated) Len() int
func (PThreadByCreated) Less ¶ added in v0.2.1
func (a PThreadByCreated) Less(i, j int) bool
func (PThreadByCreated) Swap ¶ added in v0.2.1
func (a PThreadByCreated) Swap(i, j int)
type PUser ¶ added in v0.2.1
type PUserByNickname ¶ added in v0.2.1
type PUserByNickname []*PUser
func (PUserByNickname) Len ¶ added in v0.2.1
func (a PUserByNickname) Len() int
func (PUserByNickname) Less ¶ added in v0.2.1
func (a PUserByNickname) Less(i, j int) bool
func (PUserByNickname) Swap ¶ added in v0.2.1
func (a PUserByNickname) Swap(i, j int)
type Perf ¶ added in v0.2.1
type Perf struct {
// contains filtered or unexported fields
}
func (*Perf) Fill ¶ added in v0.2.1
func (self *Perf) Fill(threads int, timeout_sec int, config *PerfConfig)
func (*Perf) Session ¶ added in v0.2.1
func (self *Perf) Session() *PerfSession
type PerfConfig ¶ added in v0.2.1
type PerfConfig struct { UserCount int ForumCount int ThreadCount int PostCount int PostBatch int VoteCount int Validate float32 }
func NewPerfConfig ¶ added in v0.2.1
func NewPerfConfig() *PerfConfig
type PerfData ¶ added in v0.2.1
type PerfData struct { Status *PStatus // contains filtered or unexported fields }
func NewPerfData ¶ added in v0.2.1
func NewPerfData(config *PerfConfig) *PerfData
func (*PerfData) GetForumBySlug ¶ added in v0.2.1
func (*PerfData) GetForumThreads ¶ added in v0.2.1
func (*PerfData) GetForumThreadsByCreated ¶ added in v0.2.1
func (*PerfData) GetForumUsers ¶ added in v0.2.1
func (*PerfData) GetForumUsersByNickname ¶ added in v0.2.1
func (*PerfData) GetPostById ¶ added in v0.2.1
func (*PerfData) GetThreadById ¶ added in v0.2.1
func (*PerfData) GetThreadPostsFlat ¶ added in v0.2.1
func (*PerfData) GetThreadPostsParentDesc ¶ added in v0.2.1
func (*PerfData) GetThreadPostsTree ¶ added in v0.2.1
func (*PerfData) GetUserByNickname ¶ added in v0.2.1
type PerfSession ¶ added in v0.2.1
type PerfSession struct {
// contains filtered or unexported fields
}
func (*PerfSession) CheckBool ¶ added in v0.2.1
func (self *PerfSession) CheckBool(expected bool, actual bool, message string)
func (*PerfSession) CheckHash ¶ added in v0.2.1
func (self *PerfSession) CheckHash(expected PHash, actual string, message string)
func (*PerfSession) CheckInt ¶ added in v0.2.1
func (self *PerfSession) CheckInt(expected int, actual int, message string)
func (*PerfSession) CheckInt32 ¶ added in v0.2.1
func (self *PerfSession) CheckInt32(expected int32, actual int32, message string)
func (*PerfSession) CheckInt64 ¶ added in v0.2.1
func (self *PerfSession) CheckInt64(expected int64, actual int64, message string)
func (*PerfSession) CheckStr ¶ added in v0.2.1
func (self *PerfSession) CheckStr(expected string, actual string, message string)
func (*PerfSession) CheckVersion ¶ added in v0.2.1
func (self *PerfSession) CheckVersion(before PVersion, after PVersion) bool
func (*PerfSession) Expected ¶ added in v0.2.1
func (self *PerfSession) Expected(statusCode int) context.Context
func (*PerfSession) Finish ¶ added in v0.2.1
func (self *PerfSession) Finish(before PVersion, after PVersion)
func (*PerfSession) Validate ¶ added in v0.2.1
func (self *PerfSession) Validate(callback func(validator PerfValidator))
type PerfTest ¶ added in v0.2.1
type PerfTest struct { Name string Mode PerfMode Weight PerfWeight FnPerf func(p *Perf, f *Factory) }
func GetRandomPerfTest ¶ added in v0.2.1
func GetRandomPerfTest() *PerfTest
type PerfValidator ¶ added in v0.2.1
type PerfValidator interface { CheckVersion(before PVersion, after PVersion) bool CheckInt(expected int, actual int, message string) CheckInt32(expected int32, actual int32, message string) CheckInt64(expected int64, actual int64, message string) CheckStr(expected string, actual string, message string) CheckBool(expected bool, actual bool, message string) CheckHash(expected PHash, actual string, message string) CheckDate(expected *strfmt.DateTime, actual *strfmt.DateTime, message string) Finish(before PVersion, after PVersion) }
type PerfWeight ¶ added in v0.2.1
type PerfWeight int
type PostSortFlat ¶ added in v0.2.1
type PostSortFlat struct {
// contains filtered or unexported fields
}
func (PostSortFlat) Len ¶ added in v0.2.1
func (a PostSortFlat) Len() int
func (PostSortFlat) Less ¶ added in v0.2.1
func (a PostSortFlat) Less(i, j int) bool
func (PostSortFlat) Swap ¶ added in v0.2.1
func (a PostSortFlat) Swap(i, j int)
type PostSortTree ¶ added in v0.1.0
type PostSortTree struct {
// contains filtered or unexported fields
}
func (PostSortTree) Len ¶ added in v0.1.0
func (a PostSortTree) Len() int
func (PostSortTree) Less ¶ added in v0.1.0
func (a PostSortTree) Less(i, j int) bool
func (PostSortTree) Swap ¶ added in v0.1.0
func (a PostSortTree) Swap(i, j int)
type Report ¶
type Report struct { Checker Checker OnlyError bool Pass []ReportPass SkippedBy []string Result ResultType }
func (*Report) Checkpoint ¶
type ReportHttp ¶ added in v0.2.0
func RequestInfo ¶ added in v0.2.0
func RequestInfo(req *http.Request) *ReportHttp
func ResponseInfo ¶ added in v0.2.0
func ResponseInfo(res *http.Response) *ReportHttp
func (*ReportHttp) String ¶ added in v0.2.0
func (self *ReportHttp) String() string
type ReportMessage ¶ added in v0.2.0
type ReportMessage struct { Failed bool Url string Delta template.HTML Request *ReportHttp Response *ReportHttp Example *ReportHttp Error string }
type ReportPass ¶ added in v0.2.0
type ReportPass struct { Name string Failure string Messages []ReportMessage }
type ResultType ¶ added in v0.2.0
type ResultType int
const ( Failed ResultType = iota Skipped Success )
type Shortid ¶ added in v0.2.0
type Shortid struct {
// contains filtered or unexported fields
}
Идентификатор
func NewShortid ¶ added in v0.2.0
Создание нового генератора
func (*Shortid) Abc ¶ added in v0.2.0
Abc returns the instance of alphabet used for representing the Ids.
func (*Shortid) Epoch ¶ added in v0.2.0
Epoch returns the value of epoch used as the beginning of millisecond counting (normally 2016-01-01 00:00:00 local time)
func (*Shortid) GenerateRandom ¶ added in v0.2.0
Generate generates a new short Id.
type ThreadByCreated ¶ added in v0.1.0
func (ThreadByCreated) Len ¶ added in v0.1.0
func (a ThreadByCreated) Len() int
func (ThreadByCreated) Less ¶ added in v0.1.0
func (a ThreadByCreated) Less(i, j int) bool
func (ThreadByCreated) Swap ¶ added in v0.1.0
func (a ThreadByCreated) Swap(i, j int)
type UserByNickname ¶
func (UserByNickname) Len ¶
func (a UserByNickname) Len() int
func (UserByNickname) Less ¶
func (a UserByNickname) Less(i, j int) bool
func (UserByNickname) Swap ¶
func (a UserByNickname) Swap(i, j int)
Source Files
¶
- check_clear.go
- check_forum_create.go
- check_forum_get_one.go
- check_forum_get_threads.go
- check_forum_get_users.go
- check_post_get_one.go
- check_post_update.go
- check_posts_create.go
- check_status.go
- check_thread_create.go
- check_thread_get_one.go
- check_thread_get_posts.go
- check_thread_update.go
- check_thread_vote.go
- check_user_create.go
- check_user_get_one.go
- check_user_update.go
- checker.go
- common.go
- expected.go
- factory.go
- filler.go
- modify.go
- perf.go
- perf_data.go
- perf_serialize.go
- perf_session.go
- perf_validator.go
- report.go
- shortid.go
- version.go