Documentation
¶
Index ¶
Constants ¶
View Source
const (
// ForcedFailure is a context key used to simulate forced failures in certain methods.
ForcedFailure = "X_Forced_Failure"
)
Variables ¶
View Source
var ErrUnexpectedError = errors.New("unexpected error")
ErrUnexpectedError represents an unexpected error during the stub implementation.
Functions ¶
func SetBucketTracker ¶
func SetBucketTracker(c s3.Client, tracker BucketTracker)
Types ¶
type BucketTracker ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func New ¶
New creates a new instance of the Client with optional object storage objects. This is a stub function.
func (*Client) GetBucketPolicy ¶
type Option ¶
type Option func(c *Client)
Option represents a function that configures a Client.
func WithPolicy ¶
WithPolicy is an option to configure the stub client with a policy for bucket.
type PolicyDocument ¶
type PolicyDocument struct {
ID string `json:"Id"`
Version string `json:"Version"`
Statement []Statement `json:"Statement"`
}
PolicyDocument represents the structure of an AWS S3 bucket policy.
type Statement ¶
type Statement struct {
SID string `json:"Sid"`
Effect string `json:"Effect"`
Action any `json:"Action"` // Can be a string or a slice
Resource any `json:"Resource"` // Can be a string or a slice
Principal any `json:"Principal"` // Can be a string, object, or slice
}
Statement represents an individual statement in the policy.
Click to show internal directories.
Click to hide internal directories.