Versions in this module Expand all Collapse all v1 v1.0.3 Apr 4, 2026 v1.0.2 Apr 2, 2026 v1.0.1 Apr 1, 2026 v1.0.0 Apr 1, 2026 Changes in this version + var ErrSkipped = errors.New("step skipped: dependency failed") + type Block struct + func New(name string, opts ...Option) *Block + func (b *Block) Delete(ctx context.Context, path string) (*Response, error) + func (b *Block) Do(ctx context.Context, r Request) (*Response, error) + func (b *Block) FanOut(ctx context.Context, requests map[string]Request, opts ...PipelineOption) (*Results, error) + func (b *Block) Get(ctx context.Context, path string, query map[string]string) (*Response, error) + func (b *Block) GetJSON(ctx context.Context, path string, query map[string]string, out any) error + func (b *Block) Head(ctx context.Context, path string) (*Response, error) + func (b *Block) Init(_ context.Context) error + func (b *Block) Name() string + func (b *Block) Patch(ctx context.Context, path string, body any) (*Response, error) + func (b *Block) PatchJSON(ctx context.Context, path string, body, out any) error + func (b *Block) Pipeline(ctx context.Context, steps []PipelineStep, opts ...PipelineOption) (*Results, error) + func (b *Block) Post(ctx context.Context, path string, body any) (*Response, error) + func (b *Block) PostJSON(ctx context.Context, path string, body, out any) error + func (b *Block) Put(ctx context.Context, path string, body any) (*Response, error) + func (b *Block) PutJSON(ctx context.Context, path string, body, out any) error + func (b *Block) Shutdown(_ context.Context) error + func (b *Block) Token(ctx context.Context) (string, error) + type Option func(*blockConfig) + func WithAPIKeyHeader(headerName, key string) Option + func WithAPIKeyQuery(paramName, key string) Option + func WithBaseURL(u string) Option + func WithBasicAuth(username, password string) Option + func WithBearerToken(token string) Option + func WithHeader(key, value string) Option + func WithMaxIdleConns(n int) Option + func WithOAuth2ClientCredentials(tokenURL, clientID, clientSecret string, scopes ...string) Option + func WithTLS(cfg *tls.Config) Option + func WithTimeout(d time.Duration) Option + func WithTokenProvider(p TokenProvider) Option + func WithTransport(rt http.RoundTripper) Option + type PipelineOption func(*pipelineConfig) + func WithContinueOnError() PipelineOption + func WithDefaultRetry(policy RetryPolicy) PipelineOption + func WithMaxConcurrency(n int) PipelineOption + func WithWaveTimeout(d time.Duration) PipelineOption + type PipelineStep struct + Build func(ctx context.Context, prev *Results) (Request, error) + DependsOn []string + Name string + Retry *RetryPolicy + type Request struct + Body any + ContentType string + Headers map[string]string + Method string + Path string + Query map[string]string + type Response struct + Body []byte + Headers http.Header + StatusCode int + func (r *Response) Latency() time.Duration + func (r *Response) OK() bool + type Results struct + func (r *Results) Get(name string) *StepResult + func (r *Results) JSON(name string, v any) error + func (r *Results) Names() []string + type RetryPolicy struct + Backoff float64 + Delay time.Duration + MaxAttempts int + type StepResult struct + Attempts int + Err error + Latency time.Duration + Name string + Response *Response + func (sr *StepResult) OK() bool + func (sr *StepResult) Skipped() bool + type TokenProvider interface + Token func(ctx context.Context) (string, error)