testutils

package
v3.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 29, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetSampleES256PrivKeyPem

func GetSampleES256PrivKeyPem() string

GetSampleES256PrivKeyPem returns a sample EC P-256 private key PEM

Matches GetSampleES256PubKeyPem

func GetSampleES256PubKeyPem

func GetSampleES256PubKeyPem() string

GetSampleES256PubKeyPem returns a sample EC P-256 public key PEM

Matches GetSampleES256PrivKeyPem

func GetSampleEdPrivKeyPem

func GetSampleEdPrivKeyPem() string

GetSampleEdPrivKeyPem returns a sample Ed private key PEM

Matches GetSampleEdPubKeyPem

func GetSampleEdPubKeyPem

func GetSampleEdPubKeyPem() string

GetSampleEdPubKeyPem returns a sample Ed public key PEM

Matches GetSampleEdPrivKeyPem

func GetSamplePrivKey

func GetSamplePrivKey(alg string) (*keys.PrivKey, error)

GetSamplePrivKey returns a sample PrivKey

func GetSamplePubKey

func GetSamplePubKey(alg string) (*keys.PubKey, error)

GetSamplePubKey returns a sample PubKey

func GetSamplePubKeyFingerprint

func GetSamplePubKeyFingerprint(keyType string) string

GetSamplePubKeyFingerprint returns a sample RSA public key fingerprint

func GetSampleRSAPrivKeyPem

func GetSampleRSAPrivKeyPem() string

GetSampleRSAPrivKeyPem returns a sample RSA private key PEM

Matches GetSamplePubKeyPem

func GetSampleRSAPubKeyPem

func GetSampleRSAPubKeyPem() string

GetSampleRSAPubKeyPem returns a sample RSA public key PEM

Matches GetSampleRSAPrivKeyPem

func SetupExampleMockServiceRegLoader

func SetupExampleMockServiceRegLoader() (*mocks.ServiceRegLoader, error)

SetupExampleMockServiceRegLoader returns an example mock ServiceRegLoader

func SetupMockServiceAccountTokenLoader

func SetupMockServiceAccountTokenLoader(authService *authservice.AuthService, appID string, orgID string, token *authservice.AccessToken, err error) *mocks.ServiceAccountLoader

SetupMockServiceAccountTokenLoader returns a mock ServiceAccountLoader which loads a single access token

func SetupMockServiceAccountTokensLoader

func SetupMockServiceAccountTokensLoader(authService *authservice.AuthService, tokens map[authservice.AppOrgPair]authservice.AccessToken, err error) *mocks.ServiceAccountLoader

SetupMockServiceAccountTokensLoader returns a mock ServiceAccountLoader which loads a set of access tokens

func SetupMockServiceRegLoader

func SetupMockServiceRegLoader(authService *authservice.AuthService, subscribed []string, result []authservice.ServiceReg, err error, once bool) *mocks.ServiceRegLoader

SetupMockServiceRegLoader returns a mock ServiceRegLoader

func SetupTestAuthService

func SetupTestAuthService(serviceID string, serviceHost string) *authservice.AuthService

SetupTestAuthService returns a test AuthService

func SetupTestServiceAccountManager

func SetupTestServiceAccountManager(authService *authservice.AuthService, mockDataLoader *mocks.ServiceAccountLoader, loadTokens bool) (*authservice.ServiceAccountManager, error)

SetupTestServiceAccountManager returns a test ServiceAccountManager

func SetupTestServiceRegManager

func SetupTestServiceRegManager(authService *authservice.AuthService, mockDataLoader *mocks.ServiceRegLoader) (*authservice.ServiceRegManager, error)

SetupTestServiceRegManager returns a test ServiceRegManager

Types

This section is empty.

Jump to

Keyboard shortcuts

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