command

package
v5.1.4+incompatible Latest Latest
Warning

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

Go to latest
Published: May 30, 2019 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ISO8601_DATE_FORMAT = "2006-01-02T15:04:05Z"

	OBS_VERSION_UNKNOWN = "unknown"
)

Variables

This section is empty.

Functions

func AesDecrypt

func AesDecrypt(decodeStr string, key []byte) (retByte []byte, retErr error)

func AesEncrypt

func AesEncrypt(encodeStr string, key []byte) (string, error)

func GetDefaultConfig

func GetDefaultConfig(_aesKey, _aesIv string) map[string]string

func InitConfigFile

func InitConfigFile(kv map[string]string, bootstrap bool) error

func PKCS5Padding

func PKCS5Padding(ciphertext []byte, blockSize int) []byte

func PKCS5UnPadding

func PKCS5UnPadding(origData []byte) []byte

func Run

func Run(aesKey, aesIv string)

Types

type CopyObjectCheckpoint

type CopyObjectCheckpoint struct {
	XMLName           xml.Name   `xml:"CopyObjectCheckpoint"`
	SourceBucket      string     `xml:"SourceBucket"`
	SourceKey         string     `xml:"SourceKey"`
	SourceVersionId   string     `xml:"SourceVersionId"`
	DestinationBucket string     `xml:"DestinationBucket"`
	DestinationKey    string     `xml:"DestinationKey"`
	UploadId          string     `xml:"UploadId,omitempty"`
	ObjectInfo        ObjectInfo `xml:"ObjectInfo"`
	CopyParts         []CopyPart `xml:"CopyParts>CopyPart"`
}

type CopyPart

type CopyPart struct {
	PartEtag
	XMLName     xml.Name `xml:"CopyPart"`
	RangeStart  int64    `xml:"RangeStart"`
	RangeEnd    int64    `xml:"RangeEnd"`
	IsCompleted bool     `xml:"IsCompleted"`
}

type DownloadFileCheckpoint

type DownloadFileCheckpoint struct {
	XMLName       xml.Name       `xml:"DownloadFileCheckpoint"`
	Bucket        string         `xml:"Bucket"`
	Key           string         `xml:"Key"`
	VersionId     string         `xml:"VersionId"`
	FileUrl       string         `xml:"FileUrl"`
	ObjectInfo    ObjectInfo     `xml:"ObjectInfo"`
	TempFileInfo  TempFileInfo   `xml:"TempFileInfo"`
	DownloadParts []DownloadPart `xml:"DownloadParts>DownloadPart"`
}

type DownloadPart

type DownloadPart struct {
	XMLName     xml.Name `xml:"DownloadPart"`
	PartNumber  int      `xml:"PartNumber"`
	RangeStart  int64    `xml:"RangeStart"`
	RangeEnd    int64    `xml:"RangeEnd"`
	IsCompleted bool     `xml:"IsCompleted"`
}

type FileInfo

type FileInfo struct {
	XMLName      xml.Name `xml:"FileInfo"`
	LastModified int64    `xml:"LastModified"`
	Size         int64    `xml:"Size"`
}

type Level

type Level int
const (
	LEVEL_OFF   Level = 500
	LEVEL_ERROR Level = 400
	LEVEL_WARN  Level = 300
	LEVEL_INFO  Level = 200
	LEVEL_DEBUG Level = 100
	LEVEL_TRACE Level = 50
)

type MetaContext

type MetaContext struct {
	Size                    int64
	ETag                    string
	LastModified            time.Time
	RequestId               string
	ContentType             string
	StorageClass            obs.StorageClassType
	WebsiteRedirectLocation string
	Metadata                map[string]string
}

type MoveRequestInput

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

type NilLocker

type NilLocker struct {
}

func (*NilLocker) Lock

func (*NilLocker) Lock()

func (*NilLocker) RLock

func (*NilLocker) RLock()

func (*NilLocker) RUnlock

func (*NilLocker) RUnlock()

func (*NilLocker) Unlock

func (*NilLocker) Unlock()

type NilRecorder

type NilRecorder struct {
}

type NilWriter

type NilWriter struct {
}

func (NilWriter) Write

func (NilWriter) Write(p []byte) (n int, err error)

type ObjectInfo

type ObjectInfo struct {
	XMLName      xml.Name `xml:"ObjectInfo"`
	LastModified int64    `xml:"LastModified"`
	Size         int64    `xml:"Size"`
	ETag         string   `xml:"ETag"`
}

type ObsObjectCtx

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

type PartEtag

type PartEtag struct {
	PartNumber int    `xml:"PartNumber"`
	ETag       string `xml:"ETag"`
}

type RWLocker

type RWLocker interface {
	Lock()
	Unlock()
	RLock()
	RUnlock()
}

type ScanObsDirCtx

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

type TempFileInfo

type TempFileInfo struct {
	XMLName     xml.Name `xml:"TempFileInfo"`
	TempFileUrl string   `xml:"TempFileUrl"`
	Size        int64    `xml:"Size"`
}

type UploadFileCheckpoint

type UploadFileCheckpoint struct {
	XMLName     xml.Name     `xml:"UploadFileCheckpoint"`
	Bucket      string       `xml:"Bucket"`
	Key         string       `xml:"Key"`
	FileUrl     string       `xml:"FileUrl"`
	UploadId    string       `xml:"UploadId,omitempty"`
	FileInfo    FileInfo     `xml:"FileInfo"`
	UploadParts []UploadPart `xml:"UploadParts>UploadPart"`
}

type UploadPart

type UploadPart struct {
	PartEtag
	XMLName     xml.Name `xml:"UploadPart"`
	Offset      int64    `xml:"Offset"`
	PartSize    int64    `xml:"PartSize"`
	IsCompleted bool     `xml:"IsCompleted"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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