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(ca 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 ProjectPost(pa handler.ProjectAdder, projectChecker id.ProjectExistenceChecker) http.HandlerFunc
- func SequenceCommentPut(ca handler.CommentAdder) http.HandlerFunc
- func SequencePost(t handler.TestCaseGetter, tsa handler.TestSequenceAdder, ...) http.HandlerFunc
- type InputStep
- type RegisterServer
- type TestCaseInput
- type TestSequenceInput
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CaseCommentPut ¶
func CaseCommentPut(ca 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) 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 ProjectPost ¶
func ProjectPost(pa handler.ProjectAdder, projectChecker id.ProjectExistenceChecker) http.HandlerFunc
ProjectPost is used to save a new project in the system
func SequenceCommentPut ¶
func SequenceCommentPut(ca 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) http.HandlerFunc
SequencePost handles requests that demand the creation of a new sequence.
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 InputTestCaseLabels []project.Label InputHours int InputMinutes int InputTestCaseSUTVersions map[string]*project.Version InputSteps []InputStep }
TestCaseInput contains everything needed to create a testcase.
type TestSequenceInput ¶
type TestSequenceInput struct { InputTestSequenceName, InputTestSequenceDescription string InputTestSequencePreconditions []test.Precondition InputTestSequenceTestCase string InputTestSequenceLabels []project.Label }
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