easemesh-api contains the versioned Protocol Buffers schemas and generated artifacts for EaseMesh API resources.
This repository is the schema package, not the full EaseMesh runtime. It keeps the .proto source, generated Go types, and rendered reference documentation in one place so other projects can import the API definitions directly.
- Versioned API definitions for EaseMesh resources such as
Tenant,Service,Ingress,Resilience,TrafficTarget, andCustomResourceKind - Generated Go bindings for each API version
- Generated Markdown, HTML, and JSON documentation for each API version
.
├── v1alpha1/
│ ├── meshmodel.proto
│ ├── meshmodel.pb.go
│ ├── meshmodel.md
│ ├── meshmodel.html
│ └── meshmodel.json
├── v2alpha1/
│ ├── meshmodel.proto
│ ├── meshmodel.pb.go
│ ├── meshmodel.md
│ ├── meshmodel.html
│ └── meshmodel.json
├── Makefile
├── go.mod
└── LICENSE
v1alpha1: early alpha API definitionsv2alpha1: newer alpha API definitions and the default generation target in theMakefile
Each version directory is self-contained and includes:
meshmodel.proto: source schemameshmodel.pb.go: generated Go codemeshmodel.md: generated reference documentationmeshmodel.html: generated HTML documentationmeshmodel.json: generated machine-readable documentation
The module path in go.mod is:
github.com/easegress-io/easemesh-apiInstall the module:
go get github.com/easegress-io/easemesh-apiImport the API version you need:
package main
import v2alpha1 "github.com/easegress-io/easemesh-api/v2alpha1"
func main() {
_ = &v2alpha1.Service{
Name: "orders",
RegisterTenant: "default",
}
}The repository uses protoc, protoc-gen-go, and protoc-gen-doc to regenerate committed artifacts.
- Go 1.17 or later
protocprotoc-gen-goprotoc-gen-doc
The helper target below checks for required tools and attempts to install missing ones:
make pre-checkGenerate all outputs for the default version (v2alpha1):
make allGenerate all outputs for a specific version:
make RELEASE=v1alpha1 all
make RELEASE=v2alpha1 allGenerate specific artifact types:
make RELEASE=v2alpha1 go
make RELEASE=v2alpha1 md
make RELEASE=v2alpha1 html
make RELEASE=v2alpha1 jsonRemove generated files for a version:
make RELEASE=v2alpha1 clean- Edit the versioned
meshmodel.protofile. - Regenerate the artifacts with
make. - Review the generated
.pb.go,.md,.html, and.jsonoutputs. - Commit the source and generated files together.
- v1alpha1 Markdown reference
- v2alpha1 Markdown reference
- v1alpha1 HTML reference
- v2alpha1 HTML reference
Apache License 2.0. See LICENSE.