site

package
Version: v0.0.0-...-e560ebb Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2021 License: BSD-3-Clause Imports: 11 Imported by: 0

Documentation

Overview

Package site contains site local constants for the shivas

Index

Constants

View Source
const Major = 7

Major is the Major version number

View Source
const Minor = 1

Minor is the Minor version number

View Source
const Patch = 0

Patch is the PAtch version number

Variables

View Source
var CipdInstalledPath = "infra/shivas/"

CipdInstalledPath is the installed path for shivas package.

DefaultAuthOptions is an auth.Options struct prefilled with chrome-infra defaults.

View Source
var DefaultPRPCOptions = prpcOptionWithUserAgent(fmt.Sprintf("shivas/%s", VersionNumber))

DefaultPRPCOptions is used for PRPC clients. If it is nil, the default value is used. See prpc.Options for details.

This is provided so it can be overridden for testing.

View Source
var Dev = Environment{

	AdminService:        "skylab-staging-bot-fleet.appspot.com",
	InventoryService:    "cros-lab-inventory-dev.appspot.com",
	UnifiedFleetService: "staging.ufs.api.cr.dev",
	SwarmingService:     "https://chromium-swarm-dev.appspot.com/",

	SwarmingServiceAccount: "skylab-admin-task@chromeos-service-accounts-dev.iam.gserviceaccount.com",
	LogdogService:          "luci-logdog-dev.appspot.com",
	QueenService:           "drone-queen-dev.appspot.com",
}

Dev is the environment for dev.

View Source
var Prod = Environment{

	AdminService:     "chromeos-skylab-bot-fleet.appspot.com",
	InventoryService: "cros-lab-inventory.appspot.com",

	UnifiedFleetService: "ufs.api.cr.dev",
	SwarmingService:     "https://chromeos-swarming.appspot.com/",

	SwarmingServiceAccount: "skylab-admin-task@chromeos-service-accounts.iam.gserviceaccount.com",
	LogdogService:          "luci-logdog.appspot.com",
	QueenService:           "drone-queen-prod.appspot.com",
}

Prod is the environment for prod.

View Source
var VersionNumber = fmt.Sprintf("%d.%d.%d", Major, Minor, Patch)

VersionNumber is the version number for the tool. It follows the Semantic Versioning Specification (http://semver.org) and the format is: "MAJOR.MINOR.0+BUILD_TIME". We can ignore the PATCH part (i.e. it's always 0) to make the maintenance work easier. We can also print out the build time (e.g. 20060102150405) as the METADATA when show version to users.

Functions

func SecretsDir

func SecretsDir() string

SecretsDir customizes the location for auth-related secrets.

Types

type CommonFlags

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

CommonFlags controls some commonly-used CLI flags.

func (*CommonFlags) Register

func (f *CommonFlags) Register(fl *flag.FlagSet)

Register sets up the common flags.

func (*CommonFlags) Verbose

func (f *CommonFlags) Verbose() bool

Verbose returns if the command is set to verbose mode.

type EnvFlags

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

EnvFlags controls selection of the environment: either prod (default) or dev.

func (EnvFlags) Env

func (f EnvFlags) Env() Environment

Env returns the environment, either dev or prod.

func (EnvFlags) Namespace

func (f EnvFlags) Namespace() (string, error)

Namespace returns the namespace

func (*EnvFlags) Register

func (f *EnvFlags) Register(fl *flag.FlagSet)

Register sets up the -dev argument.

type Environment

type Environment struct {
	AdminService           string
	InventoryService       string
	UnifiedFleetService    string
	SwarmingService        string
	SwarmingServiceAccount string
	LogdogService          string
	QueenService           string
}

Environment contains environment specific values.

type OutputFlags

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

OutputFlags controls output-related CLI flags.

func (*OutputFlags) Full

func (f *OutputFlags) Full() bool

Full returns if the full format of output is logged in tsv format (without title)

func (*OutputFlags) JSON

func (f *OutputFlags) JSON() bool

JSON returns if the output is logged in json format

func (*OutputFlags) NoEmit

func (f *OutputFlags) NoEmit() bool

NoEmit returns if output json should NOT print/emit unpopulated fields

func (*OutputFlags) Register

func (f *OutputFlags) Register(fl *flag.FlagSet)

Register sets up the output flags.

func (*OutputFlags) Tsv

func (f *OutputFlags) Tsv() bool

Tsv returns if the output is logged in tsv format (without title)

Source Files

Jump to

Keyboard shortcuts

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