Files
magistrala/pkg
Steve Munene ac8dadefc6
Continuous Delivery / lint-and-build (push) Has been cancelled
Continuous Delivery / Build and Push Docker Images (push) Has been cancelled
Deploy GitHub Pages / swagger-ui (push) Has been cancelled
CI Pipeline / Lint Proto (push) Has been cancelled
CI Pipeline / lint-and-build (push) Has been cancelled
CI Pipeline / Detect Changes (push) Has been cancelled
CI Pipeline / Test ${{ matrix.module }} (push) Has been cancelled
CI Pipeline / Upload Coverage (push) Has been cancelled
Property Based Tests / api-test (push) Has been cancelled
NOISSUE - Fix refreshKey method (#3472)
Signed-off-by: nyagamunene <stevenyaga2014@gmail.com>
2026-04-15 13:30:00 +02:00
..
2026-04-06 15:23:42 +02:00

Standalone packages

The pkg directory (the current directory) contains a set of standalone packages that can be imported and used by external applications. The packages are specifically meant for the development of Magistrala based back-end applications and implement common tasks needed by the programmatic operation of the Magistrala platform.

Using the packages

Fetch any package directly from the module:

go get github.com/absmach/magistrala/pkg/authn

Then import it in your code:

import "github.com/absmach/magistrala/pkg/authn"

Package map (selected)

Package Purpose
authn, authz, oauth2, policies Authentication and authorization helpers, middleware, and policy utilities.
grpcclient TLS-aware gRPC client setup with health checks and timeouts.
server HTTP, gRPC, and COAP server bootstrap utilities (TLS, graceful shutdown).
postgres PostgreSQL connector with migrations helpers.
events Event store client abstractions and subscriber utilities.
prometheus Metrics collectors for request counts/latency.
jaeger, tracing OpenTelemetry tracing configuration and instrumentation helpers.
channels, clients, groups, domains, roles Shared types and helpers for core Magistrala domain services.
messaging, connections, callout Messaging DTOs, connection types, and outbound callout helpers.
sdk Go SDK for interacting with Magistrala services.
errors Error wrappers with consistent error typing.
uuid, ulid, sid ID generators.
transformers, svcutil Generic data transformation and service utilities.

For detailed package-level docs, run go doc on the desired package or browse the source here.