Object/Class

com.zengularity.benji.google

GoogleTransport

Related Docs: class GoogleTransport | package google

Permalink

object GoogleTransport

Google transport factory.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. GoogleTransport
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. def apply[T](config: T)(implicit provider: URIProvider[T], ws: StandaloneAhcWSClient): Try[GoogleTransport]

    Permalink

    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"))
    T

    the config type to be consumed by the provider typeclass

    config

    the config element used by the provider to generate the URI

    provider

    a typeclass that try to generate an URI from the config element

    returns

    Success if the GoogleTransport was properly created, otherwise Failure

  5. def apply(credential: GoogleCredentials, projectId: String, application: String, http: HttpTransport = ..., json: JsonFactory = new JacksonFactory(), baseRestUrl: String = Storage.DEFAULT_ROOT_URL, servicePath: String = Storage.DEFAULT_SERVICE_PATH)(implicit ws: StandaloneAhcWSClient): GoogleTransport

    Permalink

    Creates a transport instance.

    Creates a transport instance.

    credential

    the Google Cloud Storage credential

    projectId

    the ID of the Google project authorized for Cloud Storage

    application

    the name of the current application

    http

    the HTTP transport to access Google Cloud

    json

    the JSON factory to serialize/deserialize messages

    baseRestUrl

    the base URL for the Google REST API (if there is a final /, it will be removed)

    servicePath

    the Google service path (if there is a final /, it will be removed; e.g. storage/v1)

    ws

    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")
  6. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  7. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  9. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  10. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  11. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  12. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  13. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  14. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  15. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  16. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  17. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  18. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  19. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  20. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  21. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped