store

package
v0.0.0-...-d9ac2dc Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DomainCollection = "web_server"
	VpnEUCollection  = "vpn_eu"
)
View Source
const (
	DomainUserIdKey    = "user_id"
	DomainIpKey        = "ip"
	DomainBasicAuthKey = "basic_auth"
	DomainFullSslKey   = "full_ssl"
	DomainDeleteAtKey  = "delete_at"
	DomainFqdnKey      = "fqdn"
	DomainPortKey      = "port"
)
View Source
const (
	VpnEuUserEmail    = "user_email"
	VpnEUUserName     = "user_name"
	VpnEUCreatedAt    = "created_at"
	VpnEUDeactivateAt = "deactivate_at"
	VpnEUActive       = "active"
)

Variables

View Source
var (
	ErrRecordNotFound = errors.New("record not found")
	ErrNoRowsUpdated  = errors.New("no rows updated")
	ErrNoRowsDeleted  = errors.New("no records deleted")
)

Functions

This section is empty.

Types

type DomainRepository

type DomainRepository interface {
	Create(d *entities.Domain) error
	Get(userId string) (domain *entities.Domain, err error)
	Update(domain *entities.Domain) error
	GetAllRecordsToDeleteInDays(days int) (domains []*entities.Domain, err error)
	DeleteByFqdn(fqdn string) error
}

type Store

type Store interface {
	DomainRepository() DomainRepository
	VPNEURepository() VPNEURepository
	Close() error
}

type VPNEURepository

type VPNEURepository interface {
	Create(vpnRecord *entities.VPNEU) error
	GetAllRecordsToDeactivateInMinutes(minutes int) (records []*entities.VPNEU, err error)
	SetInactive(record *entities.VPNEU) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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