tests

package
v1.51.0 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2026 License: Apache-2.0 Imports: 33 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	EncryptionKeyDevDefault = "YXV0aHVsYS1kZXYta2V5LTAxMjM0NTY3ODlhYmNkZWY="
	EncryptionKeyOne        = "MDEyMzQ1Njc4OWFiY2RlZjAxMjM0NTY3ODlhYmNkZWY="
	EncryptionKeyTwo        = "ZmVkY2JhOTg3NjU0MzIxMGZlZGNiYTk4NzY1NDMyMTA="
	EncryptionKeyThree      = "YWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWE="
)

Test secrets are standard padded Base64 encodings of exactly 32 bytes, the only format Authula accepts.

Variables

This section is empty.

Functions

func ActorFromUserID added in v1.13.0

func ActorFromUserID(userID *string) *models.Actor

func AssertErrorMessage

func AssertErrorMessage(t *testing.T, reqCtx *models.RequestContext, status int, message string)

func AssertErrorResponse added in v1.41.0

func AssertErrorResponse(t *testing.T, reqCtx *models.RequestContext, status int, code string, message string)

func AssertHasKey

func AssertHasKey(t *testing.T, envelope map[string]any, key string)

func ConcreteRoutePath

func ConcreteRoutePath(path string) string

func DecodeJSONResponse

func DecodeJSONResponse(t *testing.T, w *httptest.ResponseRecorder) map[string]any

func DecodeResponseJSON

func DecodeResponseJSON[T any](t *testing.T, reqCtx *models.RequestContext) T

func GetArray

func GetArray(t *testing.T, envelope map[string]any, key string) []any

func GetMap

func GetMap(t *testing.T, envelope map[string]any, key string) map[string]any

func GetString

func GetString(t *testing.T, envelope map[string]any, key string) string

func JSONRequest

func JSONRequest(t *testing.T, handler http.Handler, method, path string, payload any) *httptest.ResponseRecorder

func MarshalToJSON

func MarshalToJSON(t *testing.T, payload any) []byte

func MustDecodeKey added in v1.51.0

func MustDecodeKey(encoded string) []byte

MustDecodeKey decodes a Base64 test key for tests that need key bytes. It panics if the key is invalid so a malformed fixture fails immediately.

func NewHandlerRequest

func NewHandlerRequest(t *testing.T, method string, path string, body []byte, userID *string) (*http.Request, *httptest.ResponseRecorder, *models.RequestContext)

func NewHandlerRequestWithActor added in v1.7.0

func NewHandlerRequestWithActor(t *testing.T, method string, path string, body []byte, actor *models.Actor) (*http.Request, *httptest.ResponseRecorder, *models.RequestContext)

func NewIntegrationTestDBFromEnv

func NewIntegrationTestDBFromEnv(t *testing.T) (*bun.DB, string)

func NewMySQLIntegrationDB

func NewMySQLIntegrationDB(t *testing.T) *bun.DB

func NewPostgresIntegrationDB

func NewPostgresIntegrationDB(t *testing.T) *bun.DB

func NewRequestContext added in v1.6.0

func NewRequestContext(t *testing.T, method, path string, headers map[string]string) *models.RequestContext

func NewSQLiteIntegrationDB

func NewSQLiteIntegrationDB(t *testing.T) *bun.DB

func Request

func Request(t *testing.T, handler http.Handler, method, path string, body *bytes.Buffer) *httptest.ResponseRecorder

func TestActor added in v1.13.0

func TestActor() *models.Actor

Types

type BaseTestFixture

type BaseTestFixture struct {
	T                   *testing.T
	DB                  *bun.DB
	Config              *models.Config
	Provider            string
	ServiceRegistry     models.ServiceRegistry
	UserService         servicesinterfaces.UserService
	AccountService      servicesinterfaces.AccountService
	SessionService      servicesinterfaces.SessionService
	VerificationService servicesinterfaces.VerificationService
	TokenService        servicesinterfaces.TokenService
	// contains filtered or unexported fields
}

func NewBaseTestFixture

func NewBaseTestFixture(t *testing.T, options ...config.ConfigOption) *BaseTestFixture

func (*BaseTestFixture) ResolveID

func (f *BaseTestFixture) ResolveID(id string) string

func (*BaseTestFixture) SeedSession

func (f *BaseTestFixture) SeedSession(sessionID, userID string) string

func (*BaseTestFixture) SeedUser

func (f *BaseTestFixture) SeedUser(id, email string) string

type LevelRecordingLogger added in v1.49.0

type LevelRecordingLogger struct {
	// contains filtered or unexported fields
}

LevelRecordingLogger records every call with its severity. It is safe for concurrent use, which makes it suitable for fan-out tests.

func (*LevelRecordingLogger) Debug added in v1.49.0

func (l *LevelRecordingLogger) Debug(msg string, args ...any)

func (*LevelRecordingLogger) Error added in v1.49.0

func (l *LevelRecordingLogger) Error(msg string, args ...any)

func (*LevelRecordingLogger) Info added in v1.49.0

func (l *LevelRecordingLogger) Info(msg string, args ...any)

func (*LevelRecordingLogger) Messages added in v1.49.0

func (l *LevelRecordingLogger) Messages() []string

Messages returns the message of every captured call, in order.

func (*LevelRecordingLogger) Records added in v1.49.0

func (l *LevelRecordingLogger) Records() []LogRecord

Records returns a copy of every captured call, in order.

func (*LevelRecordingLogger) Warn added in v1.49.0

func (l *LevelRecordingLogger) Warn(msg string, args ...any)

type LogRecord added in v1.49.0

type LogRecord struct {
	Level   string
	Message string
	Args    []any
}

LogRecord is one captured call made to a LevelRecordingLogger.

type MockAccountRepository

type MockAccountRepository struct {
	mock.Mock
}

func (*MockAccountRepository) Create

func (m *MockAccountRepository) Create(ctx context.Context, account *models.Account) (*models.Account, error)

func (*MockAccountRepository) Delete

func (m *MockAccountRepository) Delete(ctx context.Context, id string) error

func (*MockAccountRepository) GetAllByUserID

func (m *MockAccountRepository) GetAllByUserID(ctx context.Context, userID string) ([]models.Account, error)

func (*MockAccountRepository) GetByID

func (*MockAccountRepository) GetByProviderAndAccountID

func (m *MockAccountRepository) GetByProviderAndAccountID(ctx context.Context, provider string, accountID string) (*models.Account, error)

func (*MockAccountRepository) GetByUserID

func (m *MockAccountRepository) GetByUserID(ctx context.Context, userID string) (*models.Account, error)

func (*MockAccountRepository) GetByUserIDAndProvider

func (m *MockAccountRepository) GetByUserIDAndProvider(ctx context.Context, userID string, provider string) (*models.Account, error)

func (*MockAccountRepository) Update

func (m *MockAccountRepository) Update(ctx context.Context, account *models.Account) (*models.Account, error)

func (*MockAccountRepository) UpdateFields

func (m *MockAccountRepository) UpdateFields(ctx context.Context, userID string, fields map[string]any) error

func (*MockAccountRepository) WithTx

type MockAccountService

type MockAccountService struct {
	mock.Mock
}

func (*MockAccountService) Create

func (m *MockAccountService) Create(ctx context.Context, userID, accountID, providerID string, password *string) (*models.Account, error)

func (*MockAccountService) CreateOAuth2

func (m *MockAccountService) CreateOAuth2(ctx context.Context, userID, providerAccountID, provider, accessToken string, refreshToken *string, accessTokenExpiresAt, refreshTokenExpiresAt *time.Time, scope *string) (*models.Account, error)

func (*MockAccountService) GetByProviderAndAccountID

func (m *MockAccountService) GetByProviderAndAccountID(ctx context.Context, provider, accountID string) (*models.Account, error)

func (*MockAccountService) GetByUserID

func (m *MockAccountService) GetByUserID(ctx context.Context, userID string) (*models.Account, error)

func (*MockAccountService) GetByUserIDAndProvider

func (m *MockAccountService) GetByUserIDAndProvider(ctx context.Context, userID, provider string) (*models.Account, error)

func (*MockAccountService) Update

func (m *MockAccountService) Update(ctx context.Context, account *models.Account) (*models.Account, error)

func (*MockAccountService) UpdateFields

func (m *MockAccountService) UpdateFields(ctx context.Context, userID string, fields map[string]any) error

func (*MockAccountService) UpdateOAuth2Tokens added in v1.50.0

func (m *MockAccountService) UpdateOAuth2Tokens(ctx context.Context, accountID string, accessToken string, refreshToken *string, accessTokenExpiresAt, refreshTokenExpiresAt *time.Time, scope *string) (*models.Account, error)

type MockAuthorizer added in v1.13.0

type MockAuthorizer struct {
	mock.Mock
}

func (*MockAuthorizer) AuthorizeOrganizationAccess added in v1.13.0

func (m *MockAuthorizer) AuthorizeOrganizationAccess(ctx context.Context, actor *models.Actor, orgID string) error

func (*MockAuthorizer) AuthorizeScope added in v1.13.0

func (m *MockAuthorizer) AuthorizeScope(ctx context.Context, actor *models.Actor, scope string) error

type MockEventBus

type MockEventBus struct {
	mock.Mock
}

func (*MockEventBus) Close

func (m *MockEventBus) Close() error

func (*MockEventBus) Publish

func (m *MockEventBus) Publish(event models.Event) error

func (*MockEventBus) Subscribe

func (m *MockEventBus) Subscribe(topic string, handler models.EventHandler) (models.SubscriptionID, error)

func (*MockEventBus) Unsubscribe

func (m *MockEventBus) Unsubscribe(topic string, subscriptionID models.SubscriptionID)

type MockLogger

type MockLogger struct{}

func (*MockLogger) Debug

func (m *MockLogger) Debug(msg string, args ...any)

func (*MockLogger) Error

func (m *MockLogger) Error(msg string, args ...any)

func (*MockLogger) Info

func (m *MockLogger) Info(msg string, args ...any)

func (*MockLogger) Warn

func (m *MockLogger) Warn(msg string, args ...any)

type MockMailerService

type MockMailerService struct {
	mock.Mock
}

func (*MockMailerService) SendEmail

func (m *MockMailerService) SendEmail(ctx context.Context, to string, subject string, text string, html string) error

type MockOrganizationService added in v1.13.0

type MockOrganizationService struct {
	mock.Mock
}

func (*MockOrganizationService) ExistsByID added in v1.13.0

func (m *MockOrganizationService) ExistsByID(ctx context.Context, organizationID string) (bool, error)

func (*MockOrganizationService) GetUserPermissionsInOrganization added in v1.36.0

func (m *MockOrganizationService) GetUserPermissionsInOrganization(ctx context.Context, userID string, organizationID string) ([]string, error)

type MockPasswordService

type MockPasswordService struct {
	mock.Mock
}

func (*MockPasswordService) Hash

func (m *MockPasswordService) Hash(password string) (string, error)

func (*MockPasswordService) Verify

func (m *MockPasswordService) Verify(password, encoded string) bool

type MockRateLimitService added in v1.13.0

type MockRateLimitService struct {
	mock.Mock
}

func (*MockRateLimitService) CheckAndIncrement added in v1.13.0

func (m *MockRateLimitService) CheckAndIncrement(ctx context.Context, key string, window time.Duration, maxRequests int) (bool, int, time.Time, error)

func (*MockRateLimitService) DeleteRule added in v1.13.0

func (m *MockRateLimitService) DeleteRule(ctx context.Context, key string) error

func (*MockRateLimitService) GetRule added in v1.13.0

func (*MockRateLimitService) GetValue added in v1.13.0

func (m *MockRateLimitService) GetValue(ctx context.Context, key string) (any, error)

func (*MockRateLimitService) SetRule added in v1.13.0

func (m *MockRateLimitService) SetRule(ctx context.Context, key string, window time.Duration, maxRequests int) error

type MockSecondaryStorage added in v1.9.0

type MockSecondaryStorage struct {
	mock.Mock
}

func (*MockSecondaryStorage) Close added in v1.9.0

func (m *MockSecondaryStorage) Close() error

func (*MockSecondaryStorage) Delete added in v1.9.0

func (m *MockSecondaryStorage) Delete(ctx context.Context, key string) error

func (*MockSecondaryStorage) Get added in v1.9.0

func (m *MockSecondaryStorage) Get(ctx context.Context, key string) (any, error)

func (*MockSecondaryStorage) Incr added in v1.9.0

func (m *MockSecondaryStorage) Incr(ctx context.Context, key string, ttl *time.Duration) (int, error)

func (*MockSecondaryStorage) Scan added in v1.9.0

func (m *MockSecondaryStorage) Scan(ctx context.Context, prefix string) ([]string, error)

func (*MockSecondaryStorage) Set added in v1.9.0

func (m *MockSecondaryStorage) Set(ctx context.Context, key string, value any, ttl *time.Duration) error

func (*MockSecondaryStorage) TTL added in v1.9.0

type MockServiceRegistry

type MockServiceRegistry struct {
	mock.Mock
}

func (*MockServiceRegistry) Get

func (m *MockServiceRegistry) Get(name string) any

func (*MockServiceRegistry) Register

func (m *MockServiceRegistry) Register(name string, service any)

type MockSessionRepository

type MockSessionRepository struct {
	mock.Mock
}

func (*MockSessionRepository) Create

func (m *MockSessionRepository) Create(ctx context.Context, session *models.Session) (*models.Session, error)

func (*MockSessionRepository) Delete

func (m *MockSessionRepository) Delete(ctx context.Context, id string) error

func (*MockSessionRepository) DeleteByUserID

func (m *MockSessionRepository) DeleteByUserID(ctx context.Context, userID string) error

func (*MockSessionRepository) DeleteExpired

func (m *MockSessionRepository) DeleteExpired(ctx context.Context) error

func (*MockSessionRepository) DeleteOldestByUserID

func (m *MockSessionRepository) DeleteOldestByUserID(ctx context.Context, userID string, maxCount int) error

func (*MockSessionRepository) GetByID

func (*MockSessionRepository) GetByToken

func (m *MockSessionRepository) GetByToken(ctx context.Context, token string) (*models.Session, error)

func (*MockSessionRepository) GetByUserID

func (m *MockSessionRepository) GetByUserID(ctx context.Context, userID string) (*models.Session, error)

func (*MockSessionRepository) GetDistinctUserIDs

func (m *MockSessionRepository) GetDistinctUserIDs(ctx context.Context) ([]string, error)

func (*MockSessionRepository) Update

func (m *MockSessionRepository) Update(ctx context.Context, session *models.Session) (*models.Session, error)

func (*MockSessionRepository) WithTx

type MockSessionService

type MockSessionService struct {
	mock.Mock
}

func (*MockSessionService) Create

func (m *MockSessionService) Create(ctx context.Context, userID, hashedToken string, ipAddress, userAgent *string, maxAge time.Duration) (*models.Session, error)

func (*MockSessionService) Delete

func (m *MockSessionService) Delete(ctx context.Context, id string) error

func (*MockSessionService) DeleteAllByUserID

func (m *MockSessionService) DeleteAllByUserID(ctx context.Context, userID string) error

func (*MockSessionService) DeleteAllExpired

func (m *MockSessionService) DeleteAllExpired(ctx context.Context) error

func (*MockSessionService) DeleteOldestByUserID

func (m *MockSessionService) DeleteOldestByUserID(ctx context.Context, userID string, maxCount int) error

func (*MockSessionService) GetByID

func (m *MockSessionService) GetByID(ctx context.Context, id string) (*models.Session, error)

func (*MockSessionService) GetByToken

func (m *MockSessionService) GetByToken(ctx context.Context, hashedToken string) (*models.Session, error)

func (*MockSessionService) GetByUserID

func (m *MockSessionService) GetByUserID(ctx context.Context, userID string) (*models.Session, error)

func (*MockSessionService) GetDistinctUserIDs

func (m *MockSessionService) GetDistinctUserIDs(ctx context.Context) ([]string, error)

func (*MockSessionService) Update

func (m *MockSessionService) Update(ctx context.Context, session *models.Session) (*models.Session, error)

type MockTokenRepository

type MockTokenRepository struct {
	mock.Mock
}

func (*MockTokenRepository) Decrypt

func (m *MockTokenRepository) Decrypt(encrypted string) (string, error)

func (*MockTokenRepository) Encrypt

func (m *MockTokenRepository) Encrypt(token string) (string, error)

func (*MockTokenRepository) Generate

func (m *MockTokenRepository) Generate() (string, error)

func (*MockTokenRepository) Hash

func (m *MockTokenRepository) Hash(token string) string

type MockTokenService

type MockTokenService struct {
	mock.Mock
}

func (*MockTokenService) Decrypt

func (m *MockTokenService) Decrypt(encrypted string) (string, error)

func (*MockTokenService) Encrypt

func (m *MockTokenService) Encrypt(token string) (string, error)

func (*MockTokenService) Generate

func (m *MockTokenService) Generate() (string, error)

func (*MockTokenService) Hash

func (m *MockTokenService) Hash(token string) string

type MockUserRepository

type MockUserRepository struct {
	mock.Mock
}

func (*MockUserRepository) Create

func (m *MockUserRepository) Create(ctx context.Context, user *models.User) (*models.User, error)

func (*MockUserRepository) Delete

func (m *MockUserRepository) Delete(ctx context.Context, id string) error

func (*MockUserRepository) GetAll

func (m *MockUserRepository) GetAll(ctx context.Context, cursor *string, limit int) ([]models.User, *string, error)

func (*MockUserRepository) GetByEmail

func (m *MockUserRepository) GetByEmail(ctx context.Context, email string) (*models.User, error)

func (*MockUserRepository) GetByID

func (m *MockUserRepository) GetByID(ctx context.Context, id string) (*models.User, error)

func (*MockUserRepository) Update

func (m *MockUserRepository) Update(ctx context.Context, user *models.User) (*models.User, error)

func (*MockUserRepository) UpdateFields

func (m *MockUserRepository) UpdateFields(ctx context.Context, id string, fields map[string]any) error

func (*MockUserRepository) WithTx

type MockUserService

type MockUserService struct {
	mock.Mock
}

func (*MockUserService) Create

func (m *MockUserService) Create(ctx context.Context, name string, email string, emailVerified bool, image *string, metadata map[string]any) (*models.User, error)

func (*MockUserService) Delete

func (m *MockUserService) Delete(ctx context.Context, id string) error

func (*MockUserService) GetAll

func (m *MockUserService) GetAll(ctx context.Context, cursor *string, limit int) ([]models.User, *string, error)

func (*MockUserService) GetByEmail

func (m *MockUserService) GetByEmail(ctx context.Context, email string) (*models.User, error)

func (*MockUserService) GetByID

func (m *MockUserService) GetByID(ctx context.Context, id string) (*models.User, error)

func (*MockUserService) Update

func (m *MockUserService) Update(ctx context.Context, user *models.User) (*models.User, error)

func (*MockUserService) UpdateFields

func (m *MockUserService) UpdateFields(ctx context.Context, id string, fields map[string]any) error

type MockVerificationRepository

type MockVerificationRepository struct {
	mock.Mock
}

func (*MockVerificationRepository) Create

func (*MockVerificationRepository) Delete

func (*MockVerificationRepository) DeleteByUserIDAndType

func (m *MockVerificationRepository) DeleteByUserIDAndType(ctx context.Context, userID string, vType models.VerificationType) error

func (*MockVerificationRepository) DeleteExpired

func (m *MockVerificationRepository) DeleteExpired(ctx context.Context) error

func (*MockVerificationRepository) GetByID

func (*MockVerificationRepository) GetByToken

func (*MockVerificationRepository) WithTx

type MockVerificationService

type MockVerificationService struct {
	mock.Mock
}

func (*MockVerificationService) Create

func (m *MockVerificationService) Create(ctx context.Context, userID string, hashedToken string, vType models.VerificationType, value string, expiry time.Duration) (*models.Verification, error)

func (*MockVerificationService) Delete

func (m *MockVerificationService) Delete(ctx context.Context, id string) error

func (*MockVerificationService) DeleteByUserIDAndType

func (m *MockVerificationService) DeleteByUserIDAndType(ctx context.Context, userID string, vType models.VerificationType) error

func (*MockVerificationService) DeleteExpired

func (m *MockVerificationService) DeleteExpired(ctx context.Context) error

func (*MockVerificationService) GetByToken

func (m *MockVerificationService) GetByToken(ctx context.Context, hashedToken string) (*models.Verification, error)

func (*MockVerificationService) IsExpired

func (m *MockVerificationService) IsExpired(verif *models.Verification) bool

type NoopAuthorizer added in v1.13.0

type NoopAuthorizer struct{}

func (*NoopAuthorizer) AuthorizeOrganizationAccess added in v1.13.0

func (a *NoopAuthorizer) AuthorizeOrganizationAccess(_ context.Context, _ *models.Actor, _ string) error

func (*NoopAuthorizer) AuthorizeScope added in v1.13.0

func (a *NoopAuthorizer) AuthorizeScope(_ context.Context, _ *models.Actor, _ string) error

type PanicLogger added in v1.49.0

type PanicLogger struct{}

PanicLogger panics on every call. It is used to prove that a broken sink cannot propagate into the caller.

func (*PanicLogger) Debug added in v1.49.0

func (l *PanicLogger) Debug(msg string, args ...any)

func (*PanicLogger) Error added in v1.49.0

func (l *PanicLogger) Error(msg string, args ...any)

func (*PanicLogger) Info added in v1.49.0

func (l *PanicLogger) Info(msg string, args ...any)

func (*PanicLogger) Warn added in v1.49.0

func (l *PanicLogger) Warn(msg string, args ...any)

type RecordingEventBus added in v1.51.0

type RecordingEventBus struct {
	// contains filtered or unexported fields
}

RecordingEventBus is a test EventBus that records published events and exposes them through a buffered channel. It is safe for concurrent use, which makes it suitable for services that publish events from a goroutine.

func NewRecordingEventBus added in v1.51.0

func NewRecordingEventBus(bufferSize ...int) *RecordingEventBus

func (*RecordingEventBus) Close added in v1.51.0

func (b *RecordingEventBus) Close() error

func (*RecordingEventBus) Events added in v1.51.0

func (b *RecordingEventBus) Events() <-chan models.Event

Events returns the channel that receives every published event.

func (*RecordingEventBus) NextEvent added in v1.51.0

func (b *RecordingEventBus) NextEvent(t *testing.T) models.Event

NextEvent waits for the next published event and fails the test on timeout.

func (*RecordingEventBus) Publish added in v1.51.0

func (b *RecordingEventBus) Publish(event models.Event) error

func (*RecordingEventBus) PublishedEvents added in v1.51.0

func (b *RecordingEventBus) PublishedEvents() []models.Event

PublishedEvents returns a snapshot of every event published so far.

func (*RecordingEventBus) SetPublishError added in v1.51.0

func (b *RecordingEventBus) SetPublishError(err error)

SetPublishError makes every subsequent Publish call return err.

func (*RecordingEventBus) Subscribe added in v1.51.0

func (*RecordingEventBus) Unsubscribe added in v1.51.0

func (b *RecordingEventBus) Unsubscribe(string, models.SubscriptionID)

type RecordingLogger added in v1.37.0

type RecordingLogger struct {
	ErrorCalls []string
}

RecordingLogger records error messages so tests can assert that errors were logged, e.g. after-hooks that must not fail the operation.

func (*RecordingLogger) Debug added in v1.37.0

func (l *RecordingLogger) Debug(msg string, args ...any)

func (*RecordingLogger) Error added in v1.37.0

func (l *RecordingLogger) Error(msg string, args ...any)

func (*RecordingLogger) Info added in v1.37.0

func (l *RecordingLogger) Info(msg string, args ...any)

func (*RecordingLogger) Warn added in v1.37.0

func (l *RecordingLogger) Warn(msg string, args ...any)

type TestPluginRegistry added in v1.28.0

type TestPluginRegistry struct{}

func (*TestPluginRegistry) CloseAll added in v1.28.0

func (r *TestPluginRegistry) CloseAll()

func (*TestPluginRegistry) DropMigrations added in v1.28.0

func (r *TestPluginRegistry) DropMigrations(ctx context.Context) error

func (*TestPluginRegistry) GetConfig added in v1.28.0

func (r *TestPluginRegistry) GetConfig() *models.Config

func (*TestPluginRegistry) GetPlugin added in v1.28.0

func (r *TestPluginRegistry) GetPlugin(pluginID string) models.Plugin

func (*TestPluginRegistry) InitAll added in v1.28.0

func (r *TestPluginRegistry) InitAll() error

func (*TestPluginRegistry) Plugins added in v1.28.0

func (r *TestPluginRegistry) Plugins() []models.Plugin

func (*TestPluginRegistry) Register added in v1.28.0

func (r *TestPluginRegistry) Register(p models.Plugin) error

func (*TestPluginRegistry) RunMigrations added in v1.28.0

func (r *TestPluginRegistry) RunMigrations(ctx context.Context) error

type TestServiceRegistry added in v1.28.0

type TestServiceRegistry struct {
	Services map[string]any
}

func (*TestServiceRegistry) Get added in v1.28.0

func (r *TestServiceRegistry) Get(name string) any

func (*TestServiceRegistry) Register added in v1.28.0

func (r *TestServiceRegistry) Register(name string, service any)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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