flags

package
v2.0.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2019 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	EnvPrefix = "dbgap"

	LocationName  = "location"
	AccessionName = "accession"
	NgcName       = "ngc"
	TokenName     = "token"
	FiletypeName  = "filetype"
	EndpointName  = "endpoint"
	BatchName     = "batch"
	SilentName    = "silent"
	VerboseName   = "verbose"

	Silent  bool
	Verbose bool

	Location  string
	Accession string
	NgcPath   string
	Tokenpath string
	Filetype  string

	Endpoint            string
	Batch, BatchDefault int = 0, 50
	AwsProfile          string
	GcpProfile          string

	LocationMsg   = "" /* 277-byte string literal not displayed */
	AccessionMsg  = "" /* 304-byte string literal not displayed */
	NgcMsg        = "" /* 338-byte string literal not displayed */
	TokenMsg      = "" /* 309-byte string literal not displayed */
	FiletypeMsg   = "A list of the only file types to copy.\nEXAMPLES: \"cram,crai,bam,bai\"\nEnvironment Variable: [$DBGAP_FILETYPE]"
	EndpointMsg   = "ADVANCED: Change the endpoint used to communicate with SDL API.\nEnvironment Variable: [$DBGAP_ENDPOINT]"
	BatchMsg      = "ADVANCED: Adjust the amount of accessions put in one request to the SDL API.\nEnvironment Variable: [$DBGAP_BATCH]"
	GcpBatchMsg   = "" /* 144-byte string literal not displayed */
	AwsProfileMsg = "" /* 279-byte string literal not displayed */
	GcpProfileMsg = "" /* 404-byte string literal not displayed */
	SilentMsg     = "Prints nothing, most useful when running in scripts."
	VerboseMsg    = "Prints everything, most useful for troubleshooting."
)

Functions

func FileExists

func FileExists(path string) bool

func FoldEnvVarsIntoFlagValues

func FoldEnvVarsIntoFlagValues()

func FoldNgcIntoToken

func FoldNgcIntoToken(token, ngc string) string

func HavePermissions

func HavePermissions(path string) bool

func IsAWS added in v0.0.8

func IsAWS(location string) bool

func IsGCP added in v0.0.8

func IsGCP(location string) bool

func NoFileErrors added in v0.0.8

func NoFileErrors(path string) bool

func ResolveAccession

func ResolveAccession(acc string) ([]string, error)

ResolveAccession If a list of comma separated accessions was provided, use it. Otherwise, if a path to a cart file was given, deduce whether it's on s3 or local. Either way, attempt to read the file and make a map of unique accessions.

func ResolveBatch added in v0.0.8

func ResolveBatch(location string, aws, gcp int) int

func ResolveBool

func ResolveBool(name string, value *bool)

func ResolveFileType

func ResolveFileType(filetype string) (map[string]bool, error)

func ResolveInt

func ResolveInt(name string, value *int)

func ResolveNgcFile

func ResolveNgcFile(tokenpath string) (data []byte, err error)

Deduce whether path is on s3 or local. Either way, read all of the file into a byte slice.

func ResolveString

func ResolveString(name string, value *string)

func SetProfile

func SetProfile(cloud string) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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