Package: presigned-url

import "../ibm-cos-sdk-go-v2/service/internal/presigned-url"

Overview

Package presignedurl provides the customizations for API clients to fill in presigned URLs into input parameters.

Type Summary collapse

Interface Summary collapse

Function Summary collapse

Type Details

Options struct

Options provides the set of options needed by the presigned URL middleware.

Structure Fields:

Accessor ParameterAccessor

Accessor are the parameter accessors used by this middleware

Presigner URLPresigner

Presigner is the URLPresigner used by the middleware

ParameterAccessor struct

ParameterAccessor provides an collection of accessor to for retrieving and setting the values needed to PresignedURL generation

Structure Fields:

(empty struct)

Function Details

func AddAsIsPresigingMiddleware(stack *middleware.Stack) error

AddAsIsPresigingMiddleware is an alias for backwards compatibility.

Deprecated: This API was released with a typo. Use [AddAsIsPresigningMiddleware] instead.



40
41
42
// File 'service/internal/presigned-url/context.go', line 40

func AddAsIsPresigingMiddleware(stack *middleware.Stack) error { return AddAsIsPresigningMiddleware(stack) }

func AddAsIsPresigningMiddleware(stack *middleware.Stack) error

AddAsIsPresigningMiddleware adds a middleware to the head of the stack that will update the stack’s context to be flagged as being invoked for the purpose of presigning.



32
33
34
// File 'service/internal/presigned-url/context.go', line 32

func AddAsIsPresigningMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(asIsPresigningMiddleware{}, middleware.Before) }

func AddMiddleware(stack *middleware.Stack, opts Options) error

AddMiddleware adds the Presign URL middleware to the middleware stack.



48
49
50
// File 'service/internal/presigned-url/middleware.go', line 48

func AddMiddleware(stack *middleware.Stack, opts Options) error { return stack.Initialize.Add(&presign{options: opts}, middleware.Before) }

func GetIsPresigning(ctx context.Context) bool

GetIsPresigning returns if the context contains the isPresigning sentinel value for presigning flows.

Scoped to stack values. Use github.com/aws/smithy-go/middleware#ClearStackValues to clear all stack values.



22
23
24
25
// File 'service/internal/presigned-url/context.go', line 22

func GetIsPresigning(ctx context.Context) bool { v, _ := middleware.GetStackValue(ctx, isPresigningKey{}).(bool) return v }

func RemoveMiddleware(stack *middleware.Stack) error

RemoveMiddleware removes the Presign URL middleware from the stack.



53
54
55
56
// File 'service/internal/presigned-url/middleware.go', line 53

func RemoveMiddleware(stack *middleware.Stack) error { _, err := stack.Initialize.Remove((*presign)(nil).ID()) return err }

func WithIsPresigning(ctx context.Context) context.Context

WithIsPresigning adds the isPresigning sentinel value to a context to signal that the middleware stack is using the presign flow.

Scoped to stack values. Use github.com/aws/smithy-go/middleware#ClearStackValues to clear all stack values.



13
14
15
// File 'service/internal/presigned-url/context.go', line 13

func WithIsPresigning(ctx context.Context) context.Context { return middleware.WithStackValue(ctx, isPresigningKey{}, true) }