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.



This section is empty.


This section is empty.


This section is empty.


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.

Source Files