settings

package
v0.0.0-...-35d8de9 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2019 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package settings contains definition of global CIPD backend settings.

These are settings that are usually set only once after the initial service deployment. They are exposed through Admin portal interface.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Settings

type Settings struct {
	// StorageGSPath is GS path in a form of /bucket/path to the root of the
	// content-addressable storage area in Google Storage.
	//
	// The files will be stored as /storage_gs_path/hash_algo/hex_digest.
	StorageGSPath string `json:"storage_gs_path"`

	// TempGSPath is GS path in a form of /bucket/path to the root of the storage
	// area for pending uploads.
	//
	// It contains unverified files uploaded by clients before they pass the
	// hash verification check and copied to the CAS storage area.
	TempGSPath string `json:"temp_gs_path"`

	// SignAs is a name of a service account whose private key to use for
	// generating signed Google Storage URLs (through signBlob IAM API) instead of
	// the default service account.
	//
	// This is mostly useful on dev_server running under developer's account. It
	// doesn't have private keys for signing, but can still call signBlob API.
	SignAs string `json:"sign_as"`
}

Settings contain CIPD backend settings.

func Get

func Get(ctx context.Context) (*Settings, error)

Get returns the settings from the local cache, checking they are populated.

Returns grpc-annotated Internal error if something is wrong.

func (*Settings) ObjectPath

func (s *Settings) ObjectPath(obj *api.ObjectRef) string

ObjectPath constructs a path to the object in the Google Storage, starting from StorageGSPath root.

Jump to

Keyboard shortcuts

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