shared

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 9, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HeaderAuthorization     = "Authorization"
	HeaderXmsDate           = "x-ms-date"
	HeaderContentLength     = "Content-Length"
	HeaderContentEncoding   = "Content-Encoding"
	HeaderContentLanguage   = "Content-Language"
	HeaderContentType       = "Content-Type"
	HeaderContentMD5        = "Content-MD5"
	HeaderIfModifiedSince   = "If-Modified-Since"
	HeaderIfMatch           = "If-Match"
	HeaderIfNoneMatch       = "If-None-Match"
	HeaderIfUnmodifiedSince = "If-Unmodified-Since"
	HeaderRange             = "Range"
)
View Source
const (
	TokenScope = "https://storage.azure.com/.default"
)

Variables

View Source
var CRC64Table = crc64.MakeTable(crc64Polynomial)

Functions

func CopyOptions

func CopyOptions[T any](opts *T) *T

CopyOptions returns a zero-value T if opts is nil. If opts is not nil, a copy is made and its address returned.

func GetClientOptions

func GetClientOptions[T any](o *T) *T

func IsIPEndpointStyle

func IsIPEndpointStyle(host string) bool

IsIPEndpointStyle checkes if URL's host is IP, in this case the storage account endpoint will be composed as: http(s)://IP(:port)/storageaccount/queue/... As url's Host property, host could be both host or host:port

Types

type ParsedConnectionString

type ParsedConnectionString struct {
	ServiceURL  string
	AccountName string
	AccountKey  string
}

func ParseConnectionString

func ParseConnectionString(connectionString string) (ParsedConnectionString, error)

Jump to

Keyboard shortcuts

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