Documentation ¶
Index ¶
- Constants
- func ActorIRIToFollowersIRI(actor *url.URL) *url.URL
- func ActorIRIToFollowingIRI(actor *url.URL) *url.URL
- func ActorIRIToInboxIRI(actor *url.URL) *url.URL
- func ActorIRIToLikedIRI(actor *url.URL) *url.URL
- func ActorIRIToOutboxIRI(actor *url.URL) *url.URL
- func ActorIRIToPubKeyURL(actor *url.URL) *url.URL
- func HTTPRequestToIRI(r *http.Request) *url.URL
- func HTTPSigTransport(c context.Context, a *ActorMapping) (t pub.Transport, err error)
- func InboxIRIToActorIRI(inbox *url.URL) *url.URL
- func InstructionResponsePathToTestPathPrefix(u *url.URL) (s string, ok bool)
- func InstructionResponsePathToTestState(u *url.URL) (s string, ok bool)
- func IsRelativePathToInboxIRI(path string) bool
- func IsRelativePathToOutboxIRI(path string) bool
- func NewIDPath(pathPrefix string, typename string) string
- func NewPathWithIndex(pathPrefix string, typename string, reason string, idx int) string
- func OutboxIRIToActorIRI(outbox *url.URL) *url.URL
- func OutboxIRIToInboxIRI(outbox *url.URL) *url.URL
- func PathToTestPathPrefix(u *url.URL) (s string, ok bool)
- func StatePathToTestPathPrefix(u *url.URL) (s string, ok bool)
- type APHooks
- type Actor
- func (a *Actor) AuthenticateGetInbox(c context.Context, w http.ResponseWriter, r *http.Request) (out context.Context, authenticated bool, err error)
- func (a *Actor) AuthenticateGetOutbox(c context.Context, w http.ResponseWriter, r *http.Request) (out context.Context, authenticated bool, err error)
- func (a *Actor) AuthenticatePostInbox(c context.Context, w http.ResponseWriter, r *http.Request) (out context.Context, authenticated bool, err error)
- func (a *Actor) AuthenticatePostOutbox(c context.Context, w http.ResponseWriter, r *http.Request) (out context.Context, authenticated bool, err error)
- func (a *Actor) Blocked(c context.Context, actorIRIs []*url.URL) (blocked bool, err error)
- func (a *Actor) DefaultCallback(c context.Context, activity pub.Activity) error
- func (a *Actor) FederatingCallbacks(c context.Context) (wrapped pub.FederatingWrappedCallbacks, other []interface{}, err error)
- func (a *Actor) FilterForwarding(c context.Context, potentialRecipients []*url.URL, activity pub.Activity) (filteredRecipients []*url.URL, err error)
- func (a *Actor) GetInbox(c context.Context, r *http.Request) (p vocab.ActivityStreamsOrderedCollectionPage, err error)
- func (a *Actor) GetOutbox(c context.Context, r *http.Request) (p vocab.ActivityStreamsOrderedCollectionPage, err error)
- func (a *Actor) MaxDeliveryRecursionDepth(c context.Context) int
- func (a *Actor) MaxInboxForwardingRecursionDepth(c context.Context) int
- func (a *Actor) NewTransport(c context.Context, actorBoxIRI *url.URL, gofedAgent string) (t pub.Transport, err error)
- func (a *Actor) PostInboxRequestBodyHook(c context.Context, r *http.Request, activity pub.Activity) (out context.Context, err error)
- func (a *Actor) PostOutboxRequestBodyHook(c context.Context, r *http.Request, data vocab.Type) (context.Context, error)
- func (a *Actor) PubHandlerFunc(c context.Context, w http.ResponseWriter, r *http.Request) (isASRequest bool, err error)
- func (a *Actor) SocialCallbacks(c context.Context) (wrapped pub.SocialWrappedCallbacks, other []interface{}, err error)
- type ActorMapping
- type Clock
- type Database
- func (d *Database) ActorForInbox(c context.Context, inboxIRI *url.URL) (actorIRI *url.URL, err error)
- func (d *Database) ActorForOutbox(c context.Context, outboxIRI *url.URL) (actorIRI *url.URL, err error)
- func (d *Database) Create(c context.Context, asType vocab.Type) error
- func (d *Database) Delete(c context.Context, id *url.URL) error
- func (d *Database) Exists(c context.Context, id *url.URL) (exists bool, err error)
- func (d *Database) Followers(c context.Context, actorIRI *url.URL) (followers vocab.ActivityStreamsCollection, err error)
- func (d *Database) Following(c context.Context, actorIRI *url.URL) (following vocab.ActivityStreamsCollection, err error)
- func (d *Database) Get(c context.Context, id *url.URL) (value vocab.Type, err error)
- func (d *Database) GetInbox(c context.Context, inboxIRI *url.URL) (inbox vocab.ActivityStreamsOrderedCollectionPage, err error)
- func (d *Database) GetOutbox(c context.Context, outboxIRI *url.URL) (outbox vocab.ActivityStreamsOrderedCollectionPage, err error)
- func (d *Database) InboxContains(c context.Context, inbox, id *url.URL) (contains bool, err error)
- func (d *Database) Liked(c context.Context, actorIRI *url.URL) (liked vocab.ActivityStreamsCollection, err error)
- func (d *Database) Lock(c context.Context, id *url.URL) error
- func (d *Database) NewID(c context.Context, t vocab.Type) (id *url.URL, err error)
- func (d *Database) OutboxForInbox(c context.Context, inboxIRI *url.URL) (outboxIRI *url.URL, err error)
- func (d *Database) Owns(c context.Context, id *url.URL) (owns bool, err error)
- func (d *Database) SetInbox(c context.Context, inbox vocab.ActivityStreamsOrderedCollectionPage) error
- func (d *Database) SetOutbox(c context.Context, outbox vocab.ActivityStreamsOrderedCollectionPage) error
- func (d *Database) Unlock(c context.Context, id *url.URL) error
- func (d *Database) Update(c context.Context, asType vocab.Type) error
- type Entry
- type Instruction
- type KeyData
- type PlainTransport
- func (p PlainTransport) BatchDeliver(c context.Context, b []byte, recipients []*url.URL) error
- func (p PlainTransport) Deliver(c context.Context, b []byte, to *url.URL) error
- func (p PlainTransport) Dereference(c context.Context, iri *url.URL) ([]byte, error)
- func (p PlainTransport) DereferenceWithStatusCode(c context.Context, iri *url.URL) ([]byte, int, error)
- type Recorder
- type Result
- type ServerHandler
- type Test
- type TestInfo
- type TestResultState
- type TestRunner
- func (tr *TestRunner) ClearExpectations()
- func (tr *TestRunner) ExpectFederatedCoreActivity(keyID string)
- func (tr *TestRunner) ExpectFederatedCoreActivityAccept(keyID string)
- func (tr *TestRunner) ExpectFederatedCoreActivityAdd(keyID string)
- func (tr *TestRunner) ExpectFederatedCoreActivityBlock(keyID string)
- func (tr *TestRunner) ExpectFederatedCoreActivityCheckDoubleDelivery(keyID string)
- func (tr *TestRunner) ExpectFederatedCoreActivityCreate(keyID string)
- func (tr *TestRunner) ExpectFederatedCoreActivityDelete(keyID string)
- func (tr *TestRunner) ExpectFederatedCoreActivityFollow(keyID string)
- func (tr *TestRunner) ExpectFederatedCoreActivityHTTPSigsMustMatchTestRemoteActor(keyID string)
- func (tr *TestRunner) ExpectFederatedCoreActivityLike(keyID string)
- func (tr *TestRunner) ExpectFederatedCoreActivityReject(keyID string)
- func (tr *TestRunner) ExpectFederatedCoreActivityRemove(keyID string)
- func (tr *TestRunner) ExpectFederatedCoreActivityUndo(keyID string)
- func (tr *TestRunner) ExpectFederatedCoreActivityUpdate(keyID string)
- func (tr *TestRunner) Log(msg string, i ...interface{})
- func (tr *TestRunner) LogAuthenticateGetInbox(c context.Context, w http.ResponseWriter, r *http.Request, authenticated bool, ...)
- func (tr *TestRunner) LogAuthenticateGetOutbox(c context.Context, w http.ResponseWriter, r *http.Request, authenticated bool, ...)
- func (tr *TestRunner) LogAuthenticatePostInbox(c context.Context, w http.ResponseWriter, r *http.Request, ...)
- func (tr *TestRunner) LogAuthenticatePostOutbox(c context.Context, w http.ResponseWriter, r *http.Request, authenticated bool, ...)
- func (tr *TestRunner) LogBlocked(c context.Context, actorIRIs []*url.URL, blocked bool, err error)
- func (tr *TestRunner) LogDefaultCallback(c context.Context, activity pub.Activity)
- func (tr *TestRunner) LogFederatingAccept(c context.Context, v vocab.ActivityStreamsAccept)
- func (tr *TestRunner) LogFederatingAdd(c context.Context, v vocab.ActivityStreamsAdd)
- func (tr *TestRunner) LogFederatingBlock(c context.Context, v vocab.ActivityStreamsBlock)
- func (tr *TestRunner) LogFederatingCreate(c context.Context, v vocab.ActivityStreamsCreate)
- func (tr *TestRunner) LogFederatingDelete(c context.Context, v vocab.ActivityStreamsDelete)
- func (tr *TestRunner) LogFederatingFollow(c context.Context, v vocab.ActivityStreamsFollow)
- func (tr *TestRunner) LogFederatingLike(c context.Context, v vocab.ActivityStreamsLike)
- func (tr *TestRunner) LogFederatingReject(c context.Context, v vocab.ActivityStreamsReject)
- func (tr *TestRunner) LogFederatingRemove(c context.Context, v vocab.ActivityStreamsRemove)
- func (tr *TestRunner) LogFederatingUndo(c context.Context, v vocab.ActivityStreamsUndo)
- func (tr *TestRunner) LogFederatingUpdate(c context.Context, v vocab.ActivityStreamsUpdate)
- func (tr *TestRunner) LogFilterForwarding(c context.Context, potentialRecipients []*url.URL, activity pub.Activity, ...)
- func (tr *TestRunner) LogGetInbox(c context.Context, r *http.Request, outboxId *url.URL, ...)
- func (tr *TestRunner) LogGetOutbox(c context.Context, r *http.Request, outboxId *url.URL, ...)
- func (tr *TestRunner) LogNewTransport(c context.Context, actorBoxIRI *url.URL, err error)
- func (tr *TestRunner) LogPostInboxRequestBodyHook(c context.Context, r *http.Request, activity pub.Activity)
- func (tr *TestRunner) LogPostOutboxRequestBodyHook(c context.Context, r *http.Request, data vocab.Type)
- func (tr *TestRunner) LogPubHandlerFunc(c context.Context, r *http.Request, isASRequest bool, err, httpSigErr error)
- func (tr *TestRunner) LogPubHandlerFuncAuthd(c context.Context, r *http.Request, isASRequest bool, err error, ...)
- func (tr *TestRunner) LogSocialAdd(c context.Context, v vocab.ActivityStreamsAdd)
- func (tr *TestRunner) LogSocialBlock(c context.Context, v vocab.ActivityStreamsBlock)
- func (tr *TestRunner) LogSocialCreate(c context.Context, v vocab.ActivityStreamsCreate)
- func (tr *TestRunner) LogSocialDelete(c context.Context, v vocab.ActivityStreamsDelete)
- func (tr *TestRunner) LogSocialFollow(c context.Context, v vocab.ActivityStreamsFollow)
- func (tr *TestRunner) LogSocialLike(c context.Context, v vocab.ActivityStreamsLike)
- func (tr *TestRunner) LogSocialRemove(c context.Context, v vocab.ActivityStreamsRemove)
- func (tr *TestRunner) LogSocialUndo(c context.Context, v vocab.ActivityStreamsUndo)
- func (tr *TestRunner) LogSocialUpdate(c context.Context, v vocab.ActivityStreamsUpdate)
- func (tr *TestRunner) Run(ctx *TestRunnerContext)
- func (tr *TestRunner) SetRecorder(r *Recorder)
- func (tr *TestRunner) Stop()
- type TestRunnerContext
- type TestServer
- func (ts *TestServer) HandleInstructionResponse(pathPrefix string, vals map[string][]string)
- func (ts *TestServer) HandleWeb(c context.Context, w http.ResponseWriter, r *http.Request)
- func (ts *TestServer) HandleWebfinger(pathPrefix string, user string) (username string, apIRI *url.URL, err error)
- func (ts *TestServer) PathError(path string, err error)
- func (ts *TestServer) PathHandle(path string, i *Instruction)
- func (ts *TestServer) PathMarkDone(path string)
- func (ts *TestServer) PathUpdate(path string, pending, done []TestInfo, results []Result)
- func (ts *TestServer) StartTest(c context.Context, pathPrefix string, c2s, s2s, enableWebfinger bool, ...) error
- func (ts *TestServer) TestState(pathPrefix string) (t TestState, ok bool)
- type TestServerClosure
- type TestSpecKind
- type TestState
- type Transporter
- type WebServer
Constants ¶
View Source
const ( TestResultNotRun TestResultState = "Not Run" TestResultPass = "Pass" TestResultFail = "Fail" TestResultInconclusive = "Inconclusive" )
Variables ¶
This section is empty.
Functions ¶
func HTTPSigTransport ¶
func NewPathWithIndex ¶
Types ¶
type APHooks ¶
type APHooks interface { ExpectFederatedCoreActivity(keyID string) ExpectFederatedCoreActivityHTTPSigsMustMatchTestRemoteActor(keyID string) ExpectFederatedCoreActivityCreate(keyID string) ExpectFederatedCoreActivityUpdate(keyID string) ExpectFederatedCoreActivityDelete(keyID string) ExpectFederatedCoreActivityFollow(keyID string) ExpectFederatedCoreActivityAccept(keyID string) ExpectFederatedCoreActivityReject(keyID string) ExpectFederatedCoreActivityAdd(keyID string) ExpectFederatedCoreActivityRemove(keyID string) ExpectFederatedCoreActivityLike(keyID string) ExpectFederatedCoreActivityBlock(keyID string) ExpectFederatedCoreActivityUndo(keyID string) ExpectFederatedCoreActivityCheckDoubleDelivery(keyID string) ClearExpectations() }
type Actor ¶
type Actor struct {
// contains filtered or unexported fields
}
func NewActor ¶
func NewActor(db *Database, am *ActorMapping, tr *TestRunner, h pub.HandlerFunc) *Actor
func (*Actor) AuthenticateGetInbox ¶
func (*Actor) AuthenticateGetOutbox ¶
func (*Actor) AuthenticatePostInbox ¶
func (*Actor) AuthenticatePostOutbox ¶
func (*Actor) DefaultCallback ¶
func (*Actor) FederatingCallbacks ¶
func (*Actor) FilterForwarding ¶
func (*Actor) MaxDeliveryRecursionDepth ¶
func (*Actor) MaxInboxForwardingRecursionDepth ¶
func (*Actor) NewTransport ¶
func (*Actor) PostInboxRequestBodyHook ¶
func (*Actor) PostOutboxRequestBodyHook ¶
func (*Actor) PubHandlerFunc ¶
func (*Actor) SocialCallbacks ¶
type ActorMapping ¶
type ActorMapping struct {
// contains filtered or unexported fields
}
func NewActorMapping ¶
func NewActorMapping() *ActorMapping
func (*ActorMapping) AddContextInfo ¶
func (*ActorMapping) GetKeyInfo ¶
func (a *ActorMapping) GetKeyInfo(c context.Context) (pubKeyID, pubKeyURL string, privKey crypto.PrivateKey, err error)
type Database ¶
type Database struct {
// contains filtered or unexported fields
}
func NewDatabase ¶
func (*Database) ActorForInbox ¶
func (*Database) ActorForOutbox ¶
func (*Database) InboxContains ¶
func (*Database) OutboxForInbox ¶
type Instruction ¶
type PlainTransport ¶
type PlainTransport struct {
// contains filtered or unexported fields
}
func NewPlainTransport ¶
func NewPlainTransport(r *Recorder) *PlainTransport
func NewPlainTransportWithActivityJSON ¶
func NewPlainTransportWithActivityJSON(r *Recorder) *PlainTransport
func (PlainTransport) BatchDeliver ¶
func (PlainTransport) Dereference ¶
func (PlainTransport) DereferenceWithStatusCode ¶
type Recorder ¶
type Recorder struct {
// contains filtered or unexported fields
}
func NewRecorder ¶
func NewRecorder() *Recorder
type Result ¶
type Result struct { TestName string Description string State TestResultState SpecKind TestSpecKind Records *Recorder }
type ServerHandler ¶
type ServerHandler interface { Handle(*Instruction) Update(pending, done []TestInfo, results []Result) Error(error) MarkDone() }
type Test ¶
type Test interface { MaybeGetInstructions(ctx *TestRunnerContext, existing []Result) *Instruction MaybeRunResult(ctx *TestRunnerContext, existing []Result) *Result Info() TestInfo Recorder() *Recorder }
type TestInfo ¶
type TestInfo struct { TestName string Description string State TestResultState SpecKind TestSpecKind }
type TestResultState ¶
type TestResultState string
type TestRunner ¶
type TestRunner struct {
// contains filtered or unexported fields
}
func NewTestRunner ¶
func NewTestRunner(sh ServerHandler, tests []Test) *TestRunner
func (*TestRunner) ClearExpectations ¶
func (tr *TestRunner) ClearExpectations()
func (*TestRunner) ExpectFederatedCoreActivity ¶
func (tr *TestRunner) ExpectFederatedCoreActivity(keyID string)
func (*TestRunner) ExpectFederatedCoreActivityAccept ¶
func (tr *TestRunner) ExpectFederatedCoreActivityAccept(keyID string)
func (*TestRunner) ExpectFederatedCoreActivityAdd ¶
func (tr *TestRunner) ExpectFederatedCoreActivityAdd(keyID string)
func (*TestRunner) ExpectFederatedCoreActivityBlock ¶
func (tr *TestRunner) ExpectFederatedCoreActivityBlock(keyID string)
func (*TestRunner) ExpectFederatedCoreActivityCheckDoubleDelivery ¶
func (tr *TestRunner) ExpectFederatedCoreActivityCheckDoubleDelivery(keyID string)
func (*TestRunner) ExpectFederatedCoreActivityCreate ¶
func (tr *TestRunner) ExpectFederatedCoreActivityCreate(keyID string)
func (*TestRunner) ExpectFederatedCoreActivityDelete ¶
func (tr *TestRunner) ExpectFederatedCoreActivityDelete(keyID string)
func (*TestRunner) ExpectFederatedCoreActivityFollow ¶
func (tr *TestRunner) ExpectFederatedCoreActivityFollow(keyID string)
func (*TestRunner) ExpectFederatedCoreActivityHTTPSigsMustMatchTestRemoteActor ¶
func (tr *TestRunner) ExpectFederatedCoreActivityHTTPSigsMustMatchTestRemoteActor(keyID string)
func (*TestRunner) ExpectFederatedCoreActivityLike ¶
func (tr *TestRunner) ExpectFederatedCoreActivityLike(keyID string)
func (*TestRunner) ExpectFederatedCoreActivityReject ¶
func (tr *TestRunner) ExpectFederatedCoreActivityReject(keyID string)
func (*TestRunner) ExpectFederatedCoreActivityRemove ¶
func (tr *TestRunner) ExpectFederatedCoreActivityRemove(keyID string)
func (*TestRunner) ExpectFederatedCoreActivityUndo ¶
func (tr *TestRunner) ExpectFederatedCoreActivityUndo(keyID string)
func (*TestRunner) ExpectFederatedCoreActivityUpdate ¶
func (tr *TestRunner) ExpectFederatedCoreActivityUpdate(keyID string)
func (*TestRunner) Log ¶
func (tr *TestRunner) Log(msg string, i ...interface{})
func (*TestRunner) LogAuthenticateGetInbox ¶
func (tr *TestRunner) LogAuthenticateGetInbox(c context.Context, w http.ResponseWriter, r *http.Request, authenticated bool, err error)
func (*TestRunner) LogAuthenticateGetOutbox ¶
func (tr *TestRunner) LogAuthenticateGetOutbox(c context.Context, w http.ResponseWriter, r *http.Request, authenticated bool, err error)
func (*TestRunner) LogAuthenticatePostInbox ¶
func (*TestRunner) LogAuthenticatePostOutbox ¶
func (tr *TestRunner) LogAuthenticatePostOutbox(c context.Context, w http.ResponseWriter, r *http.Request, authenticated bool, err error)
func (*TestRunner) LogBlocked ¶
func (*TestRunner) LogDefaultCallback ¶
func (tr *TestRunner) LogDefaultCallback(c context.Context, activity pub.Activity)
func (*TestRunner) LogFederatingAccept ¶
func (tr *TestRunner) LogFederatingAccept(c context.Context, v vocab.ActivityStreamsAccept)
func (*TestRunner) LogFederatingAdd ¶
func (tr *TestRunner) LogFederatingAdd(c context.Context, v vocab.ActivityStreamsAdd)
func (*TestRunner) LogFederatingBlock ¶
func (tr *TestRunner) LogFederatingBlock(c context.Context, v vocab.ActivityStreamsBlock)
func (*TestRunner) LogFederatingCreate ¶
func (tr *TestRunner) LogFederatingCreate(c context.Context, v vocab.ActivityStreamsCreate)
func (*TestRunner) LogFederatingDelete ¶
func (tr *TestRunner) LogFederatingDelete(c context.Context, v vocab.ActivityStreamsDelete)
func (*TestRunner) LogFederatingFollow ¶
func (tr *TestRunner) LogFederatingFollow(c context.Context, v vocab.ActivityStreamsFollow)
func (*TestRunner) LogFederatingLike ¶
func (tr *TestRunner) LogFederatingLike(c context.Context, v vocab.ActivityStreamsLike)
func (*TestRunner) LogFederatingReject ¶
func (tr *TestRunner) LogFederatingReject(c context.Context, v vocab.ActivityStreamsReject)
func (*TestRunner) LogFederatingRemove ¶
func (tr *TestRunner) LogFederatingRemove(c context.Context, v vocab.ActivityStreamsRemove)
func (*TestRunner) LogFederatingUndo ¶
func (tr *TestRunner) LogFederatingUndo(c context.Context, v vocab.ActivityStreamsUndo)
func (*TestRunner) LogFederatingUpdate ¶
func (tr *TestRunner) LogFederatingUpdate(c context.Context, v vocab.ActivityStreamsUpdate)
func (*TestRunner) LogFilterForwarding ¶
func (*TestRunner) LogGetInbox ¶
func (tr *TestRunner) LogGetInbox(c context.Context, r *http.Request, outboxId *url.URL, p vocab.ActivityStreamsOrderedCollectionPage, err error)
func (*TestRunner) LogGetOutbox ¶
func (tr *TestRunner) LogGetOutbox(c context.Context, r *http.Request, outboxId *url.URL, p vocab.ActivityStreamsOrderedCollectionPage, err error)
func (*TestRunner) LogNewTransport ¶
func (*TestRunner) LogPostInboxRequestBodyHook ¶
func (*TestRunner) LogPostOutboxRequestBodyHook ¶
func (*TestRunner) LogPubHandlerFunc ¶
func (*TestRunner) LogPubHandlerFuncAuthd ¶
func (*TestRunner) LogSocialAdd ¶
func (tr *TestRunner) LogSocialAdd(c context.Context, v vocab.ActivityStreamsAdd)
func (*TestRunner) LogSocialBlock ¶
func (tr *TestRunner) LogSocialBlock(c context.Context, v vocab.ActivityStreamsBlock)
func (*TestRunner) LogSocialCreate ¶
func (tr *TestRunner) LogSocialCreate(c context.Context, v vocab.ActivityStreamsCreate)
func (*TestRunner) LogSocialDelete ¶
func (tr *TestRunner) LogSocialDelete(c context.Context, v vocab.ActivityStreamsDelete)
func (*TestRunner) LogSocialFollow ¶
func (tr *TestRunner) LogSocialFollow(c context.Context, v vocab.ActivityStreamsFollow)
func (*TestRunner) LogSocialLike ¶
func (tr *TestRunner) LogSocialLike(c context.Context, v vocab.ActivityStreamsLike)
func (*TestRunner) LogSocialRemove ¶
func (tr *TestRunner) LogSocialRemove(c context.Context, v vocab.ActivityStreamsRemove)
func (*TestRunner) LogSocialUndo ¶
func (tr *TestRunner) LogSocialUndo(c context.Context, v vocab.ActivityStreamsUndo)
func (*TestRunner) LogSocialUpdate ¶
func (tr *TestRunner) LogSocialUpdate(c context.Context, v vocab.ActivityStreamsUpdate)
func (*TestRunner) Run ¶
func (tr *TestRunner) Run(ctx *TestRunnerContext)
func (*TestRunner) SetRecorder ¶
func (tr *TestRunner) SetRecorder(r *Recorder)
func (*TestRunner) Stop ¶
func (tr *TestRunner) Stop()
type TestRunnerContext ¶
type TestRunnerContext struct { // Set by the server TestRemoteActorID *url.URL Actor pub.FederatingActor Transporter Transporter DB *Database AM *ActorMapping TestActor0 actorIDs TestActor1 actorIDs TestActor2 actorIDs TestActor3 actorIDs TestActor4 actorIDs RecurLimitExceeded bool // S2S Only RootRecurCollectionID deliverableIDs // S2S Only // Set by the TestRunner C context.Context APH APHooks // Read and Written by Tests InboxID *url.URL // Used for coordinating receiving instructions InstructionCh chan bool }
func (*TestRunnerContext) InstructionDone ¶
func (trc *TestRunnerContext) InstructionDone()
func (*TestRunnerContext) PrepInstructionResponse ¶
func (trc *TestRunnerContext) PrepInstructionResponse()
type TestServer ¶
type TestServer struct {
// contains filtered or unexported fields
}
func NewTestServer ¶
func NewTestServer(hostname, pathParent string, timeout time.Duration, max int) *TestServer
func (*TestServer) HandleInstructionResponse ¶
func (ts *TestServer) HandleInstructionResponse(pathPrefix string, vals map[string][]string)
func (*TestServer) HandleWeb ¶
func (ts *TestServer) HandleWeb(c context.Context, w http.ResponseWriter, r *http.Request)
func (*TestServer) HandleWebfinger ¶
func (*TestServer) PathError ¶
func (ts *TestServer) PathError(path string, err error)
func (*TestServer) PathHandle ¶
func (ts *TestServer) PathHandle(path string, i *Instruction)
func (*TestServer) PathMarkDone ¶
func (ts *TestServer) PathMarkDone(path string)
func (*TestServer) PathUpdate ¶
func (ts *TestServer) PathUpdate(path string, pending, done []TestInfo, results []Result)
type TestServerClosure ¶
type TestServerClosure struct { *TestServer // contains filtered or unexported fields }
func (*TestServerClosure) Error ¶
func (ts *TestServerClosure) Error(err error)
func (*TestServerClosure) Handle ¶
func (ts *TestServerClosure) Handle(i *Instruction)
func (*TestServerClosure) MarkDone ¶
func (ts *TestServerClosure) MarkDone()
func (*TestServerClosure) Update ¶
func (ts *TestServerClosure) Update(pending, done []TestInfo, results []Result)
type TestSpecKind ¶
type TestSpecKind string
const ( TestSpecKindMust TestSpecKind = "MUST" TestSpecKindShould TestSpecKind = "SHOULD" TestSpecKindMay TestSpecKind = "MAY" TestSpecKindNonNormative TestSpecKind = "NON-NORMATIVE" )
type TestState ¶
type TestState struct { ID string I Instruction Pending []TestInfo Completed []TestInfo Results []Result Err error Done bool }
func (TestState) NInconclusive ¶
type Transporter ¶
Click to show internal directories.
Click to hide internal directories.