Documentation ¶
Overview ¶
Package s3uri parses and generates URI strings for Amazon S3 resources. it is based on this original Gist by https://github.com/kwilczynski https://gist.github.com/kwilczynski/f6e626990d6d2395b42a12721b165b86
Index ¶
- Constants
- Variables
- func Bool(b bool) *bool
- func BoolValue(b *bool) bool
- func String(s string) *string
- func StringValue(s *string) string
- func Validate(v any) bool
- func ValidateString(s string) bool
- func ValidateURL(u *url.URL) bool
- type Option
- type S3URI
- func (s3u *S3URI) GetCredentials() (string, string, string)
- func (s3u *S3URI) HasCredentials() bool
- func (s3u *S3URI) Parse(v any) (*S3URI, error)
- func (s3u *S3URI) ParseString(s string) (*S3URI, error)
- func (s3u *S3URI) ParseURL(u *url.URL) (*S3URI, error)
- func (s3u *S3URI) Reset() *S3URI
- func (s3u *S3URI) URI() *url.URL
Constants ¶
View Source
const DefaultRegion = "us-east-1"
DefaultRegion contains a default region for an S3 bucket, when a region cannot be determined, for example when the s3:// schema is used or when path style URL has been given without the region component in the fully-qualified domain name.
Variables ¶
Functions ¶
func StringValue ¶
func ValidateString ¶
func ValidateURL ¶
Types ¶
type Option ¶
type Option func(*S3URI)
func WithBucket ¶
func WithCredenials ¶
func WithNormalizedKey ¶
func WithRegion ¶
func WithScheme ¶
func WithVersionID ¶
type S3URI ¶
type S3URI struct { HostStyle *bool PathStyle *bool Accelerated *bool DualStack *bool Website *bool Scheme *string Bucket *string Key *string VersionID *string Region *string AccessKey *string Secret *string // contains filtered or unexported fields }
func ParseString ¶
func (*S3URI) HasCredentials ¶
Click to show internal directories.
Click to hide internal directories.