common

package
v0.0.0-...-7b7c10a Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2022 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContextWithSignerOpts

func ContextWithSignerOpts(ctx context.Context, name string, opts *SignerOpts) context.Context

ContextWithSignerOpts returns a new context with options for a request signer.

Types

type RequestSigner

type RequestSigner struct {
	Headers     []string
	PublicKeyID string
	PrivateKey  ed25519.PrivateKey
}

RequestSigner is a signer in HTTP Signatures auth method.

func (*RequestSigner) Sign

func (s *RequestSigner) Sign(req *http.Request) error

Sign signs an HTTP request.

type SignerOpts

type SignerOpts struct {
	PublicKeyID string
	PrivateKey  ed25519.PrivateKey
}

SignerOpts represents signer options.

type Steps

type Steps struct {
	HTTPClient *http.Client
	VDR        vdrapi.Registry
	// contains filtered or unexported fields
}

Steps defines context for common scenario steps.

func NewSteps

func NewSteps(tlsConfig *tls.Config) (*Steps, error)

NewSteps returns new Steps context.

func (*Steps) HealthCheck

func (s *Steps) HealthCheck(ctx context.Context, host string, port int) error

HealthCheck checks if service on host:port is up and running.

func (*Steps) RegisterSteps

func (s *Steps) RegisterSteps(sc *godog.ScenarioContext)

RegisterSteps registers common scenario steps.

Jump to

Keyboard shortcuts

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