Help us shape the future of Go! Take the 2026 Go Developer Survey

alerts

package
v0.2.48 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2026 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotConfigured = errors.New("server email is not configured")

Functions

func SendInvitation added in v0.2.11

func SendInvitation(server SMTP, to, orgName, link string) error

Types

type SMTP

type SMTP struct {
	Address, Username, Password, From, Security, ServerName string
	SkipVerify                                              bool
}

type Service

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

func New

func New(db *store.Store, identity *auth.Service, vault Vault, server SMTP, publicURL string) *Service

func (*Service) Get

func (s *Service) Get(ctx context.Context, session auth.Session, org string) (Settings, error)

func (*Service) Invite added in v0.2.14

func (s *Service) Invite(ctx context.Context, session auth.Session, org, to, orgName, token string) error

func (*Service) Notify

func (s *Service) Notify(ctx context.Context, org string) error

func (*Service) Put

func (s *Service) Put(ctx context.Context, session auth.Session, org string, in Settings, expected int64) (Settings, error)

func (*Service) Test

func (s *Service) Test(ctx context.Context, session auth.Session, org string, settings Settings) error

type Settings

type Settings struct {
	Enabled     bool     `json:"enabled"`
	Recipients  []string `json:"recipients"`
	Defaults    []string `json:"default_recipients"`
	Configured  bool     `json:"server_configured"`
	Address     string   `json:"smtp_address"`
	Username    string   `json:"smtp_username"`
	From        string   `json:"smtp_from"`
	Security    string   `json:"smtp_security"`
	Verify      bool     `json:"smtp_verify"`
	PasswordSet bool     `json:"smtp_password_set"`
	Password    *string  `json:"smtp_password,omitempty"`
	Version     int64    `json:"version"`
	// contains filtered or unexported fields
}

type Vault

type Vault interface {
	SealContext(context.Context, secrets.Binding, []byte) (secrets.Envelope, error)
	OpenContext(context.Context, secrets.Binding, secrets.Envelope) ([]byte, error)
}

Jump to

Keyboard shortcuts

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