webcallback

package
v2.43.0 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options func(*WebCallback)

func WithPort

func WithPort(port int) Options

type WebCallback

type WebCallback struct {
	// contains filtered or unexported fields
}

WebCallback is a web server that will wait for a callback

func New

func New(opts ...Options) *WebCallback

func (*WebCallback) Close

func (wb *WebCallback) Close()

func (*WebCallback) Port

func (wb *WebCallback) Port() int

Port returns the port used by the web server. It may be chosen randomly if let as default when starting server.

func (*WebCallback) Start

func (wb *WebCallback) Start() error

func (*WebCallback) Trigger

func (wb *WebCallback) Trigger(token string, timeout time.Duration) error

Trigger will trigger currently waiting callback. Made for tests

func (*WebCallback) Wait

func (wb *WebCallback) Wait(ctx context.Context) (string, error)

Jump to

Keyboard shortcuts

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