src/server/pkg/obj/obj.go
func NewGoogleClientFromEnv() (Client, error) {
	bucket, ok := os.LookupEnv(GoogleBucketEnvVar)
	if !ok {
		return nil, fmt.Errorf("%s not found", GoogleBucketEnvVar)
	}
	creds, ok := os.LookupEnv(GoogleCredEnvVar)
	if !ok {
		return nil, fmt.Errorf("%s not found", GoogleCredEnvVar)
	}
	opts := []option.ClientOption{option.WithCredentialsJSON([]byte(creds))}
	return NewGoogleClient(bucket, opts)
}
func NewGoogleClientFromEnv() (Client, error) {
	bucket, ok := os.LookupEnv(GoogleBucketEnvVar)
	if !ok {
		return nil, fmt.Errorf("%s not found", GoogleBucketEnvVar)
	}
	creds, ok := os.LookupEnv(GoogleCredEnvVar)
	if !ok {
		return nil, fmt.Errorf("%s not found", GoogleCredEnvVar)
	}
	opts := []option.ClientOption{option.WithCredentialsJSON([]byte(creds))}
	return NewGoogleClient(bucket, opts)
}
func NewGoogleClientFromEnv ( ) ( Client , error ) { bucket , ok := os . LookupEnv ( GoogleBucketEnvVar ) if ! ok { return nil , fmt . Errorf ( " " , GoogleBucketEnvVar ) } creds , ok := os . LookupEnv ( GoogleCredEnvVar ) if ! ok { return nil , fmt . Errorf ( " " , GoogleCredEnvVar ) } opts := [ ] option . ClientOption { option . WithCredentialsJSON ( [ ] byte ( creds ) ) } return NewGoogleClient ( bucket , opts ) }
// NewGoogleClientFromEnv creates a Google client based on environment variables.
NewGoogleClientFromEnv creates a Google client based on environment variables .