yos

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SchemeHTTPWithSSL    = "https"
	SchemeHTTPWithoutSSL = "http"
)

Variables

View Source
var (
	ErrStorageKeyNotMatch   = errors.New("Storage Key did not match!")
	ErrMethodNotImplemented = errors.New("Method is not implemented")
)
View Source
var Instance = &YandexObjStorage{}

Functions

This section is empty.

Types

type Config

type Config struct {
	StorageKey      string
	Region          string
	AccessKeyID     string
	SecretAccessKey string
	BucketName      string
	Prefix          string
	NoSSL           bool
}

type YandexObjStorage

type YandexObjStorage struct {
	// contains filtered or unexported fields
}

func New

func New(cfg *Config) *YandexObjStorage
func (y *YandexObjStorage) GetCLink(path string) (cLink string)

func (*YandexObjStorage) GetURL

func (y *YandexObjStorage) GetURL(cLink string, options ...interface{}) (URL string)

func (*YandexObjStorage) Remove

func (b *YandexObjStorage) Remove(cLink string) (err error)

func (*YandexObjStorage) Store

func (y *YandexObjStorage) Store(filePath, path string) (cLink string, err error)
func (y *YandexObjStorage) StoreByCLink(filePath, cLink string) (err error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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