objstoragepath

package
v0.0.0-...-d22e7c3 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2020 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Public  DownloadConfig
	Private DownloadConfig
}

Config of image path library

type DownloadConfig

type DownloadConfig struct {
	DownloadProto string
	DownloadHost  string
	DownloadPort  string
	DownloadPath  string
}

DownloadConfig struct

type FilePath

type FilePath struct {
	Proto        string
	Host         string
	FilePath     string
	DownloadPath string
	DownloadLink string
	Signed       bool
}

FilePath struct

type ObjectStoragePath

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

ObjectStoragePath generator

func New

func New(c *Config, local bool) (*ObjectStoragePath, error)

New object storage path

func (*ObjectStoragePath) Generate

func (o *ObjectStoragePath) Generate(mode imageentity.Mode, filePath string) (*FilePath, error)

Generate return file path struct with all download information needed

func (*ObjectStoragePath) GetDownloadPath

func (o *ObjectStoragePath) GetDownloadPath(mode imageentity.Mode) (string, error)

GetDownloadPath return needed download path

Jump to

Keyboard shortcuts

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