grokratos

package module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2026 License: MIT Imports: 12 Imported by: 0

README

grokratos

codecov Go Report Card License

A Go library for integration testing with Ory Kratos using testcontainers.

Overview

grokratos provides a simple and flexible way to spin up Ory Kratos containers for integration testing in Go applications. It integrates seamlessly with the groat testing framework and uses testcontainers-go under the hood.

Features

  • 🚀 Easy setup of Ory Kratos containers for testing
  • 🔧 Configurable container images and settings
  • 🏷️ Dependency injection support with custom labels
  • 🔄 Automatic container lifecycle management
  • 📝 Custom identity schema support
  • ⚙️ Custom Kratos configuration support

Installation

go get github.com/godepo/grokratos

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New[T any](options ...Option) integration.Bootstrap[T]

Types

type Container

type Container[T any] struct {
	// contains filtered or unexported fields
}

func (*Container[T]) Injector

func (c *Container[T]) Injector(t *testing.T, to T) T

type KratosContainer

type KratosContainer interface {
	PublicConnectionString(ctx context.Context) string
	AdminConnectionString(ctx context.Context) string
	Terminate(ctx context.Context, opts ...testcontainers.TerminateOption) error
}

type Option

type Option func(*config)

func WithConfig

func WithConfig(path string) Option

func WithContainerImage

func WithContainerImage(image string) Option

func WithFrontInjectLabel

func WithFrontInjectLabel(label string) Option

func WithInjectLabel

func WithInjectLabel(label string) Option

func WithUserSchemaPath

func WithUserSchemaPath(path string) Option

Directories

Path Synopsis
internal
pkg

Jump to

Keyboard shortcuts

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