Documentation
¶
Index ¶
- Variables
- type AuthMethod
- type EncryptMethod
- type Feature
- type Repository
- type UseCase
- func (uc *UseCase) BuildConfigurationObject(profileName string, data *entity.Profile, domainStuff *entity.Domain, ...) config.Configuration
- func (uc *UseCase) BuildWirelessProfiles(ctx context.Context, wifiConfigs []dto.ProfileWiFiConfigs, tenantID string) ([]config.WirelessProfile, error)
- func (uc *UseCase) DecryptPasswords(data *entity.Profile) error
- func (uc *UseCase) Delete(ctx context.Context, profileName, tenantID string) error
- func (uc *UseCase) Export(ctx context.Context, profileName, domainName, tenantID string) (encryptedYAML, encryptionKey string, err error)
- func (uc *UseCase) Get(ctx context.Context, top, skip int, tenantID string) ([]dto.Profile, error)
- func (uc *UseCase) GetByName(ctx context.Context, profileName, tenantID string) (*dto.Profile, error)
- func (uc *UseCase) GetCount(ctx context.Context, tenantID string) (int, error)
- func (uc *UseCase) GetDomainInformation(ctx context.Context, activation, domainName, tenantID string) (*entity.Domain, error)
- func (uc *UseCase) GetProfileData(ctx context.Context, profileName, tenantID string) (*entity.Profile, error)
- func (uc *UseCase) GetWiFiConfigurations(ctx context.Context, profileName, tenantID string) ([]dto.ProfileWiFiConfigs, error)
- func (uc *UseCase) HandleIEEE8021xSettings(ctx context.Context, data *entity.Profile, configuration *config.Configuration, ...) error
- func (uc *UseCase) Insert(ctx context.Context, d *dto.Profile) (*dto.Profile, error)
- func (uc *UseCase) SerializeAndEncryptYAML(configuration config.Configuration) (encryptedYAML, key string, err error)
- func (uc *UseCase) Update(ctx context.Context, d *dto.Profile, fields map[string]bool) (*dto.Profile, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrProfilesUseCase = consoleerrors.CreateConsoleError("ProfilesUseCase") ErrDatabase = repoerrors.DatabaseError{Console: consoleerrors.CreateConsoleError("ProfilesUseCase")} ErrNotFound = repoerrors.NotFoundError{Console: consoleerrors.CreateConsoleError("ProfilesUseCase")} ErrNotValid = dto.NotValidError{Console: consoleerrors.CreateConsoleError("ProfilesUseCase")} ErrAMTPasswordRequired = errors.New("amtPassword is required when generateRandomPassword is false") ErrMEBXPasswordRequired = errors.New("mebxPassword is required when activation is acmactivate and generateRandomMEBxPassword is false") )
Functions ¶
This section is empty.
Types ¶
type AuthMethod ¶
type AuthMethod int
const ( WPAPSK AuthMethod = 4 WPAIEEE8021x AuthMethod = 5 WPA2PSK AuthMethod = 6 WPA2IEEE8021x AuthMethod = 7 )
type Feature ¶
type Feature interface {
GetCount(ctx context.Context, tenantID string) (int, error)
Get(ctx context.Context, top, skip int, tenantID string) ([]dto.Profile, error)
GetByName(ctx context.Context, profileName, tenantID string) (*dto.Profile, error)
Delete(ctx context.Context, profileName, tenantID string) error
Update(ctx context.Context, p *dto.Profile, fields map[string]bool) (*dto.Profile, error)
Insert(ctx context.Context, p *dto.Profile) (*dto.Profile, error)
Export(ctx context.Context, profileName, domainName, tenantID string) (string, string, error)
}
type Repository ¶
type Repository interface {
GetCount(ctx context.Context, tenantID string) (int, error)
Get(ctx context.Context, top, skip int, tenantID string) ([]entity.Profile, error)
GetByName(ctx context.Context, profileName, tenantID string) (*entity.Profile, error)
Delete(ctx context.Context, profileName, tenantID string) (bool, error)
Update(ctx context.Context, p *entity.Profile) (bool, error)
Insert(ctx context.Context, p *entity.Profile) (string, error)
}
type UseCase ¶
type UseCase struct {
// contains filtered or unexported fields
}
UseCase -.
func New ¶
func New(r Repository, wifiConfig wificonfigs.Repository, w profilewificonfigs.Feature, i ieee8021xconfigs.Feature, log logger.Interface, d domains.Feature, c ciraconfigs.Repository, safeRequirements security.Cryptor) *UseCase
New -.
func (*UseCase) BuildConfigurationObject ¶
func (uc *UseCase) BuildConfigurationObject(profileName string, data *entity.Profile, domainStuff *entity.Domain, wifiConfigs []config.WirelessProfile, cira *entity.CIRAConfig) config.Configuration
func (*UseCase) BuildWirelessProfiles ¶
func (uc *UseCase) BuildWirelessProfiles(ctx context.Context, wifiConfigs []dto.ProfileWiFiConfigs, tenantID string) ([]config.WirelessProfile, error)
func (*UseCase) Export ¶
func (uc *UseCase) Export(ctx context.Context, profileName, domainName, tenantID string) (encryptedYAML, encryptionKey string, err error)
Export - will call GetByName and return the profile with the associated wifi configs in YAML format to be downloaded.
func (*UseCase) GetDomainInformation ¶
func (*UseCase) GetProfileData ¶
func (*UseCase) GetWiFiConfigurations ¶
func (*UseCase) HandleIEEE8021xSettings ¶
func (*UseCase) SerializeAndEncryptYAML ¶
func (uc *UseCase) SerializeAndEncryptYAML(configuration config.Configuration) (encryptedYAML, key string, err error)
func (*UseCase) Update ¶
func (uc *UseCase) Update(ctx context.Context, d *dto.Profile, fields map[string]bool) (*dto.Profile, error)
fields == nil writes d as a full replace; non-nil merges those keys onto the existing record. profileName and tenantId identify the row and are not patchable (silently skipped if listed in fields).
Click to show internal directories.
Click to hide internal directories.