gcp

package
v1.9.87 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2022 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var FileLocation = "eu"

FileLocation #default eu

Functions

func GetCurrentProjectID

func GetCurrentProjectID() (string, error)

GetCurrentProjectID #

Types

type FileEntry

type FileEntry struct {
	FileName string `json:"filename"`
	Size     int    `json:"size"`
	FTime    int64  `json:"ftime"`
}

FileEntry #

func (*FileEntry) BaseName

func (f *FileEntry) BaseName() string

BaseName #

func (*FileEntry) DirName

func (f *FileEntry) DirName() string

DirName #

func (*FileEntry) IsDir

func (f *FileEntry) IsDir() bool

IsDir #

func (*FileEntry) Print

func (f *FileEntry) Print(fullname bool)

Print #

type GCPbucket

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

GCPbucket #

func NewBucket added in v1.9.12

func NewBucket(cli *GCPclient, bucketName string) (*GCPbucket, error)

NewBucket #instance

func (*GCPbucket) BucketCreate

func (b *GCPbucket) BucketCreate(bucketName string) error

BucketCreate #

func (*GCPbucket) BucketExists

func (b *GCPbucket) BucketExists(bucketName string) bool

BucketExists #

func (*GCPbucket) BucketRemove

func (b *GCPbucket) BucketRemove(bucketName string) error

BucketRemove #

func (*GCPbucket) FileRead

func (b *GCPbucket) FileRead(filePath string) (*[]byte, time.Time, string, error)

FileRead #

func (*GCPbucket) FileStat

func (b *GCPbucket) FileStat(filePath string) (*FileEntry, error)

FileStat #

func (*GCPbucket) FileStatDump

func (b *GCPbucket) FileStatDump(filePath string)

FileStatDump #

func (*GCPbucket) FileWrite

func (b *GCPbucket) FileWrite(filePath string, data *[]byte) error

FileWrite #

func (*GCPbucket) FileWriteWithTimeStamp

func (b *GCPbucket) FileWriteWithTimeStamp(filePath string, data *[]byte, ti time.Time) error

FileWriteWithTimeStamp #

func (*GCPbucket) ListDirFiles

func (b *GCPbucket) ListDirFiles(dirName string, startIx int) (*[]FileEntry, error)

ListDirFiles # listen NUR files in Dir

func (*GCPbucket) ListFiles

func (b *GCPbucket) ListFiles(dirName string, startIx int) (*[]FileEntry, error)

ListFiles # listet alle files, quasi recursiv

func (*GCPbucket) ListRoot

func (b *GCPbucket) ListRoot() *[]FileEntry

ListRoot #

func (*GCPbucket) SetUniformAccess added in v1.9.12

func (b *GCPbucket) SetUniformAccess(enabled bool) error

SetUniformAccess #einheitlichwer zugriff auf bucketebene

type GCPclient added in v1.9.12

type GCPclient struct {
	Client *storage.Client
	// contains filtered or unexported fields
}

GCPclient #

func NewClient added in v1.9.12

func NewClient(projectID string, credFile string) (*GCPclient, error)

NewClient #instance

func (*GCPclient) Close added in v1.9.13

func (c *GCPclient) Close()

Close #

Jump to

Keyboard shortcuts

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