example

command
v0.0.0-...-c1a0818 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 19, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

README

Example AEPC service

This directory contains an example of how to use aepc to generate an AEP-compliant protobuf API, including built-in HTTP bindings.

Running

To start the service, running the following from the root directory:

go run example/main.go

Terraform Provider

This example provides an example of generating a terraform provider using terraform-provider-openapi.

Building and installing the provider

To build the provider, run the following:

go build -o terraform-provider-bookstore github.com/aep-dev/aepc/example/terraform/
Installing

See [scripts/terraform-provider-regenerate-and-install.sh] for an example.

Using

See example/terraform/example_usage/main.tf for an example.

You could do something like:

$ cd example/terraform/example_usage/
$ terraform init
# - uncomment resource "book" in main.tf
$ terraform apply -auto-approve
# - observe the resource has been created.
# - modify the resource isbn
$ terraform apply -auto-approve
# - observe the resource has been updated.
# - comment the resource out
$ terraform apply -auto-approve
# - observe the resource has been deleted.
API Example

See test_http_api.sh.

Documentation

Overview

main serves as a convenience function to start both the service and grpc gateway simultaneously.

Directories

Path Synopsis
bookstore
v1
Package bookstore is a reverse proxy.
Package bookstore is a reverse proxy.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL