Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PortainerContainer ¶
type PortainerContainer struct {
testcontainers.Container
APIPort nat.Port
APIHost string
// contains filtered or unexported fields
}
PortainerContainer represents a Portainer container for testing
func NewPortainerContainer ¶
func NewPortainerContainer(ctx context.Context, opts ...PortainerContainerOption) (*PortainerContainer, error)
NewPortainerContainer creates and starts a new Portainer container with the specified options
func (*PortainerContainer) GetAPIBaseURL ¶
func (pc *PortainerContainer) GetAPIBaseURL() string
GetAPIBaseURL returns the base URL for the Portainer API
func (*PortainerContainer) GetAPIToken ¶
func (pc *PortainerContainer) GetAPIToken() string
func (*PortainerContainer) GetHostAndPort ¶
func (pc *PortainerContainer) GetHostAndPort() (string, string)
GetHostAndPort returns the host and port for the Portainer API
type PortainerContainerOption ¶
type PortainerContainerOption func(*portainerContainerConfig)
PortainerContainerOption defines a function type for applying options to Portainer container configuration
func WithDockerSocketBind ¶
func WithDockerSocketBind(bind bool) PortainerContainerOption
WithDockerSocketBind configures the container to bind mount the Docker socket
func WithImage ¶
func WithImage(image string) PortainerContainerOption
WithImage sets a custom Portainer image
Click to show internal directories.
Click to hide internal directories.