Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Account ¶
type Account interface { Username() string Encryptor() account_encryptors.Encryptor Signer() signers.Signer }
Account represents the identity account
type Adapter ¶
type Adapter interface { ToBytes(ins Account) ([]byte, error) ToInstance(bytes []byte) (Account, error) }
Adapter represents the account adapter
type Builder ¶
type Builder interface { Create() Builder WithUsername(username string) Builder WithEncryptor(encryptor account_encryptors.Encryptor) Builder WithSigner(signer signers.Signer) Builder Now() (Account, error) }
Builder represents an account builder
type Repository ¶
type Repository interface { List() ([]string, error) Exists(username string) (bool, error) Retrieve(credentials credentials.Credentials) (Account, error) }
Repository represents the account repository
type Service ¶
type Service interface { Insert(account Account, password []byte) error Update(credentials credentials.Credentials, criteria UpdateCriteria) error Delete(credentials credentials.Credentials) error }
Service represents the account service
type UpdateCriteria ¶
type UpdateCriteria interface { ChangeSigner() bool ChangeEncryptor() bool HasUsername() bool Username() string HasPassword() bool Password() []byte }
UpdateCriteria represents an update criteria
type UpdateCriteriaBuilder ¶
type UpdateCriteriaBuilder interface { Create() UpdateCriteriaBuilder WithUsername(username string) UpdateCriteriaBuilder WithPassword(password []byte) UpdateCriteriaBuilder ChangeSigner() UpdateCriteriaBuilder ChangeEncryptor() UpdateCriteriaBuilder Now() (UpdateCriteria, error) }
UpdateCriteriaBuilder represents an update criteria builder
Click to show internal directories.
Click to hide internal directories.