signer

package
v0.0.1-0...-21adf68 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package signer facilitates the generation of signed GCS URLS.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Signer

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

Signer facilitates the generation of signed GCS URLS.

func NewFromEnv

func NewFromEnv() (*Signer, error)

NewFromEnv constructs a Signer from the GOOGLE_APPLICATION_CREDENTIALS set in the working environment.

func (Signer) Contents

func (s Signer) Contents(gcsBucketName, gcsBucketKey string) ([]byte, error)

Contents returns the raw contents of the named GCS object. It is expected that these are argo workflow artifacts either single files tar gzip'd or plain files.

func (Signer) Generate

func (s Signer) Generate(gcsBucketName, gcsBucketKey string) (string, error)

Generate generates a url that can be used to download the given GCS object for some amount of time.

This is accomplished by creating a GCS signed URL. For more information see: https://cloud.google.com/storage/docs/access-control/signed-urls

Jump to

Keyboard shortcuts

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