profiles

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2025 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrProfilesUseCase = consoleerrors.CreateConsoleError("ProfilesUseCase")
	ErrDatabase        = sqldb.DatabaseError{Console: consoleerrors.CreateConsoleError("ProfilesUseCase")}
	ErrNotFound        = sqldb.NotFoundError{Console: consoleerrors.CreateConsoleError("ProfilesUseCase")}
	ErrNotValid        = dto.NotValidError{Console: consoleerrors.CreateConsoleError("ProfilesUseCase")}
)

Functions

This section is empty.

Types

type AuthMethod added in v1.0.1

type AuthMethod int
const (
	WPAPSK        AuthMethod = 4
	WPAIEEE8021x  AuthMethod = 5
	WPA2PSK       AuthMethod = 6
	WPA2IEEE8021x AuthMethod = 7
)

type EncryptMethod added in v1.0.1

type EncryptMethod int
const (
	TKIP EncryptMethod = 3
	CCMP EncryptMethod = 4
)

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) (*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 (*UseCase) BuildConfigurationObject added in v1.0.1

func (uc *UseCase) BuildConfigurationObject(profileName string, data *entity.Profile, domainStuff *entity.Domain, wifiConfigs []config.WirelessProfile) config.Configuration

func (*UseCase) BuildWirelessProfiles added in v1.0.1

func (uc *UseCase) BuildWirelessProfiles(ctx context.Context, wifiConfigs []dto.ProfileWiFiConfigs, tenantID string) ([]config.WirelessProfile, error)

func (*UseCase) DecryptPasswords added in v1.0.1

func (uc *UseCase) DecryptPasswords(data *entity.Profile) error

func (*UseCase) Delete

func (uc *UseCase) Delete(ctx context.Context, profileName, tenantID string) error

func (*UseCase) Export added in v1.0.1

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) Get

func (uc *UseCase) Get(ctx context.Context, top, skip int, tenantID string) ([]dto.Profile, error)

func (*UseCase) GetByName

func (uc *UseCase) GetByName(ctx context.Context, profileName, tenantID string) (*dto.Profile, error)

func (*UseCase) GetCount

func (uc *UseCase) GetCount(ctx context.Context, tenantID string) (int, error)

History - getting translate history from store.

func (*UseCase) GetDomainInformation added in v1.0.1

func (uc *UseCase) GetDomainInformation(ctx context.Context, activation, domainName, tenantID string) (*entity.Domain, error)

func (*UseCase) GetProfileData added in v1.0.1

func (uc *UseCase) GetProfileData(ctx context.Context, profileName, tenantID string) (*entity.Profile, error)

func (*UseCase) GetWiFiConfigurations added in v1.0.1

func (uc *UseCase) GetWiFiConfigurations(ctx context.Context, profileName, tenantID string) ([]dto.ProfileWiFiConfigs, error)

func (*UseCase) HandleIEEE8021xSettings added in v1.0.1

func (uc *UseCase) HandleIEEE8021xSettings(ctx context.Context, data *entity.Profile, configuration *config.Configuration, tenantID string) error

func (*UseCase) Insert

func (uc *UseCase) Insert(ctx context.Context, d *dto.Profile) (*dto.Profile, error)

func (*UseCase) SerializeAndEncryptYAML added in v1.0.1

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) (*dto.Profile, error)

Jump to

Keyboard shortcuts

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