cloudflare
The cloudflare package contains utilities that can be used to connect to services secured by cloudflare through pkg/http package.
type ServiceToken
type ServiceToken struct {
ClientId string // Client id created when creating a new cloudflare service.
ClientSecret string // Client secret created when creating a new cloudflare service.
}
func NewServiceToken
NewServiceToken generates a pointer to a ServiceToken struct with it's properties initialized.
func (*ServiceToken) Set
Set adds the corresponding Cloudflare access client headers to the given request.
It returns an error only when nil is passed to the request parameter.