Skip to content

Commit

Permalink
cloudflare: missing comments (#4955)
Browse files Browse the repository at this point in the history
* fix: missing comments

* fix: r2 buckets ids
  • Loading branch information
slntopp authored Dec 4, 2024
1 parent 3927261 commit 2435566
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 4 deletions.
15 changes: 12 additions & 3 deletions providers/cloudflare/resources/cloudflare.lr
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ private cloudflare.zone @defaults("name account.name") {
one() cloudflare.one
}

// Cloudflare account
private cloudflare.zone.account @defaults("name") {
// Account identifier
id string
Expand All @@ -65,7 +66,9 @@ private cloudflare.zone.account @defaults("name") {
email string
}

// Cloudflare DNS
private cloudflare.dns {
// List all DNS records
records() []cloudflare.dns.record
}

Expand All @@ -74,7 +77,7 @@ private cloudflare.dns.record @defaults("type content name") {
// Cloudflare internal ID
id string

// Record name
// Record name
name string
// Comment
comment string
Expand Down Expand Up @@ -248,6 +251,7 @@ private cloudflare.workers.worker @defaults("id") {
modifiedOn time
}

// Cloudflare Pages page
private cloudflare.workers.page @defaults("shortId") {
// Worker ID
id string
Expand All @@ -268,9 +272,12 @@ private cloudflare.workers.page @defaults("shortId") {
modifiedOn time
}

// Cloudflare One
private cloudflare.one {
apps() []cloudflare.one.app // Cloudflare Zero Trust applications
identityProviders() []cloudflare.one.idp // Identity providers
// Cloudflare Zero Trust applications
apps() []cloudflare.one.app
// Identity providers
identityProviders() []cloudflare.one.idp
}

// Cloudflare One application
Expand Down Expand Up @@ -310,6 +317,7 @@ private cloudflare.one.app @defaults("name id") {
updatedAt time
}

// CORS headers
private cloudflare.corsHeaders {
allowAllHeaders bool
allowAllMethods bool
Expand All @@ -323,6 +331,7 @@ private cloudflare.corsHeaders {
maxAge int // The maximum number of seconds the results of a preflight request can be cached.
}

// Cloudflare One identity provider
private cloudflare.one.idp @defaults("name") {
id string // UUID
name string // The name of the identity provider, shown to users on the login page.
Expand Down
7 changes: 6 additions & 1 deletion providers/cloudflare/resources/cloudflare.lr.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions providers/cloudflare/resources/r2.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ func (c *mqlCloudflareZone) r2() (*mqlCloudflareR2, error) {
return r2, nil
}

func (c *mqlCloudflareR2Bucket) id() (string, error) {
return c.GetName().Data, nil
}

func (c *mqlCloudflareR2) buckets() ([]any, error) {
conn := c.MqlRuntime.Connection.(*connection.CloudflareConnection)

Expand Down

0 comments on commit 2435566

Please sign in to comment.