Versions in this module Expand all Collapse all v0 v0.2.2 Oct 22, 2018 v0.2.1 Sep 1, 2018 Changes in this version + const KEY_SKIP + const MaxIdleConnections + const POST_POWER + const RELATED_FORUM + const RELATED_THREAD + const RELATED_USER + const SERIALIZE_VERSION + const SORT_FLAT + const SORT_PARENT + const SORT_TREE + const VERSION_LATEST + const VERSION_LOCAL + const VERSION_OUTDATE + const VERSION_UNKNOWN + const WeightNever + const WeightNormal + const WeightRare + var BuildTag string + var GitCommit string + var HttpTransport *http.Transport + var Project = "tech-db-forum" + var Version = "0.3.0" + func CheckForumGetOneCounter(c *client.Forum, f *Factory) + func CheckPostCreateSameTime(c *client.Forum, f *Factory, m *Modify) + func CheckThreadGetPosts(c *client.Forum, f *Factory, m *Modify, tree [][]int, limit int32) + func CheckThreadGetPostsSameTime(c *client.Forum, f *Factory, m *Modify) + func EasyJSONConsumer() runtime.Consumer + 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 GetRandomCase(s string) string + func GetRandomDesc() *bool + func GetRandomLimit() int32 + func GetRandomRelated() []string + func GetRandomSort() string + func GetSlugOrId(slug string, id int64) string + 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 ToJsonPretty(obj interface{}) string + func VersionCheck() (int, error) + func VersionFull() string + func VoteThreads(perf *Perf, parallel int, timeout time.Time, count int) + type CheckerClientResponseReader struct + func (self CheckerClientResponseReader) Consume(r io.Reader, t interface{}) error + func (self CheckerClientResponseReader) ReadResponse(response runtime.ClientResponse, _ runtime.Consumer) (interface{}, error) + type Factory struct + func NewFactory() *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 PForum struct + Posts int64 + Slug string + Threads int32 + TitleHash PHash + User *PUser + Version PVersion + func (self *PForum) Validate(v PerfValidator, forum *models.Forum, version PVersion) + type PHash uint32 + func Hash(data string) PHash + func (z *PHash) DecodeMsg(dc *msgp.Reader) (err error) + func (z PHash) EncodeMsg(en *msgp.Writer) (err error) + type PPost struct + Author *PUser + Created strfmt.DateTime + ID int64 + Index int32 + IsEdited bool + MessageHash PHash + Parent *PPost + Path []int32 + Thread *PThread + Version PVersion + func (self *PPost) GetParentId() int64 + func (self *PPost) Validate(v PerfValidator, post *models.Post, version PVersion, prefix string) + type PPostSortFlat []*PPost + func (a PPostSortFlat) Len() int + func (a PPostSortFlat) Less(i, j int) bool + func (a PPostSortFlat) Swap(i, j int) + type PPostSortParentDesc []*PPost + func (a PPostSortParentDesc) Len() int + func (a PPostSortParentDesc) Less(i, j int) bool + func (a PPostSortParentDesc) Swap(i, j int) + type PPostSortTree []*PPost + func (a PPostSortTree) Len() int + func (a PPostSortTree) Less(i, j int) bool + func (a PPostSortTree) Swap(i, j int) + type PStatus struct + Forum int32 + Post int64 + Thread int32 + User int32 + Version PVersion + type PThread struct + Author *PUser + Created strfmt.DateTime + Forum *PForum + ID int32 + MessageHash PHash + Posts int32 + Slug string + TitleHash PHash + Version PVersion + Voices map[*PUser]int32 + Votes int32 + func (self *PThread) Validate(v PerfValidator, thread *models.Thread, version PVersion) + type PThreadByCreated []*PThread + func (a PThreadByCreated) Len() int + func (a PThreadByCreated) Less(i, j int) bool + func (a PThreadByCreated) Swap(i, j int) + type PUser struct + AboutHash PHash + Email strfmt.Email + FullnameHash PHash + Nickname string + Version PVersion + func (self *PUser) Validate(v PerfValidator, user *models.User, version PVersion) + type PUserByNickname []*PUser + func (a PUserByNickname) Len() int + func (a PUserByNickname) Less(i, j int) bool + func (a PUserByNickname) Swap(i, j int) + type PVersion uint32 + type Perf struct + func NewPerf(url *url.URL, config *PerfConfig) *Perf + func (self *Perf) Fill(threads int, timeout_sec int, config *PerfConfig) + func (self *Perf) Load(reader io.Reader) error + func (self *Perf) Run(threads int, duration int, step int) float64 + func (self *Perf) Save(writer io.Writer) error + func (self *Perf) Session() *PerfSession + type PerfConfig struct + ForumCount int + PostBatch int + PostCount int + ThreadCount int + UserCount int + Validate float32 + VoteCount int + func NewPerfConfig() *PerfConfig + type PerfData struct + Status *PStatus + func LoadPerfData(reader io.Reader) (*PerfData, error) + func NewPerfData(config *PerfConfig) *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 int + const ModeRead + const ModeWrite + type PerfSession struct + 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 struct + FnPerf func(p *Perf, f *Factory) + Mode PerfMode + Name string + Weight PerfWeight + func GetRandomPerfTest() *PerfTest + type PerfValidator interface + CheckBool func(expected bool, actual bool, message string) + CheckDate func(expected *strfmt.DateTime, actual *strfmt.DateTime, message string) + CheckHash func(expected PHash, actual string, message string) + CheckInt func(expected int, actual int, message string) + CheckInt32 func(expected int32, actual int32, message string) + CheckInt64 func(expected int64, actual int64, message string) + CheckStr func(expected string, actual string, message string) + CheckVersion func(before PVersion, after PVersion) bool + Finish func(before PVersion, after PVersion) + type PerfWeight int + type PostSortFlat struct + func (a PostSortFlat) Len() int + func (a PostSortFlat) Less(i, j int) bool + func (a PostSortFlat) Swap(i, j int) type Report + OnlyError bool type ReportMessage + Error string + Failed bool v0.2.0 Feb 24, 2017 Changes in this version + func CheckForumGetUsersCollation(c *client.Forum, m *Modify) + 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 Fill(url *url.URL) int + func FillUsers(c *client.Forum, parallel int, count int) []*models.User + func PrettyJson(body string) string + type Abc struct + func NewAbc(alphabet string) Abc + func (abc *Abc) Encode(val, bits uint) []rune type Checker + func SortedChecks() []Checker + type CheckerByName []Checker + func (a CheckerByName) Len() int + func (a CheckerByName) Less(i, j int) bool + func (a CheckerByName) Swap(i, j int) type Report + Checker Checker + Pass []ReportPass + Result ResultType + SkippedBy []string + func (self *Report) Skip(message string) + type ReportHttp struct + BodyJson string + BodyRaw string + Header http.Header + Title string + func RequestInfo(req *http.Request) *ReportHttp + func ResponseInfo(res *http.Response) *ReportHttp + func (self *ReportHttp) String() string + type ReportMessage struct + Delta template.HTML + Example *ReportHttp + Request *ReportHttp + Response *ReportHttp + Url string + type ReportPass struct + Failure string + Messages []ReportMessage + Name string + type ResultType int + const Failed + const Skipped + const Success + type Shortid struct + func NewShortid(alphabet string) *Shortid + func (sid *Shortid) Abc() Abc + func (sid *Shortid) Epoch() time.Time + func (sid *Shortid) Generate() string + func (sid *Shortid) GenerateRandom() []rune v0.1.0 Feb 14, 2017 Changes in this version + const POST_FAKE_ID + const THREAD_FAKE_ID + func CheckClear(c *client.Forum) + func CheckForumGetThreadsNotFound(c *client.Forum, m *Modify) + func CheckForumGetThreadsSimple(c *client.Forum, m *Modify) + func CheckForumGetUsersEmpty(c *client.Forum, m *Modify) + func CheckForumGetUsersNotFound(c *client.Forum, m *Modify) + func CheckForumGetUsersSimple(c *client.Forum, m *Modify) + func CheckForumGetUsersVote(c *client.Forum, m *Modify) + func CheckPostCreateDeepParent(c *client.Forum) + func CheckPostCreateEmpty(c *client.Forum, m *Modify) + func CheckPostCreateInvalidParent(c *client.Forum, m *Modify) + func CheckPostCreateNoAuthor(c *client.Forum, m *Modify) + func CheckPostCreateNoThread(c *client.Forum, m *Modify) + func CheckPostCreateUnicode(c *client.Forum) + func CheckPostCreateWithParent(c *client.Forum) + func CheckPostGetOneNotFound(c *client.Forum, m *Modify) + func CheckPostGetOneRelated(c *client.Forum, m *Modify) + func CheckPostGetOneSimple(c *client.Forum) + func CheckPostUpdateCase(c *client.Forum) + func CheckPostUpdateEmpty(c *client.Forum) + func CheckPostUpdateNotFound(c *client.Forum) + func CheckPostUpdateSame(c *client.Forum) + func CheckPostUpdateSimple(c *client.Forum) + func CheckStatus(c *client.Forum) + func CheckThreadCreateConflict(c *client.Forum, m *Modify) + func CheckThreadCreateNoAuthor(c *client.Forum) + func CheckThreadCreateNoCase(c *client.Forum, m *Modify) + func CheckThreadCreateNoForum(c *client.Forum) + func CheckThreadCreateUnicode(c *client.Forum) + func CheckThreadGetOneNotFound(c *client.Forum) + func CheckThreadGetOneSimple(c *client.Forum, m *Modify) + func CheckThreadGetPostsNotFound(c *client.Forum) + func CheckThreadGetPostsSimple(c *client.Forum, m *Modify) + func CheckThreadUpdateEmpty(c *client.Forum) + func CheckThreadUpdateNotFound(c *client.Forum) + func CheckThreadUpdatePart(c *client.Forum, m *Modify) + func CheckThreadUpdateSimple(c *client.Forum, m *Modify) + func CheckThreadVoteSimple(c *client.Forum) + func CheckThreadVoteThreadNotFound(c *client.Forum) + func CheckThreadVoteUserNotFound(c *client.Forum) + func CreatePosts(c *client.Forum, posts []*models.Post, thread *models.Thread) []*models.Post + func InvertCase(str string) string + func Modifications(checker func(c *client.Forum, modify *Modify)) func(c *client.Forum) + func RandomMarker() string + func RandomTime() time.Time + func SortPosts(posts []OrderedPost, desc bool, limitType func(OrderedPost) int, limit int) [][]*models.Post + type Modify int + func (self *Modify) Bool() bool + func (self *Modify) Case(source string) string + func (self *Modify) Int(n int) int + func (self *Modify) NullableBool() *bool + func (self *Modify) SlugOrId(thread *models.Thread) string + type OrderedPost struct + func CreateTree(c *client.Forum, thread *models.Thread) []OrderedPost + type PostSortTree []OrderedPost + func (a PostSortTree) Len() int + func (a PostSortTree) Less(i, j int) bool + func (a PostSortTree) Swap(i, j int) + type ThreadByCreated []models.Thread + func (a ThreadByCreated) Len() int + func (a ThreadByCreated) Less(i, j int) bool + func (a ThreadByCreated) Swap(i, j int) v0.0.1 Jan 30, 2017 Changes in this version + const ABC_NICK + const ABC_SLUG + const KEY_BODY + const KEY_FILTER + const KEY_STATUS + const REPORT_FAILED + const REPORT_SKIPPED + const REPORT_SUCCESS + func CheckForum(c *client.Forum, forum *models.Forum) + func CheckForumCreateConflict(c *client.Forum) + func CheckForumCreateSimple(c *client.Forum) + func CheckForumCreateUnicode(c *client.Forum) + func CheckForumCreateUserCase(c *client.Forum) + func CheckForumCreateUserNotFound(c *client.Forum) + func CheckForumGetOneNocase(c *client.Forum) + func CheckForumGetOneNotFound(c *client.Forum) + func CheckForumGetOneSimple(c *client.Forum) + func CheckIsType(expectedType interface{}, object interface{}) + func CheckNil(err interface{}) + func CheckPost(c *client.Forum, thread *models.Thread) + func CheckPostCreateSimple(c *client.Forum) + func CheckThread(c *client.Forum, thread *models.Thread) + func CheckThreadCreateSimple(c *client.Forum) + func CheckUser(c *client.Forum, user *models.User) + func CheckUserCreateConflict(c *client.Forum) + func CheckUserCreateSimple(c *client.Forum) + func CheckUserCreateUnicode(c *client.Forum) + func CheckUserGetOneNocase(c *client.Forum) + func CheckUserGetOneNotFound(c *client.Forum) + func CheckUserGetOneSimple(c *client.Forum) + func CheckUserUpdateConflict(c *client.Forum) + func CheckUserUpdateEmpty(c *client.Forum) + func CheckUserUpdateNotFound(c *client.Forum) + func CheckUserUpdatePart(c *client.Forum) + func CheckUserUpdateSimple(c *client.Forum) + func Checkpoint(c *client.Forum, message string) + func CreateForum(c *client.Forum, forum *models.Forum, owner *models.User) *models.Forum + func CreatePost(c *client.Forum, post *models.Post, thread *models.Thread) *models.Post + func CreateThread(c *client.Forum, thread *models.Thread, forum *models.Forum, ...) *models.Thread + func CreateUser(c *client.Forum, user *models.User) *models.User + func Expected(statusCode int, body interface{}, prepare Filter) context.Context + func GetBody(stream *io.ReadCloser) ([]byte, error) + func GetDelta(data []byte, expected interface{}, prepare Filter) string + func GetDiff(actual string, expected string) string + func ObjectsAreEqual(expected, actual interface{}) bool + func RandomEmail() strfmt.Email + func RandomForum() *models.Forum + func RandomNickname() string + func RandomPost() *models.Post + func RandomThread() *models.Thread + func RandomUser() *models.User + func Register(checker Checker) + func RequestToText(req *http.Request) string + func ResponseToText(res *http.Response) string + func Run() + func RunCheck(check Checker, report *Report) + func ToJson(obj interface{}) string + type Checker struct + Deps []string + Description string + FnCheck func(c *client.Forum) + Name string + type CheckerTransport struct + func (self *CheckerTransport) Submit(operation *runtime.ClientOperation) (interface{}, error) + type Filter func(interface{}) interface + type Report struct + func (self *Report) AddError(err interface{}) + func (self *Report) Checkpoint(message string) + func (self *Report) RoundTrip(req *http.Request, res *http.Response, example *http.Response, message *string) + func (self *Report) Show() + type UserByNickname []models.User + func (a UserByNickname) Len() int + func (a UserByNickname) Less(i, j int) bool + func (a UserByNickname) Swap(i, j int) + type Validator struct + func NewValidator(ctx context.Context, report *Report) *Validator + func (self *Validator) Example(req *http.Request) *http.Response + func (self *Validator) RoundTrip(req *http.Request) (*http.Response, error)