provider

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package provider defines the notification provider entity and its store interface.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Provider

type Provider struct {
	ID          id.ProviderID     `json:"id"`
	AppID       string            `json:"app_id"`
	Name        string            `json:"name"`
	Channel     string            `json:"channel"`
	Driver      string            `json:"driver"`
	Credentials map[string]string `json:"credentials,omitempty"`
	Settings    map[string]string `json:"settings,omitempty"`
	Priority    int               `json:"priority"`
	Enabled     bool              `json:"enabled"`
	CreatedAt   time.Time         `json:"created_at"`
	UpdatedAt   time.Time         `json:"updated_at"`
}

Provider represents a configured notification delivery provider. Each provider is scoped to an app and handles a single channel type.

type Store

type Store interface {
	CreateProvider(ctx context.Context, p *Provider) error
	GetProvider(ctx context.Context, providerID id.ProviderID) (*Provider, error)
	UpdateProvider(ctx context.Context, p *Provider) error
	DeleteProvider(ctx context.Context, providerID id.ProviderID) error
	ListProviders(ctx context.Context, appID string, channel string) ([]*Provider, error)
	ListAllProviders(ctx context.Context, appID string) ([]*Provider, error)
}

Store defines persistence operations for providers.

Jump to

Keyboard shortcuts

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