v1.6.11 Latest Latest

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

Go to latest
Published: Dec 6, 2021 License: MIT Imports: 29 Imported by: 0




This section is empty.


This section is empty.


func CallPaymentHeadlessConsentUrls added in v1.1.16

func CallPaymentHeadlessConsentUrls(rt *[]manifest.RequiredTokens, ctx *model.Context, logger *logrus.Entry) (map[string]string, error)

CallPaymentHeadlessConsentUrls -

func ExchangeCodeForAccessToken

func ExchangeCodeForAccessToken(tokenName, code string, ctx *model.Context) (accesstoken string, err error)

ExchangeCodeForAccessToken - runs a testcase to perform this operation

func GetDynamicResourceIds added in v1.1.15

func GetDynamicResourceIds(tokenName, token string, ctx *model.Context, requiredTokens []manifest.RequiredTokens) error

GetDynamicResourceIds retrieves the accounts and statements resource ids for the current token

func GetHeadlessConsent added in v1.1.16

func GetHeadlessConsent(definition RunDefinition, ctx *model.Context, specRun *generation.SpecRun, permissions map[string][]manifest.RequiredTokens) ([]manifest.RequiredTokens, error)

GetHeadlessConsent -

func NewBufferedDaemonController

func NewBufferedDaemonController() *daemonController

NewBufferedDaemonController new instance to control a background routine with 100 objects buffer in result and error channels

func NewDaemonController

func NewDaemonController(resultChan chan results.TestCase) *daemonController

NewDaemonController new instance to control a background routine


type Collector

type Collector interface {
	Collect(setName, token string) error
	Tokens() []Token

Collector collects tokens for a set or permissions requirements and calls a subscribed function when it has received all

type DaemonController

type DaemonController interface {
	ShouldStop() bool

	AddResult(result results.TestCase)
	AllResults() []results.TestCase
	AllResultsGrouped() map[results.ResultKey][]results.TestCase
	ResponseFieldsJSON() string

	Results() <-chan results.TestCase

	IsCompleted() <-chan bool

type DetailError added in v1.1.6

type DetailError struct {
	EndpointResponseCode int    `json:"endpointResponseCode"`
	EndpointResponse     string `json:"endpointResponse"`
	TestCaseMessage      string `json:"testCaseMessage"`

func (DetailError) Error added in v1.1.6

func (de DetailError) Error() string

type ExchangeParameters

type ExchangeParameters struct {
	Code                string
	BasicAuthentication string
	TokenEndpoint       string
	RedirectURL         string
	Scope               string
	TokenName           string

ExchangeParameters - Captures the parameters require to exchange a code for an access token

type Executor

type Executor struct {
	SigningCert   authentication.Certificate
	TransportCert authentication.Certificate

Executor - passes request to system under test across an matls connection

func (*Executor) ExecuteTestCase

func (e *Executor) ExecuteTestCase(r *resty.Request, t *model.TestCase, ctx *model.Context) (*resty.Response, results.Metrics, error)

ExecuteTestCase - makes this a generic executor

func (*Executor) SetCertificates

func (e *Executor) SetCertificates(certificateSigning, certificationTransport authentication.Certificate) error

SetCertificates receives transport and signing certificates

type RunDefinition

type RunDefinition struct {
	DiscoModel    *discovery.Model
	SpecRun       generation.SpecRun
	SigningCert   authentication.Certificate
	TransportCert authentication.Certificate

RunDefinition captures all the information required to run the test cases

type TestCaseExecutor

type TestCaseExecutor interface {
	ExecuteTestCase(r *resty.Request, t *model.TestCase, ctx *model.Context) (*resty.Response, results.Metrics, error)
	SetCertificates(certificateSigning, certificationTransport authentication.Certificate) error

TestCaseExecutor defines an interface capable of executing a testcase

func NewExecutor

func NewExecutor() TestCaseExecutor

NewExecutor creates an executor

type TestCaseRunner

type TestCaseRunner struct {
	// contains filtered or unexported fields

func NewConsentAcquisitionRunner

func NewConsentAcquisitionRunner(logger *logrus.Entry, definition RunDefinition, daemonController DaemonController) *TestCaseRunner

NewConsentAcquisitionRunner -

func NewExchangeComponentRunner

func NewExchangeComponentRunner(definition RunDefinition, daemonController DaemonController) *TestCaseRunner

NewExchangeComponentRunner -

func NewTestCaseRunner

func NewTestCaseRunner(logger *logrus.Entry, definition RunDefinition, daemonController DaemonController) *TestCaseRunner

NewTestCaseRunner -

func (*TestCaseRunner) AppErr

func (r *TestCaseRunner) AppErr(msg string) error

AppErr - application level trace error msg

func (*TestCaseRunner) AppMsg

func (r *TestCaseRunner) AppMsg(msg string) string

AppMsg - application level trace

func (*TestCaseRunner) RunConsentAcquisition

func (r *TestCaseRunner) RunConsentAcquisition(item TokenConsentIDItem, ctx *model.Context, consentType string, consentIDChannel chan<- TokenConsentIDItem) error

RunConsentAcquisition -

func (*TestCaseRunner) RunTestCases

func (r *TestCaseRunner) RunTestCases(ctx *model.Context) error

RunTestCases runs the testCases

func (*TestCaseRunner) String

func (r *TestCaseRunner) String() string

String - object represetation

type Token

type Token struct {
	Code            string
	NamedPermission model.NamedPermission

Token represents a token acquisition for one of the permission set requirement

type TokenCollector

type TokenCollector interface {
	Collect(tokenName, accesstoken string) error
	Tokens() TokenConsentIDs

TokenCollector - collects tokens

func NewTokenCollector

func NewTokenCollector(log *logrus.Entry, consentIds TokenConsentIDs, doneFunc func(), events events.Events) TokenCollector

NewTokenCollector -

type TokenConsentIDItem

type TokenConsentIDItem struct {
	TokenName   string
	ConsentID   string
	Permissions string
	AccessToken string
	ConsentURL  string
	Error       string

TokenConsentIDItem is a single consentId mapping to token name

type TokenConsentIDs

type TokenConsentIDs []TokenConsentIDItem

TokenConsentIDs captures the token/consentIds awaiting authorisation

func GetPsuConsent added in v1.1.0

func GetPsuConsent(definition RunDefinition, ctx *model.Context, runTests *generation.SpecRun, permissions map[string][]manifest.RequiredTokens) (TokenConsentIDs, map[string]string, error)

GetPsuConsent -


Path Synopsis

Jump to

Keyboard shortcuts

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