Documentation
¶
Index ¶
- Constants
- Variables
- func GenerateUserDelegationSAS(ctx context.Context, creds *cloudyazure.AzureCredentials, ...) (string, error)
- func GetStorageAccountType(ctx context.Context, env *cloudy.Environment, name string) (string, error)
- type AzureBlobFileShareFactory
- type AzureBlobStorageFactory
- type AzureCosmosDbDatastore
- func (az *AzureCosmosDbDatastore) Close(ctx context.Context) error
- func (az *AzureCosmosDbDatastore) Delete(ctx context.Context, key string) error
- func (az *AzureCosmosDbDatastore) DeleteAll(ctx context.Context, key []string) error
- func (az *AzureCosmosDbDatastore) Exists(ctx context.Context, key string) (bool, error)
- func (az *AzureCosmosDbDatastore) Get(ctx context.Context, id string) ([]byte, error)
- func (az *AzureCosmosDbDatastore) GetAll(ctx context.Context) ([][]byte, error)
- func (az *AzureCosmosDbDatastore) OnCreate(fn func(ctx context.Context, ds datastore.UntypedJsonDataStore) error)
- func (az *AzureCosmosDbDatastore) Open(ctx context.Context, config interface{}) error
- func (az *AzureCosmosDbDatastore) Ping(ctx context.Context) bool
- func (az *AzureCosmosDbDatastore) Query(ctx context.Context, query *datastore.SimpleQuery) ([][]byte, error)
- func (az *AzureCosmosDbDatastore) QueryAndUpdate(ctx context.Context, ds *datastore.SimpleQuery, ...) ([][]byte, error)
- func (az *AzureCosmosDbDatastore) QueryAsMap(ctx context.Context, ds *datastore.SimpleQuery) ([]map[string]any, error)
- func (az *AzureCosmosDbDatastore) QueryTable(ctx context.Context, ds *datastore.SimpleQuery) ([][]interface{}, error)
- func (az *AzureCosmosDbDatastore) Save(ctx context.Context, data []byte, key string) error
- func (az *AzureCosmosDbDatastore) SaveAll(ctx context.Context, b [][]byte, s []string) error
- type AzureFileShareFactory
- type AzureStorageAccount
- type BlobContainerShare
- func (bfs *BlobContainerShare) Create(ctx context.Context, key string, tags map[string]string) (*storage.FileShare, error)
- func (bfs *BlobContainerShare) Delete(ctx context.Context, key string) error
- func (bfs *BlobContainerShare) Exists(ctx context.Context, key string) (bool, error)
- func (bfs *BlobContainerShare) Get(ctx context.Context, key string) (*storage.FileShare, error)
- func (bfs *BlobContainerShare) List(ctx context.Context) ([]*storage.FileShare, error)
- type BlobFileShare
- func (bfs *BlobFileShare) Create(ctx context.Context, key string, tags map[string]string) (*storage.FileShare, error)
- func (bfs *BlobFileShare) Delete(ctx context.Context, key string) error
- func (bfs *BlobFileShare) Exists(ctx context.Context, key string) (bool, error)
- func (bfs *BlobFileShare) Get(ctx context.Context, key string) (*storage.FileShare, error)
- func (bfs *BlobFileShare) List(ctx context.Context) ([]*storage.FileShare, error)
- type BlobStorage
- func (b *BlobStorage) Delete(ctx context.Context, key string) error
- func (b *BlobStorage) Download(ctx context.Context, key string) (io.ReadCloser, error)
- func (b *BlobStorage) Exists(ctx context.Context, key string) (bool, error)
- func (b *BlobStorage) GenDownloadURL(ctx context.Context, key string) (string, error)
- func (b *BlobStorage) GenUploadURL(ctx context.Context, key string) (string, error)
- func (b *BlobStorage) List(ctx context.Context, prefix string) ([]*storage.StoredObject, []*storage.StoredPrefix, error)
- func (b *BlobStorage) ListNative(ctx context.Context, prefix string) ([]*container.BlobItem, []*container.BlobPrefix, error)
- func (b *BlobStorage) TagsToMap(tags *container.BlobTags) map[string]string
- func (b *BlobStorage) ToStoredObject(item *container.BlobItem) *storage.StoredObject
- func (b *BlobStorage) UpdateMetadata(ctx context.Context, key string, tags map[string]string) error
- func (b *BlobStorage) Upload(ctx context.Context, key string, data io.Reader, tags map[string]string) error
- type BlobStorageAccount
- func (sa *BlobStorageAccount) Create(ctx context.Context, key string, openToPublic bool, tags map[string]string) (storage.ObjectStorage, error)
- func (sa *BlobStorageAccount) Delete(ctx context.Context, key string) error
- func (sa *BlobStorageAccount) Exists(ctx context.Context, key string) (bool, error)
- func (sa *BlobStorageAccount) Get(ctx context.Context, key string) (storage.ObjectStorage, error)
- func (sa *BlobStorageAccount) GetBlobContainer(ctx context.Context, name string) (*storage.StorageArea, error)
- func (sa *BlobStorageAccount) GetItem(ctx context.Context, key string) (*storage.StorageArea, error)
- func (sa *BlobStorageAccount) List(ctx context.Context) ([]*storage.StorageArea, error)
- type CosmosDBFactory
- func (c *CosmosDBFactory) Create(cfg interface{}) (datastore.UntypedJsonDataStoreFactory, error)
- func (c *CosmosDBFactory) CreateJsonDatastore(ctx context.Context, typename string, prefix string, idField string) datastore.UntypedJsonDataStore
- func (c *CosmosDBFactory) FromEnv(env *cloudy.Environment) (interface{}, error)
- type CosmosDbQueryConverter
- func (qc *CosmosDbQueryConverter) Convert(c *datastore.SimpleQuery, table string) string
- func (qc *CosmosDbQueryConverter) ConvertASort(c *datastore.SortBy) string
- func (qc *CosmosDbQueryConverter) ConvertCondition(c *datastore.SimpleQueryCondition) string
- func (qc *CosmosDbQueryConverter) ConvertConditionGroup(cg *datastore.SimpleQueryConditionGroup) string
- func (qc *CosmosDbQueryConverter) ConvertSelect(c *datastore.SimpleQuery, table string) string
- func (qc *CosmosDbQueryConverter) ConvertSort(sortbys []*datastore.SortBy) string
- func (qc *CosmosDbQueryConverter) ToColumnName(name string) string
- type CosmosFactoryConfig
- type CosmosObject
- type Cosmosdb
- func (c *Cosmosdb) Add(ctx context.Context, id string, data []byte) error
- func (c *Cosmosdb) AddPK(data []byte) ([]byte, error)
- func (c *Cosmosdb) CreateOpen(ctx context.Context, ...) error
- func (c *Cosmosdb) Exists(ctx context.Context, id string) (bool, error)
- func (c *Cosmosdb) GetAll(ctx context.Context) ([][]byte, error)
- func (c *Cosmosdb) GetRaw(ctx context.Context, id string) ([]byte, error)
- func (c *Cosmosdb) Healthy(ctx context.Context) error
- func (c *Cosmosdb) IsStatusCodeNotFound(err error) bool
- func (c *Cosmosdb) QueryAll(ctx context.Context, query string) ([][]byte, error)
- func (c *Cosmosdb) Remove(ctx context.Context, id string) error
- func (c *Cosmosdb) Replace(ctx context.Context, id string, data []byte) error
- func (c *Cosmosdb) Upsert(ctx context.Context, id string, data []byte) error
Constants ¶
View Source
const AzureCosmosDB = "azure-cosmosdb"
FACTORY --------------------------------
Variables ¶
View Source
var AzureBlob = "azure-blob"
View Source
var AzureFiles = "azure-files"
Functions ¶
func GenerateUserDelegationSAS ¶ added in v0.0.48
func GenerateUserDelegationSAS(ctx context.Context, creds *cloudyazure.AzureCredentials, storageAccountName, containerName string, validFor time.Duration, permissions sas.ContainerPermissions) (string, error)
func GetStorageAccountType ¶
Types ¶
type AzureBlobFileShareFactory ¶
type AzureBlobFileShareFactory struct{}
func (*AzureBlobFileShareFactory) Create ¶
func (f *AzureBlobFileShareFactory) Create(cfg interface{}) (storage.FileStorageManager, error)
func (*AzureBlobFileShareFactory) FromEnv ¶
func (f *AzureBlobFileShareFactory) FromEnv(env *cloudy.Environment) (interface{}, error)
type AzureBlobStorageFactory ¶
type AzureBlobStorageFactory struct{}
func (*AzureBlobStorageFactory) Create ¶
func (f *AzureBlobStorageFactory) Create(cfg interface{}) (storage.ObjectStorageManager, error)
func (*AzureBlobStorageFactory) FromEnv ¶
func (f *AzureBlobStorageFactory) FromEnv(env *cloudy.Environment) (interface{}, error)
type AzureCosmosDbDatastore ¶
type AzureCosmosDbDatastore struct { DB *Cosmosdb // contains filtered or unexported fields }
func NewAzureCosmosDb ¶
func (*AzureCosmosDbDatastore) Close ¶
func (az *AzureCosmosDbDatastore) Close(ctx context.Context) error
func (*AzureCosmosDbDatastore) Delete ¶
func (az *AzureCosmosDbDatastore) Delete(ctx context.Context, key string) error
func (*AzureCosmosDbDatastore) DeleteAll ¶
func (az *AzureCosmosDbDatastore) DeleteAll(ctx context.Context, key []string) error
func (*AzureCosmosDbDatastore) GetAll ¶
func (az *AzureCosmosDbDatastore) GetAll(ctx context.Context) ([][]byte, error)
func (*AzureCosmosDbDatastore) OnCreate ¶
func (az *AzureCosmosDbDatastore) OnCreate(fn func(ctx context.Context, ds datastore.UntypedJsonDataStore) error)
func (*AzureCosmosDbDatastore) Open ¶
func (az *AzureCosmosDbDatastore) Open(ctx context.Context, config interface{}) error
func (*AzureCosmosDbDatastore) Ping ¶
func (az *AzureCosmosDbDatastore) Ping(ctx context.Context) bool
func (*AzureCosmosDbDatastore) Query ¶
func (az *AzureCosmosDbDatastore) Query(ctx context.Context, query *datastore.SimpleQuery) ([][]byte, error)
func (*AzureCosmosDbDatastore) QueryAndUpdate ¶
func (*AzureCosmosDbDatastore) QueryAsMap ¶
func (az *AzureCosmosDbDatastore) QueryAsMap(ctx context.Context, ds *datastore.SimpleQuery) ([]map[string]any, error)
func (*AzureCosmosDbDatastore) QueryTable ¶
func (az *AzureCosmosDbDatastore) QueryTable(ctx context.Context, ds *datastore.SimpleQuery) ([][]interface{}, error)
type AzureFileShareFactory ¶
type AzureFileShareFactory struct{}
func (*AzureFileShareFactory) Create ¶
func (f *AzureFileShareFactory) Create(cfg interface{}) (storage.FileStorageManager, error)
func (*AzureFileShareFactory) FromEnv ¶
func (f *AzureFileShareFactory) FromEnv(env *cloudy.Environment) (interface{}, error)
type AzureStorageAccount ¶
type AzureStorageAccount struct { cloudyazure.AzureCredentials ServiceURL string UrlSlug string AccountName string AccountKey string }
type BlobContainerShare ¶
THe BlobContainerShare provides file shares based on the Azure Blob Storage
func NewBlobContainerShare ¶
func NewBlobContainerShare2 ¶
func NewBlobContainerShare2(ctx context.Context, acct *AzureStorageAccount) (*BlobContainerShare, error)
func (*BlobContainerShare) Delete ¶
func (bfs *BlobContainerShare) Delete(ctx context.Context, key string) error
type BlobFileShare ¶
type BlobFileShare struct { // Credentials AzureCredentials }
THe BlobFileShare provides file shares based on the Azure Blob Storage
func NewAzureFileShare ¶
func NewAzureFileShare(ctx context.Context, acct *AzureStorageAccount) (*BlobFileShare, error)
func (*BlobFileShare) Delete ¶
func (bfs *BlobFileShare) Delete(ctx context.Context, key string) error
type BlobStorage ¶
type BlobStorage struct { Account string AccountKey string Container string UrlSlug string Client *container.Client }
Object Storage
func NewBlobContainer ¶
func NewBlobContainerFrom ¶
func NewBlobContainerFrom(ctx context.Context, client *container.Client) *BlobStorage
func (*BlobStorage) Download ¶
func (b *BlobStorage) Download(ctx context.Context, key string) (io.ReadCloser, error)
func (*BlobStorage) GenDownloadURL ¶
func (*BlobStorage) GenUploadURL ¶
func (*BlobStorage) List ¶
func (b *BlobStorage) List(ctx context.Context, prefix string) ([]*storage.StoredObject, []*storage.StoredPrefix, error)
func (*BlobStorage) ListNative ¶
func (b *BlobStorage) ListNative(ctx context.Context, prefix string) ([]*container.BlobItem, []*container.BlobPrefix, error)
func (*BlobStorage) TagsToMap ¶
func (b *BlobStorage) TagsToMap(tags *container.BlobTags) map[string]string
func (*BlobStorage) ToStoredObject ¶
func (b *BlobStorage) ToStoredObject(item *container.BlobItem) *storage.StoredObject
func (*BlobStorage) UpdateMetadata ¶
type BlobStorageAccount ¶
type BlobStorageAccount struct { Account string // AccountKey string // UrlSlug string Client *azblob.Client }
ObjectStorageManager {
func NewBlobStorageAccount ¶
func NewBlobStorageAccount2 ¶
func NewBlobStorageAccount2(ctx context.Context, acct *AzureStorageAccount) (*BlobStorageAccount, error)
func (*BlobStorageAccount) Create ¶
func (sa *BlobStorageAccount) Create(ctx context.Context, key string, openToPublic bool, tags map[string]string) (storage.ObjectStorage, error)
func (*BlobStorageAccount) Delete ¶
func (sa *BlobStorageAccount) Delete(ctx context.Context, key string) error
func (*BlobStorageAccount) Get ¶
func (sa *BlobStorageAccount) Get(ctx context.Context, key string) (storage.ObjectStorage, error)
func (*BlobStorageAccount) GetBlobContainer ¶
func (sa *BlobStorageAccount) GetBlobContainer(ctx context.Context, name string) (*storage.StorageArea, error)
func (*BlobStorageAccount) GetItem ¶
func (sa *BlobStorageAccount) GetItem(ctx context.Context, key string) (*storage.StorageArea, error)
func (*BlobStorageAccount) List ¶
func (sa *BlobStorageAccount) List(ctx context.Context) ([]*storage.StorageArea, error)
type CosmosDBFactory ¶
type CosmosDBFactory struct {
// contains filtered or unexported fields
}
func (*CosmosDBFactory) Create ¶
func (c *CosmosDBFactory) Create(cfg interface{}) (datastore.UntypedJsonDataStoreFactory, error)
func (*CosmosDBFactory) CreateJsonDatastore ¶
func (c *CosmosDBFactory) CreateJsonDatastore(ctx context.Context, typename string, prefix string, idField string) datastore.UntypedJsonDataStore
func (*CosmosDBFactory) FromEnv ¶
func (c *CosmosDBFactory) FromEnv(env *cloudy.Environment) (interface{}, error)
type CosmosDbQueryConverter ¶
type CosmosDbQueryConverter struct {
// contains filtered or unexported fields
}
func (*CosmosDbQueryConverter) Convert ¶
func (qc *CosmosDbQueryConverter) Convert(c *datastore.SimpleQuery, table string) string
func (*CosmosDbQueryConverter) ConvertASort ¶
func (qc *CosmosDbQueryConverter) ConvertASort(c *datastore.SortBy) string
func (*CosmosDbQueryConverter) ConvertCondition ¶
func (qc *CosmosDbQueryConverter) ConvertCondition(c *datastore.SimpleQueryCondition) string
func (*CosmosDbQueryConverter) ConvertConditionGroup ¶
func (qc *CosmosDbQueryConverter) ConvertConditionGroup(cg *datastore.SimpleQueryConditionGroup) string
func (*CosmosDbQueryConverter) ConvertSelect ¶
func (qc *CosmosDbQueryConverter) ConvertSelect(c *datastore.SimpleQuery, table string) string
func (*CosmosDbQueryConverter) ConvertSort ¶
func (qc *CosmosDbQueryConverter) ConvertSort(sortbys []*datastore.SortBy) string
func (*CosmosDbQueryConverter) ToColumnName ¶
func (qc *CosmosDbQueryConverter) ToColumnName(name string) string
type CosmosFactoryConfig ¶
type CosmosFactoryConfig struct { URL string Key string Creds *cloudyazure.AzureCredentials Database string }
type CosmosObject ¶
type CosmosObject struct {
Item interface{}
}
type Cosmosdb ¶
func NewCosmosdb ¶
func (*Cosmosdb) CreateOpen ¶
func (*Cosmosdb) IsStatusCodeNotFound ¶
Click to show internal directories.
Click to hide internal directories.