Documentation ¶
Index ¶
Constants ¶
View Source
const Method = "chacha20-ietf-poly1305"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Connection ¶
type ConnectionService ¶
type ConnectionService struct {
// contains filtered or unexported fields
}
func NewConnectionService ¶
func NewConnectionService(repo repository.Connection, crypto Crypto) *ConnectionService
func (*ConnectionService) CreateConnection ¶
func (*ConnectionService) GetConnections ¶
func (c *ConnectionService) GetConnections(ctx context.Context, userId int64) ([]entity.Connection, error)
type CryptoService ¶
type CryptoService struct{}
func (CryptoService) Decrypt ¶
func (c CryptoService) Decrypt(cipherText, key string) (string, error)
func (CryptoService) Encrypt ¶
func (c CryptoService) Encrypt(text, key string) (string, error)
Encrypt service - key must be 16, 24 or 32 length
func (CryptoService) GeneratePassword ¶
func (c CryptoService) GeneratePassword(passwordLen int) string
func (CryptoService) GenerateSSConfig ¶
func (c CryptoService) GenerateSSConfig(conn *entity.Connection, cnf struct{ key, name string }) (string, error)
GenerateSSConfig - key must be 16, 24 or 32 length
type Service ¶
type Service struct {
Connection
}
func NewService ¶
func NewService(repos *repository.Repository) *Service
Click to show internal directories.
Click to hide internal directories.