core

module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2026 License: MIT

README

Core

A collection of reusable build rules, Go libraries, protocol buffer definitions, and tools for monorepo development with Please Build.

Structure

Build Rules (build_defs/)

Reusable Please build definitions:

  • docker.build_defs — Docker image building and management
  • grafana.build_defs — Grafana dashboard generation
  • k8s.build_defs — Kubernetes configuration templating and deployment
  • remote.build_defs — Remote file fetching (GitHub, etc.)
  • template.build_defs — Text templating and validation
  • utils.build_defs — General-purpose build utilities
  • proto/ — Protobuf compilation rules for Go, JS, Python, and Ruby
Code Generation (build_defs/codegen/)
  • go_service/ — Full Go service scaffolding (main, runtime, K8s manifests)
  • postgres/ — Database migration and access layer generation
  • protoc_gen_core/ — Custom protobuf code generation plugin rules
Protocol Definitions (malonaz/)

Core protobuf schemas providing standardized functionality:

  • ai/ — AI service definitions (chat, TTS, STT, models, GenUI components)
  • aip/ — AIP (API Improvement Proposals) extensions and labels
  • audio/ — Audio format definitions (PCM, μ-law)
  • authentication/ — Session management, RBAC, rate limiting
  • canonicalize/ — Data canonicalization annotations
  • codegen/ — Code generation annotations (model, AIP, gateway, NATS)
  • grpc/ — gRPC extensions (HTTP gateway, cookies, metadata)
  • json/ — JSON schema definitions
  • nats/ — NATS streaming definitions
Go Libraries (go/)

Production-ready Go packages:

Package Description
ai AI/LLM client abstractions
aip AIP-compliant list/update helpers
audio PCM ↔ μ-law audio conversion
authentication JWT/Firebase auth with RBAC
binary Subprocess lifecycle management
canonicalize Data canonicalization utilities
certs TLS certificate management
flags Command-line flag parsing
grafana Grafana API client
grpc gRPC server/client with middleware
health Health check endpoints
http HTTP server utilities
jsonnet Jsonnet template processing
logging Structured logging
mock gRPC and HTTP mock servers
nats NATS client abstractions
pbutil Protobuf utilities
pgq PostgreSQL query builder
postgres PostgreSQL client with connection pooling
prometheus Metrics collection and exposition
proxy HTTP/gRPC proxy utilities
routine Goroutine lifecycle management
sat System Acceptance Test framework
test Test helpers
uuid UUID generation utilities
websocket WebSocket server utilities
Tools (tools/)
  • protoc-gen-core — Custom protobuf code generation engine
  • generate-logo — SVG/PNG logo and favicon generator
  • grafana-upload-dashboard — Grafana dashboard uploader
  • grafana-upload-alert-rules — Grafana alert rules uploader
  • template — Generic template processing
  • tidy — Code formatting and dependency management
  • validate-schema — JSON/YAML schema validation
  • proto/ — Protobuf toolchain (protoc, protoc-gen-go, grpc-gateway, etc.)
  • go/ — Go toolchain

License

MIT

Directories

Path Synopsis
cmd
client command
postgres-migrator command
main.go
main.go
tsunade command
gengo
ai/ai_service/rpc
Code generated by protoc-gen-api.
Code generated by protoc-gen-api.
ai/model
Code generated by protoc-gen-api.
Code generated by protoc-gen-api.
ai/store
Code generated by protoc-gen-api.
Code generated by protoc-gen-api.
test/library/library_service/rpc
Code generated by protoc-gen-api.
Code generated by protoc-gen-api.
test/library/model
Code generated by protoc-gen-api.
Code generated by protoc-gen-api.
test/library/store
Code generated by protoc-gen-api.
Code generated by protoc-gen-api.
test/mock
Code generated by protoc-gen-api.
Code generated by protoc-gen-api.
test/user/model
Code generated by protoc-gen-api.
Code generated by protoc-gen-api.
test/user/store
Code generated by protoc-gen-api.
Code generated by protoc-gen-api.
test/user/user_service/rpc
Code generated by protoc-gen-api.
Code generated by protoc-gen-api.
genproto
ai/v1
Code generated by protoc-gen-api.
Code generated by protoc-gen-api.
test/library/library_service/v1
Code generated by protoc-gen-api.
Code generated by protoc-gen-api.
test/library/v1
Code generated by protoc-gen-api.
Code generated by protoc-gen-api.
test/user/user_service/v1
Code generated by protoc-gen-api.
Code generated by protoc-gen-api.
test/user/v1
Code generated by protoc-gen-api.
Code generated by protoc-gen-api.
go
ai
ai/ai_service/provider/mock
Package mock implements a scriptable in-process AI provider for system acceptance tests.
Package mock implements a scriptable in-process AI provider for system acceptance tests.
ai/model
Code generated by protoc-gen-api.
Code generated by protoc-gen-api.
aip
audio
Package audio provides utilities for converting between PCM and μ-law audio formats.
Package audio provides utilities for converting between PCM and μ-law audio formats.
authentication
permission_interceptor.go
permission_interceptor.go
binary
doc.go Package binary provides lifecycle management for executable subprocesses.
doc.go Package binary provides lifecycle management for executable subprocesses.
grpc
go/grpc/server.go
go/grpc/server.go
grpc/grpcinproc
Package grpcinproc provides utilities for working with gRPC streaming RPCs.
Package grpcinproc provides utilities for working with gRPC streaming RPCs.
grpc/middleware
go/grpc/middleware/errors.go
go/grpc/middleware/errors.go
grpc/mock_server
Package mockserver provides a gRPC server that stands in for a third party in tests.
Package mockserver provides a gRPC server that stands in for a third party in tests.
http/mock_server
Package mockserver provides an HTTP server that stands in for a third party in tests.
Package mockserver provides an HTTP server that stands in for a third party in tests.
mock
Package mock holds what the gRPC and HTTP mock servers have in common: how failures are reported, and how many times an expectation may and must be matched.
Package mock holds what the gRPC and HTTP mock servers have in common: how failures are reported, and how many times an expectation may and must be matched.
nats/test_store
Package teststore provides a buffered store of the messages a system under test publishes to NATS, so that tests can assert on side effects the RPCs triggering them do not wait for.
Package teststore provides a buffered store of the messages a system under test publishes to NATS, so that tests can assert on side effects the RPCs triggering them do not wait for.
postgres/test_server
Package testserver runs a lightweight Postgres server for testing.
Package testserver runs a lightweight Postgres server for testing.
sat
Package sat provides a System Acceptance Test framework that orchestrates postgres, database migrations, and services under test (SUTs).
Package sat provides a System Acceptance Test framework that orchestrates postgres, database migrations, and services under test (SUTs).
scripts
third_party
tools
generate-logo command
protoc-gen-core command
protoc-gen-core/plugin/mock
Package mock generates a typed recorder per gRPC service, wrapping the untyped recorder of go/grpc/mock_server so that a test names an endpoint through the compiler rather than through a fully-qualified method name, and passes it the request and response types it was declared with.
Package mock generates a typed recorder per gRPC service, wrapping the untyped recorder of go/grpc/mock_server so that a test names an endpoint through the compiler rather than through a fully-qualified method name, and passes it the request and response types it was declared with.
protoc-gen-core/plugin/nats
Package nats holds helpers shared by the NATS stream, event and rpc generators.
Package nats holds helpers shared by the NATS stream, event and rpc generators.
protoc-gen-core/schema
Package schema resolves the database mapping of proto resources: tables, identifier columns, parent joins and singleton children.
Package schema resolves the database mapping of proto resources: tables, identifier columns, parent joins and singleton children.
template command
validate-schema command

Jump to

Keyboard shortcuts

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