kit

module
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: May 19, 2026 License: MIT

README

go-kit

Shared library for go-kit

Installation

go get github.com/dosanma1/mmo-game/shared/go-kit

Usage

import "github.com/dosanma1/mmo-game/shared/go-kit"

Directories

Path Synopsis
Package application contains the Clean Architecture application layer components.
Package application contains the Clean Architecture application layer components.
repository
Package repository wraps shared components to work with repositories
Package repository wraps shared components to work with repositories
repository/repositorytest
Package repositorytest provides test helpers for the generic repository package
Package repositorytest provides test helpers for the generic repository package
usecase
Package usecase wraps shared components to work with usecases.
Package usecase wraps shared components to work with usecases.
usecase/usecasetest
Package usecasetest provides test helpers for the generic usecase package
Package usecasetest provides test helpers for the generic usecase package
Package auth provides authentication primitives and middleware components.
Package auth provides authentication primitives and middleware components.
authtest
Package authtest provides test fixtures (stub authenticators, signed JWTs, etc.) that downstream services use to exercise auth-protected HTTP / gRPC handlers without spinning up a real identity provider.
Package authtest provides test fixtures (stub authenticators, signed JWTs, etc.) that downstream services use to exercise auth-protected HTTP / gRPC handlers without spinning up a real identity provider.
jwt
Package jwt provides JWT-based authentication primitives — signing helpers, HMAC + RSA verifiers, claims parsing — used by the kit/auth HTTP + gRPC interceptors.
Package jwt provides JWT-based authentication primitives — signing helpers, HMAC + RSA verifiers, claims parsing — used by the kit/auth HTTP + gRPC interceptors.
provider
Package provider defines the IdentityProvider interface that the HTTP + gRPC authenticators delegate to.
Package provider defines the IdentityProvider interface that the HTTP + gRPC authenticators delegate to.
distributed
idgen
Package idgen provides distributed ID generation without requiring central coordination.
Package idgen provides distributed ID generation without requiring central coordination.
Package errors provides a structured error handling system with rich context.
Package errors provides a structured error handling system with rich context.
Package filter provides a generic specification pattern implementation for filtering resources.
Package filter provides a generic specification pattern implementation for filtering resources.
Package firebase provides a client wrapper for Firebase Authentication and User Management operations.
Package firebase provides a client wrapper for Firebase Authentication and User Management operations.
Package fixtures provides simple SQL fixture loading from embedded filesystems.
Package fixtures provides simple SQL fixture loading from embedded filesystems.
Package golden provides golden-file test helpers — read/write expected payloads from disk so consumer tests can diff output against checked-in fixtures rather than maintaining inline expected strings.
Package golden provides golden-file test helpers — read/write expected payloads from disk so consumer tests can diff output against checked-in fixtures rather than maintaining inline expected strings.
Package instance provides utilities for creating instances of generic types.
Package instance provides utilities for creating instances of generic types.
Package jsonapi implements the JSON:API 1.1 spec on the server side — document marshal/unmarshal, relationship + included handling, error envelope shaping.
Package jsonapi implements the JSON:API 1.1 spec on the server side — document marshal/unmarshal, relationship + included handling, error envelope shaping.
helpers
Package helpers bundles JSON:API test utilities — diff assertions against a wire payload, matchers against decoded resources, golden-file comparison — for use from service-level integration tests.
Package helpers bundles JSON:API test utilities — diff assertions against a wire payload, matchers against decoded resources, golden-file comparison — for use from service-level integration tests.
Package messaging holds broker-agnostic primitives shared by every messaging transport in the kit (AMQP, NATS, and future brokers).
Package messaging holds broker-agnostic primitives shared by every messaging transport in the kit (AMQP, NATS, and future brokers).
Package migrator provides database migration utilities.
Package migrator provides database migration utilities.
Package monitoring wraps components used for monitoring (logging, tracing, ...)
Package monitoring wraps components used for monitoring (logging, tracing, ...)
logger
Package logger describes interfaces for a logger.Logger and other support elements
Package logger describes interfaces for a logger.Logger and other support elements
logger/internal
Package internal holds the logger backend adapters (zap / slog) and the shared OutputFormat / level vocabulary the public logger package translates user input into.
Package internal holds the logger backend adapters (zap / slog) and the shared OutputFormat / level vocabulary the public logger package translates user input into.
logger/loggertest
Package loggertest ...
Package loggertest ...
monitoringtest
Package monitoringtest wraps test components for the monitoring package
Package monitoringtest wraps test components for the monitoring package
tracer
Package tracer describes interfaces for a tracer.Tracer used to start spans, propagate trace context across process boundaries, and record events on the active span.
Package tracer describes interfaces for a tracer.Tracer used to start spans, propagate trace context across process boundaries, and record events on the active span.
tracer/internal
Package internal hides OTel SDK types behind a thin interface so the public tracer package can stay free of vendor-specific imports.
Package internal hides OTel SDK types behind a thin interface so the public tracer package can stay free of vendor-specific imports.
tracer/tracertest
Package tracertest provides test doubles for tracer.Tracer.
Package tracertest provides test doubles for tracer.Tracer.
Package outbox is the transactional-outbox primitive that lets a service emit at-least-once messages atomically with its local database writes.
Package outbox is the transactional-outbox primitive that lets a service emit at-least-once messages atomically with its local database writes.
postgres
Package postgres is the Postgres/GORM implementation of outbox.Repository.
Package postgres is the Postgres/GORM implementation of outbox.Repository.
pb
anypb
Package anypb provides helpers for working with protobuf Any messages.
Package anypb provides helpers for working with protobuf Any messages.
timepb
Package timepb provides conversions between Go time.Time and the protobuf Timestamp type.
Package timepb provides conversions between Go time.Time and the protobuf Timestamp type.
Package persistence holds the database-agnostic primitives — Transactioner for atomic write paths, repository interfaces, and shared error mapping — that the concrete adapters (gormdb, sqldb, redisdb) implement.
Package persistence holds the database-agnostic primitives — Transactioner for atomic write paths, repository interfaces, and shared error mapping — that the concrete adapters (gormdb, sqldb, redisdb) implement.
gormdb
Package gormdb provides the database-agnostic core for GORM integration.
Package gormdb provides the database-agnostic core for GORM integration.
gormdb/gormpg
Package gormpg provides the PostgreSQL-specific implementation for the gormdb client.
Package gormpg provides the PostgreSQL-specific implementation for the gormdb client.
postgres
Package postgres holds Postgres-specific error translation + small connection helpers (SQLSTATE → apierrors, advisory-lock primitives) shared by the gormdb and sqldb adapters.
Package postgres holds Postgres-specific error translation + small connection helpers (SQLSTATE → apierrors, advisory-lock primitives) shared by the gormdb and sqldb adapters.
redisdb
Package redisdb provides a Redis client wrapper with connection pooling, configuration management, and FX integration.
Package redisdb provides a Redis client wrapper with connection pooling, configuration management, and FX integration.
redisdb/redistest
Package redistest contains helpers for the tests
Package redistest contains helpers for the tests
sqldb
Package sqldb provides the core foundation for SQL database interactions within the mmo-game architecture.
Package sqldb provides the core foundation for SQL database interactions within the mmo-game architecture.
proto
Package ptr provides generic utility functions for working with pointers.
Package ptr provides generic utility functions for working with pointers.
Package resource provides base abstractions for domain entities.
Package resource provides base abstractions for domain entities.
resourcetest
Package resourcetest provides test helpers for resource package
Package resourcetest provides test helpers for resource package
Package retry provides a functional mechanism to retry operations with configurable backoff policies.
Package retry provides a functional mechanism to retry operations with configurable backoff policies.
Package saga implements the Saga pattern for distributed transactions.
Package saga implements the Saga pattern for distributed transactions.
Package search composes the Query DSL (filter / sort / fieldsets / includes / pagination) into the search.Option callbacks every kit repository / list endpoint consumes.
Package search composes the Query DSL (filter / sort / fieldsets / includes / pagination) into the search.Option callbacks every kit repository / list endpoint consumes.
query
Package query is the search Query DSL — filter operators, sort expressions, sparse fieldsets, includes, and pagination styles — shared by every REST + gRPC list endpoint in go/kit.
Package query is the search Query DSL — filter operators, sort expressions, sparse fieldsets, includes, and pagination styles — shared by every REST + gRPC list endpoint in go/kit.
query/querytest
Package querytest provides test helpers for query options
Package querytest provides test helpers for query options
searchtest
Package searchtest provides tools to test search options, queries, etc
Package searchtest provides tools to test search options, queries, etc
Package slicesx provides generic utility functions for working with slices.
Package slicesx provides generic utility functions for working with slices.
Package sops provides test helpers for loading SOPS-encrypted configuration files, typically used for integration tests requiring secret credentials.
Package sops provides test helpers for loading SOPS-encrypted configuration files, typically used for integration tests requiring secret credentials.
Package transport defines the cross-cutting Endpoint + Error abstractions every concrete transport (grpc, rest, amqp, nats, tcp, udp, websocket) implements.
Package transport defines the cross-cutting Endpoint + Error abstractions every concrete transport (grpc, rest, amqp, nats, tcp, udp, websocket) implements.
amqp
Package amqp provides a comprehensive RabbitMQ/AMQP consumer and producer framework.
Package amqp provides a comprehensive RabbitMQ/AMQP consumer and producer framework.
amqp/amqptest
Package amqptest provides mocks and helpers for testing AMQP connections
Package amqptest provides mocks and helpers for testing AMQP connections
grpc
Package grpc provides a comprehensive gRPC server and client framework.
Package grpc provides a comprehensive gRPC server and client framework.
grpc/middleware
Package middleware provides common gRPC server middlewares
Package middleware provides common gRPC server middlewares
nats
Package nats provides NATS / JetStream consumer + publisher helpers built on the broker-agnostic kit/messaging interface.
Package nats provides NATS / JetStream consumer + publisher helpers built on the broker-agnostic kit/messaging interface.
rest
Package rest's collector extracts an OpenAPI document from the registered HTTP handlers + their reflected I/O types.
Package rest's collector extracts an OpenAPI document from the registered HTTP handlers + their reflected I/O types.
tcp
Package tcp provides a comprehensive TCP server and client framework.
Package tcp provides a comprehensive TCP server and client framework.
udp
Package udp provides a UDP transport implementation with optional reliability.
Package udp provides a UDP transport implementation with optional reliability.
websocket
Package websocket provides a comprehensive WebSocket client framework.
Package websocket provides a comprehensive WebSocket client framework.
Package validation provides struct-tag-driven input validation used by the REST + gRPC handler factories.
Package validation provides struct-tag-driven input validation used by the REST + gRPC handler factories.

Jump to

Keyboard shortcuts

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