gcs

package
v0.13.2-a.1 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2026 License: MIT Imports: 18 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package gcs stores state snapshots in Google Cloud Storage.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClient

func NewClient(service *storage.Service, bucket string) client

NewClient returns a GCS client backed by the Google Storage REST API.

Types

type Store

type Store struct {
	Bucket     string
	Prefix     string
	KMSKeyName string
	// contains filtered or unexported fields
}

Store reads and writes snapshots under a per-stack key prefix.

func NewStore

func NewStore(
	client client,
	bucket, prefix, kmsKeyName, factory, stack string,
	enc sdkencrypt.Encrypter,
) (*Store, error)

NewStore returns a Store for factory and stack in bucket.

func (*Store) Current

func (s *Store) Current() (*sdkstate.Snapshot, error)

func (*Store) CurrentRev

func (s *Store) CurrentRev() (string, error)

func (*Store) Delete

func (s *Store) Delete(rev string) error

func (*Store) ForceUnlock

func (s *Store) ForceUnlock() error

func (*Store) Get

func (s *Store) Get(rev string) (*sdkstate.Snapshot, error)

func (*Store) List

func (s *Store) List() ([]string, error)

func (*Store) Lock

func (s *Store) Lock(ctx context.Context) (sdkstate.Lock, error)

func (*Store) SetCurrent

func (s *Store) SetCurrent(rev string) error

func (*Store) Stack

func (s *Store) Stack() string

func (*Store) Write

func (s *Store) Write(snap *sdkstate.Snapshot) (string, error)

Jump to

Keyboard shortcuts

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