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: 12 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")
)

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{}) string

func (*YandexObjStorage) Remove

func (y *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)

type YandexOption

type YandexOption int
const (
	PublicLink YandexOption = iota + 1
	LinkForPutObject
)

Jump to

Keyboard shortcuts

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