namespace

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewService

func NewService(repository store.NamespaceRepository, encryptionKey string) (domain.NamespaceService, error)

NewService returns service struct

Types

type EncryptorDecryptor

type EncryptorDecryptor interface {
	Encrypt(string) (string, error)
	Decrypt(string) (string, error)
}

type EncryptorDecryptorMock

type EncryptorDecryptorMock struct {
	mock.Mock
}

EncryptorDecryptor is an autogenerated mock type for the EncryptorDecryptor type

func (*EncryptorDecryptorMock) Decrypt

func (_m *EncryptorDecryptorMock) Decrypt(_a0 string) (string, error)

Decrypt provides a mock function with given fields: _a0

func (*EncryptorDecryptorMock) Encrypt

func (_m *EncryptorDecryptorMock) Encrypt(_a0 string) (string, error)

Encrypt provides a mock function with given fields: _a0

type NamespaceRepositoryMock

type NamespaceRepositoryMock struct {
	mock.Mock
}

NamespaceRepositoryMock is an autogenerated mock type for the NamespaceRepository type

func (*NamespaceRepositoryMock) Create

Create provides a mock function with given fields: _a0

func (*NamespaceRepositoryMock) Delete

func (_m *NamespaceRepositoryMock) Delete(_a0 uint64) error

Delete provides a mock function with given fields: _a0

func (*NamespaceRepositoryMock) Get

Get provides a mock function with given fields: _a0

func (*NamespaceRepositoryMock) List

List provides a mock function with given fields:

func (*NamespaceRepositoryMock) Migrate

func (_m *NamespaceRepositoryMock) Migrate() error

Migrate provides a mock function with given fields:

func (*NamespaceRepositoryMock) Update

Update provides a mock function with given fields: _a0

type Service

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

Service handles business logic

func (Service) CreateNamespace

func (s Service) CreateNamespace(namespace *domain.Namespace) error

func (Service) DeleteNamespace

func (s Service) DeleteNamespace(id uint64) error

func (Service) GetNamespace

func (s Service) GetNamespace(id uint64) (*domain.Namespace, error)

func (Service) ListNamespaces

func (s Service) ListNamespaces() ([]*domain.Namespace, error)

func (Service) Migrate

func (s Service) Migrate() error

func (Service) UpdateNamespace

func (s Service) UpdateNamespace(namespace *domain.Namespace) error

type Transformer

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

func NewTransformer

func NewTransformer(encryptionKey string) (*Transformer, error)

func (*Transformer) Decrypt

func (t *Transformer) Decrypt(s string) (string, error)

func (*Transformer) Encrypt

func (t *Transformer) Encrypt(s string) (string, error)

Jump to

Keyboard shortcuts

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