creation

package
v1.3.0-rc5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 1, 2018 License: GPL-3.0 Imports: 16 Imported by: 0

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

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

func ConstructSteps(rawSteps []InputStep) []test.Step

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

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

SequencePost handles requests that demand the creation of a new sequence.

Types

type InputStep

type InputStep struct {
	ID               int
	Actual, Expected string
}

InputStep represents an step of the input data

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL