casimpl

package
v0.0.0-...-b37aa2d Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2024 License: Apache-2.0 Imports: 33 Imported by: 0

Documentation

Overview

Package casimpl is used to implement the parent package main.

Index

Constants

View Source
const Version = "cas 0.2.0"

Version is reported by "version" subcommand and put into logs.

Variables

This section is empty.

Functions

func CmdArchive

func CmdArchive(authFlags AuthFlags) *subcommands.Command

CmdArchive returns an object for the `archive` subcommand.

func CmdDownload

func CmdDownload(authFlags AuthFlags) *subcommands.Command

CmdDownload returns an object for the `download` subcommand.

Types

type AuthFlags

type AuthFlags interface {
	// Register registers auth flags to the given flag set. e.g. -service-account-json.
	Register(f *flag.FlagSet)

	// Parse parses auth flags.
	Parse() error

	// NewRBEClient creates an authorised RBE Client.
	NewRBEClient(ctx context.Context, addr string, instance string, readOnly bool) (*client.Client, error)
}

AuthFlags is an interface to register auth flags and create RBE Client.

type StatusCode

type StatusCode int
const (
	// Bad command line arguments were provided
	ArgumentsInvalid StatusCode = iota
	// Error authenticating with RBE-CAS server
	AuthenticationError
	// Error instantiating a new RBE client
	ClientError
	// The provided digest is bad and the file/dir cannot be found
	DigestInvalid
	// Disk I/O issues
	IOError
	// Issue with RPC to RBE-CAS server
	RPCError
	// Any uncategorised error
	Unknown
)

possible exit errors

Jump to

Keyboard shortcuts

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