mockserver

package
v0.0.19 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Container

type Container genericapi.Container

Container represents a mock-server container

func CreateContainer

func CreateContainer(ctx context.Context, req ContainerRequest) (*Container, error)

CreateContainer creates and starts a mock-server container

func (Container) Client added in v0.0.11

Client creates and returns a new mock-server client

func (Container) GetLogs added in v0.0.9

func (c Container) GetLogs(ctx context.Context) (string, error)

GetLogs retrieves all logs from the container

func (Container) HostAndPort added in v0.0.11

func (c Container) HostAndPort(ctx context.Context) (string, nat.Port, error)

HostAndPort retrieves the external host and port of the container

func (Container) Shutdown added in v0.0.8

func (c Container) Shutdown(ctx context.Context) error

Shutdown terminates the container

func (Container) URL added in v0.0.7

func (c Container) URL(ctx context.Context) (string, error)

URL builds an URL that can be used to interact with the container's HTTP API

func (Container) URLForNetwork added in v0.0.7

func (c Container) URLForNetwork(ctx context.Context, network string) (string, error)

URLForNetwork builds an URL that can be used to interact with the container's HTTP API inside the specified network

type ContainerRequest

type ContainerRequest genericapi.ContainerRequest

ContainerRequest a container request specification

func (ContainerRequest) WithNetworkAlias

func (req ContainerRequest) WithNetworkAlias(network, alias string) ContainerRequest

WithNetworkAlias adds a network alias to the container request

Jump to

Keyboard shortcuts

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