domains

package
v1.15.0 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2025 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrDomainsUseCase = consoleerrors.CreateConsoleError("DomainsUseCase")
	ErrDatabase       = sqldb.DatabaseError{Console: ErrDomainsUseCase}
	ErrNotFound       = sqldb.NotFoundError{Console: ErrDomainsUseCase}
	ErrCertPassword   = CertPasswordError{Console: ErrDomainsUseCase}
	ErrCertExpiration = CertExpirationError{Console: ErrDomainsUseCase}
	ErrCertStore      = CertStoreError{Console: ErrDomainsUseCase}
)

Functions

func DecryptAndCheckCertExpiration

func DecryptAndCheckCertExpiration(domain dto.Domain) (*x509.Certificate, error)

Types

type CertExpirationError

type CertExpirationError struct {
	Console consoleerrors.InternalError
}

func (CertExpirationError) Error

func (e CertExpirationError) Error() string

func (CertExpirationError) Wrap

func (e CertExpirationError) Wrap(call, function string, err error) error

type CertPasswordError

type CertPasswordError struct {
	Console consoleerrors.InternalError
}

func (CertPasswordError) Error

func (e CertPasswordError) Error() string

func (CertPasswordError) Wrap

func (e CertPasswordError) Wrap(call, function string, err error) error

type CertStoreError added in v1.15.0

type CertStoreError struct {
	Console consoleerrors.InternalError
}

func (CertStoreError) Error added in v1.15.0

func (e CertStoreError) Error() string

func (CertStoreError) Wrap added in v1.15.0

func (e CertStoreError) Wrap(call, function string, err error) error

type Feature

type Feature interface {
	GetCount(context.Context, string) (int, error)
	Get(ctx context.Context, top, skip int, tenantID string) ([]dto.Domain, error)
	GetDomainByDomainSuffix(ctx context.Context, domainSuffix, tenantID string) (*dto.Domain, error)
	GetByName(ctx context.Context, name, tenantID string) (*dto.Domain, error)
	GetByNameWithCert(ctx context.Context, name, tenantID string) (*entity.Domain, error)
	Delete(ctx context.Context, name, tenantID string) error
	Update(ctx context.Context, d *dto.Domain) (*dto.Domain, error)
	Insert(ctx context.Context, d *dto.Domain) (*dto.Domain, error)
}

type ObjectStorager added in v1.15.0

type ObjectStorager interface {
	security.Storager
	GetObject(key string) (map[string]string, error)
	SetObject(key string, data map[string]string) error
}

ObjectStorager extends security.Storager with object storage capabilities.

type Repository

type Repository interface {
	GetCount(context.Context, string) (int, error)
	Get(ctx context.Context, top, skip int, tenantID string) ([]entity.Domain, error)
	GetDomainByDomainSuffix(ctx context.Context, domainSuffix, tenantID string) (*entity.Domain, error)
	GetByName(ctx context.Context, name, tenantID string) (*entity.Domain, error)
	Delete(ctx context.Context, name, tenantID string) (bool, error)
	Update(ctx context.Context, d *entity.Domain) (bool, error)
	Insert(ctx context.Context, d *entity.Domain) (string, error)
}

type UseCase

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

UseCase -.

func New

func New(r Repository, log logger.Interface, safeRequirements security.Cryptor, certStore security.Storager) *UseCase

New -.

func (*UseCase) Delete

func (uc *UseCase) Delete(ctx context.Context, domainName, tenantID string) error

func (*UseCase) Get

func (uc *UseCase) Get(ctx context.Context, top, skip int, tenantID string) ([]dto.Domain, error)

func (*UseCase) GetByName

func (uc *UseCase) GetByName(ctx context.Context, domainName, tenantID string) (*dto.Domain, error)

func (*UseCase) GetByNameWithCert added in v1.15.0

func (uc *UseCase) GetByNameWithCert(ctx context.Context, domainName, tenantID string) (*entity.Domain, error)

GetByNameWithCert retrieves a domain and its certificate from Vault. This should be used when the certificate data is needed (e.g., for provisioning).

func (*UseCase) GetCount

func (uc *UseCase) GetCount(ctx context.Context, tenantID string) (int, error)

History - getting translate history from store.

func (*UseCase) GetDomainByDomainSuffix

func (uc *UseCase) GetDomainByDomainSuffix(ctx context.Context, domainSuffix, tenantID string) (*dto.Domain, error)

func (*UseCase) Insert

func (uc *UseCase) Insert(ctx context.Context, d *dto.Domain) (*dto.Domain, error)

func (*UseCase) Update

func (uc *UseCase) Update(ctx context.Context, d *dto.Domain) (*dto.Domain, error)

Jump to

Keyboard shortcuts

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