Help us shape the future of Go! Take the 2026 Go Developer Survey

profiles

package
v1.45.0 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2026 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const CIRADisabledHint = "Re-enable CIRA on this instance, or change the connection mode on this profile."

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")
	ErrCIRADisabled         = errors.New("CIRA is disabled on this instance")
)

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 EncryptMethod

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, 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 (*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) DecryptPasswords

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

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

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

func (*UseCase) GetProfileData

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

func (*UseCase) GetWiFiConfigurations

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

func (*UseCase) HandleIEEE8021xSettings

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

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

Jump to

Keyboard shortcuts

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