Tries to create a GoogleTransport from an URI using the following format:
google:http://accessKey:[email protected]/?style=[virtualHost|path]
Tries to create a GoogleTransport from an URI using the following format:
google:http://accessKey:[email protected]/?style=[virtualHost|path]
import play.api.libs.ws.ahc.StandaloneAhcWSClient import com.zengularity.benji.google.GoogleTransport def init1(implicit wc: StandaloneAhcWSClient) = GoogleTransport("google:http://accessKey:[email protected]/?style=virtualHost") // -- or -- def init2(implicit wc: StandaloneAhcWSClient) = GoogleTransport(new java.net.URI("google:https://accessKey:[email protected]/?style=path"))
the config type to be consumed by the provider typeclass
the config element used by the provider to generate the URI
a typeclass that try to generate an URI from the config element
Success if the GoogleTransport was properly created, otherwise Failure
Creates a transport instance.
Creates a transport instance.
the Google Cloud Storage credential
the ID of the Google project authorized for Cloud Storage
the name of the current application
the HTTP transport to access Google Cloud
the JSON factory to serialize/deserialize messages
the base URL for the Google REST API (if there is a final /
, it will be removed)
the Google service path (if there is a final /
, it will be removed; e.g. storage/v1)
the WS client
import java.io.FileInputStream import play.api.libs.ws.ahc.StandaloneAhcWSClient import com.google.auth.oauth2.GoogleCredentials import com.zengularity.benji.google.GoogleTransport def jsonResource = new FileInputStream("/path/to/keys.json") val credential = GoogleCredentials.fromStream(jsonResource) def init(implicit wc: StandaloneAhcWSClient) = GoogleTransport( credential = credential, projectId = "foo", application = "appId")
Google transport factory.