Skip to content

Update Docs and gRPC Example based on recent Gofr & Gofr-CLI release #1639

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Apr 14, 2025
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion docs/advanced-guide/overriding-default/page.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ Response example:
```

## Rendering Templates
GoFr allows rendering HTML/HTMX templates in handlers using the response.Template type.
GoFr makes it easy to render HTML and HTMX templates directly from your handlers using the response.Template type.
By convention, all template files—whether HTML or HTMX—should be placed inside a templates directory located at the root of your project.

### Example
```go
Expand Down
9 changes: 9 additions & 0 deletions docs/datasources/dgraph/page.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,15 @@ database. Any driver that implements the following interface can be added using
```go
// Dgraph defines the methods for interacting with a Dgraph database.
type Dgraph interface {
// ApplySchema applies or updates the complete database schema.
ApplySchema(ctx context.Context, schema string) error

// AddOrUpdateField atomically creates or updates a single field definition.
AddOrUpdateField(ctx context.Context, fieldName, fieldType, directives string) error

// DropField permanently removes a field/predicate and all its associated data.
DropField(ctx context.Context, fieldName string) error

// Query executes a read-only query in the Dgraph database and returns the result.
Query(ctx context.Context, query string) (any, error)

Expand Down
5 changes: 5 additions & 0 deletions examples/grpc/grpc-client/client/health_client.go

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

5 changes: 5 additions & 0 deletions examples/grpc/grpc-client/client/hello_client.go

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

5 changes: 5 additions & 0 deletions examples/grpc/grpc-server/server/health_gofr.go

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

59 changes: 6 additions & 53 deletions examples/grpc/grpc-server/server/hello_gofr.go

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

5 changes: 5 additions & 0 deletions examples/grpc/grpc-server/server/hello_server.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
package server

// versions:
// gofr-cli v0.6.0
// gofr.dev v1.37.0
// source: hello.proto

import (
"fmt"
"gofr.dev/pkg/gofr"
Expand Down
63 changes: 63 additions & 0 deletions examples/grpc/grpc-server/server/request_gofr.go

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

Loading