gitee.com/liuxuezhan/go-micro-v1.18.0@v1.0.0/store/cloudflare/options.go (about)

     1  package cloudflare
     2  
     3  import (
     4  	"gitee.com/liuxuezhan/go-micro-v1.18.0/config/options"
     5  )
     6  
     7  // Token sets the cloudflare api token
     8  func Token(t string) options.Option {
     9  	// TODO: change to store.cf.api_token
    10  	return options.WithValue("CF_API_TOKEN", t)
    11  }
    12  
    13  // Account sets the cloudflare account id
    14  func Account(id string) options.Option {
    15  	// TODO: change to store.cf.account_id
    16  	return options.WithValue("CF_ACCOUNT_ID", id)
    17  }
    18  
    19  // Namespace sets the KV namespace
    20  func Namespace(ns string) options.Option {
    21  	// TODO: change to store.cf.namespace
    22  	return options.WithValue("KV_NAMESPACE_ID", ns)
    23  }