Documentation ¶
Index ¶
- Constants
- func ComputeHMACSHA256(cred *SharedKeyCredential, message string) (string, error)
- func ComputeUDCHMACSHA256(udc *UserDelegationCredential, message string) (string, error)
- func ConvertToBlobSharedKey(c *SharedKeyCredential) (*azblob.SharedKeyCredential, error)
- func ConvertToDFSError(err error) error
- func FormatBlobAccessConditions(p *AccessConditions) *blob.AccessConditions
- func FormatContainerAccessConditions(b *AccessConditions) *container.AccessConditions
- func FormatHTTPRange(r HTTPRange) *string
- func FormatPathAccessConditions(p *AccessConditions) (*generated.LeaseAccessConditions, *generated.ModifiedAccessConditions)
- func GetAccountName(udc *UserDelegationCredential) string
- type AccessConditions
- type AccessPolicyPermission
- type HTTPRange
- type LeaseAccessConditions
- type ModifiedAccessConditions
- type SharedKeyCredPolicy
- type SharedKeyCredential
- type SourceAccessConditions
- type SourceModifiedAccessConditions
- type TransferValidationType
- type TransferValidationTypeCRC64
- type UserDelegationCredential
- type UserDelegationKey
Constants ¶
const ( // EventUpload is used when we compute number of chunks to upload and size of each chunk. EventUpload log.Event = "azdatalake.Upload" // EventError is used for logging errors. EventError log.Event = "azdatalake.Error" )
NOTE: these are publicly exported via type-aliasing in azdatalake/log.go
const ( ModuleName = "github.com/Azure/azure-sdk-for-go/sdk/storage/azdatalake" ModuleVersion = "v1.2.1-beta.1" )
const SnapshotTimeFormat = "2006-01-02T15:04:05.0000000Z07:00"
Variables ¶
This section is empty.
Functions ¶
func ComputeHMACSHA256 ¶
func ComputeHMACSHA256(cred *SharedKeyCredential, message string) (string, error)
ComputeHMACSHA256 is a helper for computing the signed string outside of this package.
func ComputeUDCHMACSHA256 ¶
func ComputeUDCHMACSHA256(udc *UserDelegationCredential, message string) (string, error)
ComputeUDCHMACSHA256 is a helper method for computing the signed string outside this package.
func ConvertToBlobSharedKey ¶
func ConvertToBlobSharedKey(c *SharedKeyCredential) (*azblob.SharedKeyCredential, error)
func ConvertToDFSError ¶
func FormatBlobAccessConditions ¶
func FormatBlobAccessConditions(p *AccessConditions) *blob.AccessConditions
FormatBlobAccessConditions formats PathAccessConditions into blob's LeaseAccessConditions and ModifiedAccessConditions.
func FormatContainerAccessConditions ¶
func FormatContainerAccessConditions(b *AccessConditions) *container.AccessConditions
FormatContainerAccessConditions formats FileSystemAccessConditions into container's LeaseAccessConditions and ModifiedAccessConditions.
func FormatHTTPRange ¶
FormatHTTPRange converts an HTTPRange to its string format.
func FormatPathAccessConditions ¶
func FormatPathAccessConditions(p *AccessConditions) (*generated.LeaseAccessConditions, *generated.ModifiedAccessConditions)
FormatPathAccessConditions formats PathAccessConditions into path's LeaseAccessConditions and ModifiedAccessConditions.
func GetAccountName ¶
func GetAccountName(udc *UserDelegationCredential) string
GetAccountName is a helper method for accessing the user delegation key parameters outside this package.
Types ¶
type AccessConditions ¶
type AccessConditions struct { ModifiedAccessConditions *ModifiedAccessConditions LeaseAccessConditions *LeaseAccessConditions }
AccessConditions identifies container-specific access conditions which you optionally set.
type AccessPolicyPermission ¶
type AccessPolicyPermission struct {
Read, Add, Create, Write, Delete, List bool
}
AccessPolicyPermission type simplifies creating the permissions string for a container's access policy. Initialize an instance of this type and then call its String method to set AccessPolicy's Permission field.
func (*AccessPolicyPermission) Parse ¶
func (p *AccessPolicyPermission) Parse(s string) error
Parse initializes the AccessPolicyPermission's fields from a string.
func (*AccessPolicyPermission) String ¶
func (p *AccessPolicyPermission) String() string
String produces the access policy permission string for an Azure Storage container. Call this method to set AccessPolicy's Permission field.
type HTTPRange ¶
HTTPRange defines a range of bytes within an HTTP resource, starting at offset and ending at offset+count. A zero-value HTTPRange indicates the entire resource. An HTTPRange which has an offset and zero value count indicates from the offset to the resource's end.
type LeaseAccessConditions ¶
type LeaseAccessConditions = generated.LeaseAccessConditions
LeaseAccessConditions contains optional parameters to access leased entity.
type ModifiedAccessConditions ¶
type ModifiedAccessConditions = generated.ModifiedAccessConditions
ModifiedAccessConditions contains a group of parameters for specifying access conditions.
type SharedKeyCredPolicy ¶
type SharedKeyCredPolicy struct {
// contains filtered or unexported fields
}
func NewSharedKeyCredPolicy ¶
func NewSharedKeyCredPolicy(cred *SharedKeyCredential) *SharedKeyCredPolicy
type SharedKeyCredential ¶
type SharedKeyCredential struct {
// contains filtered or unexported fields
}
SharedKeyCredential contains an account's name and its primary or secondary key.
func NewSharedKeyCredential ¶
func NewSharedKeyCredential(accountName string, accountKey string) (*SharedKeyCredential, error)
NewSharedKeyCredential creates an immutable SharedKeyCredential containing the storage account's name and either its primary or secondary key.
func (*SharedKeyCredential) AccountName ¶
func (c *SharedKeyCredential) AccountName() string
AccountName returns the Storage account's name.
func (*SharedKeyCredential) SetAccountKey ¶
func (c *SharedKeyCredential) SetAccountKey(accountKey string) error
SetAccountKey replaces the existing account key with the specified account key.
type SourceAccessConditions ¶
type SourceAccessConditions struct { SourceModifiedAccessConditions *SourceModifiedAccessConditions SourceLeaseAccessConditions *LeaseAccessConditions }
SourceAccessConditions identifies container-specific access conditions which you optionally set.
type SourceModifiedAccessConditions ¶
type SourceModifiedAccessConditions = generated.SourceModifiedAccessConditions
SourceModifiedAccessConditions contains a group of parameters for specifying access conditions of a source.
type TransferValidationType ¶
type TransferValidationType interface { Apply(io.ReadSeekCloser, generated.TransactionalContentSetter) (io.ReadSeekCloser, error) // contains filtered or unexported methods }
TransferValidationType abstracts the various mechanisms used to verify a transfer.
func TransferValidationTypeComputeCRC64 ¶
func TransferValidationTypeComputeCRC64() TransferValidationType
TransferValidationTypeComputeCRC64 is a TransferValidationType that indicates a CRC64 should be computed during transfer.
type TransferValidationTypeCRC64 ¶
type TransferValidationTypeCRC64 uint64
TransferValidationTypeCRC64 is a TransferValidationType used to provide a precomputed CRC64.
func (TransferValidationTypeCRC64) Apply ¶
func (c TransferValidationTypeCRC64) Apply(rsc io.ReadSeekCloser, cfg generated.TransactionalContentSetter) (io.ReadSeekCloser, error)
type UserDelegationCredential ¶
type UserDelegationCredential struct {
// contains filtered or unexported fields
}
UserDelegationCredential contains an account's name and its user delegation key.
func NewUserDelegationCredential ¶
func NewUserDelegationCredential(accountName string, udk UserDelegationKey) *UserDelegationCredential
NewUserDelegationCredential creates a new UserDelegationCredential using a Storage account's Name and a user delegation Key from it
type UserDelegationKey ¶
type UserDelegationKey = generated_blob.UserDelegationKey
UserDelegationKey contains UserDelegationKey.
func GetUDKParams ¶
func GetUDKParams(udc *UserDelegationCredential) *UserDelegationKey
GetUDKParams is a helper method for accessing the user delegation key parameters outside this package.