Documentation ¶
Index ¶
- func DownloadObject(ctx context.Context, bucketName string, path string, fileName string) string
- func FecthZones(ctx context.Context) ([]string, error)
- func GetDisk(ctx context.Context, diskId string) (*compute.Disk, error)
- func GetImage(ctx context.Context, ImageId string) (*compute.Image, error)
- func GetInstance(ctx context.Context, instaceId string) (*computepb.Instance, error)
- func GetLocalTime(timestamp string) (string, error)
- func GetPreSignedUrl(ctx context.Context, bucketName string, path string, fileName string) string
- func GetResourceFromURL(url string) string
- func GetSnapshot(ctx context.Context, snapshotID string) (*compute.Snapshot, error)
- type DiskResp
- type ImageResp
- type ServiceAccount
- type SnapshotResp
- type StorageObjResp
- type StorageResp
- type VMResp
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DownloadObject ¶
func GetInstance ¶
func GetLocalTime ¶
func GetPreSignedUrl ¶
func GetResourceFromURL ¶
Types ¶
type ServiceAccount ¶
type ServiceAccount struct {
ProjectID string `json:"project_id"`
}
func FetchProjectID ¶
func FetchProjectID(filePath string) (ServiceAccount, error)
type SnapshotResp ¶
type SnapshotResp struct {
Name, Size, CreatedAt string
}
func ListSnapshots ¶
func ListSnapshots(ctx context.Context) ([]SnapshotResp, error)
type StorageObjResp ¶
type StorageObjResp struct { SizeInBytes int64 Name, ObjectType, LastModified, Size, StorageClass string }
func GetInfoAboutBucket ¶
func GetInfoAboutBucket(ctx context.Context) ([]StorageObjResp, error)
type StorageResp ¶
func ListBuckets ¶
func ListBuckets(ctx context.Context) ([]StorageResp, error)
Click to show internal directories.
Click to hide internal directories.