micro/store/cloudflare/options.go

24 lines
581 B
Go
Raw Normal View History

2019-10-24 00:31:36 +03:00
package cloudflare
import (
"github.com/micro/go-micro/config/options"
)
// Token sets the cloudflare api token
2019-10-24 01:12:45 +03:00
func Token(t string) options.Option {
2019-10-24 00:31:36 +03:00
// TODO: change to store.cf.api_token
return options.WithValue("CF_API_TOKEN", t)
}
2019-10-24 01:12:45 +03:00
// Account sets the cloudflare account id
func Account(id string) options.Option {
2019-10-24 00:31:36 +03:00
// TODO: change to store.cf.account_id
return options.WithValue("CF_ACCOUNT_ID", id)
}
// Namespace sets the KV namespace
func Namespace(ns string) options.Option {
// TODO: change to store.cf.namespace
return options.WithValue("KV_NAMESPACE_ID", ns)
}