Enum Class BindingType

java.lang.Object
java.lang.Enum<BindingType>
dev.gmitch215.bytebox.gradle.BindingType
All Implemented Interfaces:
Serializable, Comparable<BindingType>, Constable

public enum BindingType extends Enum<BindingType>
A binding type, for the short form of the bindings block.
 bindings(KV, D1, D1, KV) // KV, DB, DB_2, KV_2

Every constant carries the name the first binding of its type takes and the Wrangler configuration key it is written under. A second binding of the same type gets _2, a third _3, so a project can start with the short form and add an identifier later without renaming anything.

Since:
1.0.0
  • Enum Constant Details

    • KV

      public static final BindingType KV
      A Workers KV namespace.
    • D1

      public static final BindingType D1
      A D1 database.
    • R2

      public static final BindingType R2
      An R2 bucket.
    • AI

      public static final BindingType AI
      The Workers AI binding.
    • VECTORIZE

      public static final BindingType VECTORIZE
      A Vectorize index.
    • HYPERDRIVE

      public static final BindingType HYPERDRIVE
      A Hyperdrive configuration.
    • IMAGES

      public static final BindingType IMAGES
      The Images binding.
    • BROWSER

      public static final BindingType BROWSER
      The Browser Rendering binding.
    • QUEUE

      public static final BindingType QUEUE
      A Queue producer.
    • DURABLE_OBJECT

      public static final BindingType DURABLE_OBJECT
      A Durable Object namespace.
    • EMAIL

      public static final BindingType EMAIL
      An email sending binding.
    • ASSETS

      public static final BindingType ASSETS
      A static assets binding.
    • SERVICE

      public static final BindingType SERVICE
      Another Worker, reached with no network hop.
    • WORKFLOW

      public static final BindingType WORKFLOW
      A Workflow.
    • ANALYTICS

      public static final BindingType ANALYTICS
      An Analytics Engine dataset.
    • MTLS

      public static final BindingType MTLS
      An mTLS certificate.
    • DISPATCH

      public static final BindingType DISPATCH
      A Workers for Platforms dispatch namespace.
    • PIPELINE

      public static final BindingType PIPELINE
      A Pipeline.
    • CONTAINER

      public static final BindingType CONTAINER
      A container.
    • SECRETS

      public static final BindingType SECRETS
      A Secrets Store secret.
    • VERSION_METADATA

      public static final BindingType VERSION_METADATA
      The running version's metadata.
    • RATELIMIT

      public static final BindingType RATELIMIT
      A rate limiter.
  • Method Details

    • values

      public static BindingType[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static BindingType valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • defaultName

      public String defaultName()
      Returns the name the first binding of this type takes.
      Returns:
      the name the first binding of this type takes
    • configKey

      public String configKey()
      Returns the Wrangler configuration key this type is written under.
      Returns:
      the Wrangler configuration key this type is written under
    • repeatable

      public boolean repeatable()
      Whether a Worker can declare more than one of these.

      The single ones are the account-level services: there is one Workers AI, one Images, one browser. Declaring a second is a configuration mistake rather than something to number.

      Returns:
      whether repeats are allowed