blob

package
v0.0.0-...-cf46bd9 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2021 License: MIT Imports: 9 Imported by: 0

README

blob

install

go get github.com/Azure/azure-storage-blob-go/azblob

example

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BlobFromEnv

func BlobFromEnv() (*azblob.ServiceURL, error)

BlobFromEnv returns an *azblob.ServiceURL authenticated via the environment variables AZGO_STORAGE_ACCOUNT_NAME and AZGO_STORAGE_ACCOUNT_KEY

func CreateContainer

func CreateContainer(container string) error

CreateContainer creates a new container in the Blob Storage account The container is created without any public access.

func Delete

func Delete(container, key string) error

Delete deletes a Block Blob specified by "key" in the given container. The container defaults to "main" if empty.

func DeleteContainer

func DeleteContainer(container string) error

DeleteContainer deletes a container. The container defaults to "main" if empty.

func Get

func Get(container, key string) (string, error)

Get gets the Block Blob specified by "key" and returns it as a string. This function is designed to be paired with InsertKeyValue. The container defaults to "main" if empty.

func InsertKeyValue

func InsertKeyValue(container, key, value string) error

InsertKeyValue creates a new Block Blob of type text/plain which is named "key" and has the string value "value". The container defaults to "main" if empty.

func List

func List(container string) error

List lists the items in a container. The container defaults to "main" if empty.

func ListContainers

func ListContainers() error

ListContainers lists all of the containers in the Blob Storage account. It marsals the ContainerItems to JSON and writes them to the standard output.

func Test

func Test() error

Types

This section is empty.

Jump to

Keyboard shortcuts

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