Documentation ¶
Index ¶
- type ActorExistenceChecker
- type ActorID
- type ProjectExistenceChecker
- type ProjectID
- type ProtocolExistenceChecker
- type ProtocolID
- type TestExistenceChecker
- type TestID
- type TestVersionExistenceChecker
- type TestVersionID
- func (id *TestVersionID) GobDecode(data []byte) (err error)
- func (id *TestVersionID) GobEncode() ([]byte, error)
- func (id *TestVersionID) MarshalJSON() ([]byte, error)
- func (id TestVersionID) TestVersion() int
- func (id *TestVersionID) UnmarshalJSON(data []byte) (err error)
- func (id TestVersionID) Validate(tvec TestVersionExistenceChecker) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActorExistenceChecker ¶
type ActorExistenceChecker interface { // Exists checks, if the given actor is already existent in storage. Exists(id ActorID) (bool, error) }
ActorExistenceChecker provides everything needed to check, if an actor is already existent in storage.
type ActorID ¶
type ActorID string
ActorID hold all needed data to identify the an actor in the whole system. For an actor this is only his name Actors can be users or groups
func NewActorID ¶
NewActorID returns a new ActorID containing the given name. No validation will be performed.
func (ActorID) Validate ¶
func (id ActorID) Validate(oec ActorExistenceChecker) error
Validate checks if this is a valid id for a new actor.
type ProjectExistenceChecker ¶
type ProjectExistenceChecker interface { //Exists checks, if the given project is already existent in storage. Exists(id ProjectID) (bool, error) }
ProjectExistenceChecker provides everything needed to check, if a project is already existent in storage.
type ProjectID ¶
type ProjectID struct { ActorID // contains filtered or unexported fields }
ProjectID hold all needed data to identify the a project in the whole system. This is the name and the owner of the project
func NewProjectID ¶
NewProjectID returns a new ProjectID containing the given name and owner. No validation will be performed.
func (ProjectID) Validate ¶
func (id ProjectID) Validate(pec ProjectExistenceChecker) error
Validate checks if this is a valid id for a new project.
type ProtocolExistenceChecker ¶
type ProtocolExistenceChecker interface { //Exists checks, if the given protocol is already existent in storage. Exists(id ProtocolID) (bool, error) }
ProtocolExistenceChecker provides everything needed to check, if a protocol is already existent in storage.
type ProtocolID ¶
type ProtocolID struct { TestVersionID // contains filtered or unexported fields }
ProtocolID hold all needed data to identify the a protocol in the whole system. This is the number of the protocol and the test version that was executed. Protocol can be related to a case verison or a sequence version
func NewProtocolID ¶
func NewProtocolID(testVersion TestVersionID, protocol int) ProtocolID
NewProtocolID returns a new ProtocolID containing the given protocol number and related test version. No validation will be performed.
func (*ProtocolID) GobDecode ¶ added in v1.0.0
func (id *ProtocolID) GobDecode(data []byte) (err error)
GobDecode decodes the id from a byte stream. All fields of the id called on will be overwritten
func (*ProtocolID) GobEncode ¶ added in v1.0.0
func (id *ProtocolID) GobEncode() ([]byte, error)
GobEncode encodes the id to a byte stream so it can be stored for example to a session
func (ProtocolID) Protocol ¶
func (id ProtocolID) Protocol() int
Protocol returns the protocol number
func (ProtocolID) Validate ¶
func (id ProtocolID) Validate(pec ProtocolExistenceChecker) error
Validate checks if this is a valid id for a new protocol.
type TestExistenceChecker ¶
type TestExistenceChecker interface { //Exists checks, if the given test is already existent in storage. Exists(id TestID) (bool, error) }
TestExistenceChecker provides everything needed to check, if a test is already existent in storage.
type TestID ¶
type TestID struct { ProjectID // contains filtered or unexported fields }
TestID hold all needed data to identify the a test in the whole system. This is the name, the superior project and a flag to differ between case and sequence Tests can be cases or sequences
func NewTestID ¶
NewTestID returns a new TestID containing the given name and superior project. No validation will be performed.
func (TestID) IsCase ¶
IsCase returns true if the test is a case and false if the test is a sequence
func (TestID) Validate ¶
func (id TestID) Validate(tec TestExistenceChecker) error
Validate checks if this is a valid id for a new test.
type TestVersionExistenceChecker ¶
type TestVersionExistenceChecker interface { //Exists checks, if the given testVersion is already existent in storage. Exists(id TestVersionID) (bool, error) }
TestVersionExistenceChecker provides everything needed to check, if a testVersion is already existent in storage.
type TestVersionID ¶
type TestVersionID struct { TestID // contains filtered or unexported fields }
TestVersionID hold all needed data to identify the a test version in the whole system. This is the number of the version and the superior test Test versions can be versions of cases or sequences
func NewTestVersionID ¶
func NewTestVersionID(test TestID, testVersion int) TestVersionID
NewTestVersionID returns a new TestVersionID containing the given version number and superior test. No validation will be performed.
func (*TestVersionID) GobDecode ¶
func (id *TestVersionID) GobDecode(data []byte) (err error)
GobDecode decodes the id from a byte stream. All fields of the id called on will be overwritten
func (*TestVersionID) GobEncode ¶
func (id *TestVersionID) GobEncode() ([]byte, error)
GobEncode encodes the id to a byte stream so it can be stored for example to a session
func (*TestVersionID) MarshalJSON ¶
func (id *TestVersionID) MarshalJSON() ([]byte, error)
MarshalJSON will marshal the id into json
func (TestVersionID) TestVersion ¶
func (id TestVersionID) TestVersion() int
TestVersion returns the version number of the test version
func (*TestVersionID) UnmarshalJSON ¶
func (id *TestVersionID) UnmarshalJSON(data []byte) (err error)
UnmarshalJSON will unmarshal the id from a given json. All fields of the id called on will be overwritten
func (TestVersionID) Validate ¶
func (id TestVersionID) Validate(tvec TestVersionExistenceChecker) error
Validate checks if this is a valid id for a new test version.