gcp

package
v0.0.0-...-6624793 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: BSD-3-Clause Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Zone    = flag.String("gcp-zone", "", "GCP zone")
	Project = flag.String("gcp-project-id", "", "GCP project ID")
	Network = flag.String("gcp-network", "", "GCP VPC network")
)

Functions

func RegionFromZone

func RegionFromZone(zone string) string

Types

type Datastore

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

func NewDatastore

func NewDatastore(name string) (*Datastore, error)

func (*Datastore) AtomicDelete

func (s *Datastore) AtomicDelete(key string, previous *cloud.KVPair) (bool, error)

func (*Datastore) AtomicPut

func (s *Datastore) AtomicPut(key string, value []byte, previous *cloud.KVPair, options *cloud.WriteOptions) (bool, *cloud.KVPair, error)

func (*Datastore) Delete

func (s *Datastore) Delete(key string) error

func (*Datastore) Exists

func (s *Datastore) Exists(key string) (bool, error)

func (*Datastore) Get

func (s *Datastore) Get(key string) (*cloud.KVPair, error)

func (*Datastore) ListKeys

func (s *Datastore) ListKeys(start string) ([]string, error)

func (*Datastore) Put

func (s *Datastore) Put(key string, value []byte, options *cloud.WriteOptions) error

type Entity

type Entity struct {
	Value []byte `datastore:",noindex"`
}

type GcsStore

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

func NewGcsStore

func NewGcsStore(bucket string) *GcsStore

func (*GcsStore) Delete

func (s *GcsStore) Delete(key string) error

func (*GcsStore) Get

func (s *GcsStore) Get(key string) (cloud.GetReader, error)

func (*GcsStore) Put

func (s *GcsStore) Put(key string) (cloud.PutWriter, error)

func (*GcsStore) Size

func (s *GcsStore) Size(key string) (int64, error)

Jump to

Keyboard shortcuts

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