Documentation ¶
Overview ¶
Package creation contains the logic to create or add elements. For example creating cases/sequences or adding a comment to a case.
Index ¶
- func CaseCommentPut(commentAdder handler.CommentAdder) http.HandlerFunc
- func CasePost(ta handler.TestCaseAdder, caseChecker id.TestExistenceChecker, ...) http.HandlerFunc
- func ConstructSteps(rawSteps []InputStep) []test.Step
- func GroupPost(ga handler.GroupAdder, groupChecker id.ActorExistenceChecker) http.HandlerFunc
- func MemberPut(us middleware.UserRetriever, ps handler.ProjectAdder) http.HandlerFunc
- func NewRegisterHandler(server RegisterServer) http.Handler
- func ProjectLabelPost(labelStore handler.Labels) http.HandlerFunc
- func ProjectPost(pa handler.ProjectAdder, projectChecker id.ProjectExistenceChecker, ...) http.HandlerFunc
- func SequenceCommentPut(commentAdder handler.CommentAdder) http.HandlerFunc
- func SequencePost(t handler.TestCaseGetter, tsa handler.TestSequenceAdder, ...) http.HandlerFunc
- func TestLabelPost(labelStore handler.Labels) http.HandlerFunc
- func WriteComment(c *comment.Comment, w http.ResponseWriter, r *http.Request) error
- type InputStep
- type RegisterServer
- type TestCaseInput
- type TestSequenceInput
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CaseCommentPut ¶
func CaseCommentPut(commentAdder handler.CommentAdder) http.HandlerFunc
CaseCommentPut returns a function which processes a comment posted to a test case
func CasePost ¶
func CasePost(ta handler.TestCaseAdder, caseChecker id.TestExistenceChecker, labelStore handler.Labels, activityStore handler.Activities) http.HandlerFunc
CasePost returns a function that handles the creation of a case
func ConstructSteps ¶
ConstructSteps creates steps from user input. Returns an empty array in no test steps were given.
func GroupPost ¶
func GroupPost(ga handler.GroupAdder, groupChecker id.ActorExistenceChecker) http.HandlerFunc
GroupPost returns a function handling the creation of a group
func MemberPut ¶
func MemberPut(us middleware.UserRetriever, ps handler.ProjectAdder) http.HandlerFunc
MemberPut is used to add a existing user to the project
func NewRegisterHandler ¶
func NewRegisterHandler(server RegisterServer) http.Handler
NewRegisterHandler creates a new signout handler that handles signout requests from the client.
func ProjectLabelPost ¶
func ProjectLabelPost(labelStore handler.Labels) http.HandlerFunc
Creates a new Label for the given project
func ProjectPost ¶
func ProjectPost(pa handler.ProjectAdder, projectChecker id.ProjectExistenceChecker, ta handler.TestCaseAdder, tcg handler.TestCaseGetter, caseChecker id.TestExistenceChecker, tsa handler.TestSequenceAdder, labelStore handler.Labels) http.HandlerFunc
ProjectPost is used to save a new project in the system
func SequenceCommentPut ¶
func SequenceCommentPut(commentAdder handler.CommentAdder) http.HandlerFunc
SequenceCommentPut returns a function which processes a comment posted to a test sequence
func SequencePost ¶
func SequencePost(t handler.TestCaseGetter, tsa handler.TestSequenceAdder, tec id.TestExistenceChecker, labelStore handler.Labels, activityStore handler.Activities) http.HandlerFunc
SequencePost handles requests that demand the creation of a new sequence.
func TestLabelPost ¶
func TestLabelPost(labelStore handler.Labels) http.HandlerFunc
Creates a new test label for the given test and label
func WriteComment ¶ added in v1.7.0
Write comment renders the given comment and prints it into the given Writer.
Types ¶
type RegisterServer ¶
type RegisterServer interface { Get(id id.ActorID) (*user.User, bool, error) GetByMail(email string) (*user.User, bool, error) Add(pur *user.PasswordUser) error }
RegisterServer is used to register a new user
type TestCaseInput ¶
type TestCaseInput struct { InputTestCaseName string InputTestCaseDescription string InputTestCasePreconditions []string InputTestCaseSUTVersions map[string]*project.Version InputHours int InputMinutes int InputSteps []InputStep InputLabels []string }
TestCaseInput contains everything needed to create a testcase.
type TestSequenceInput ¶
type TestSequenceInput struct { InputTestSequenceName, InputTestSequenceDescription string InputTestSequencePreconditions []test.Precondition InputTestSequenceTestCase string InputLabels []*string }
TestSequenceInput contains general input that can be used to create a sequence.
func GetTestSequenceInput ¶
func GetTestSequenceInput(r *http.Request) (*TestSequenceInput, error)
GetTestSequenceInput gets the test sequence input from the request