utils

package
v0.0.0-...-87bf48c Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoMatch = errors.New("password does not match")

Functions

func AdminUserPassword

func AdminUserPassword() string

func AdminUserUsername

func AdminUserUsername() string

func BasicAuth

func BasicAuth(handler http.HandlerFunc) http.HandlerFunc

BasicAuth provides basic authentication for certain routes

func CertPath

func CertPath() string

func ClearDeviceOnEnroll

func ClearDeviceOnEnroll() bool

func DBHost

func DBHost() string

func DBMaxConnections

func DBMaxConnections() int

func DBMaxIdleConnections

func DBMaxIdleConnections() int

func DBName

func DBName() string

func DBPassword

func DBPassword() string

func DBPort

func DBPort() string

func DBSSLMode

func DBSSLMode() string

func DBUsername

func DBUsername() string

func DebugMode

func DebugMode() bool

func EnrollmentProfile

func EnrollmentProfile() string

func EscrowURL

func EscrowURL() string

func FileExists

func FileExists(filename string) bool

func Find

func Find(slice []string, val string) (int, bool)

func GetBasicAuthPassword

func GetBasicAuthPassword() string

func GetBasicAuthUser

func GetBasicAuthUser() string

func InfoRequestInterval

func InfoRequestInterval() int

func KeyPassword

func KeyPassword() string

func KeyPath

func KeyPath() string

func LogLevel

func LogLevel() string

func NanoAPIKey

func NanoAPIKey() string

func NanoURL

func NanoURL() string

func OnceIn

func OnceIn() int

func PrintStruct

func PrintStruct(input interface{})

func Prometheus

func Prometheus() bool

func PushOnNewBuild

func PushOnNewBuild() bool

func RedisHost

func RedisHost() string

func RedisPassword

func RedisPassword() string

func RedisPort

func RedisPort() string

func ScepCertIssuer

func ScepCertIssuer() string

func ScepCertMinValidity

func ScepCertMinValidity() int

func Sign

func Sign() bool

func SignedEnrollmentProfile

func SignedEnrollmentProfile() bool

func Verify

func Verify(plaintext string, h SaltedSHA512PBKDF2Dictionary) error

Types

type DefaultProvider

type DefaultProvider struct{}

DefaultProvider is the "production" implementation of IFlagProvider. It is simply a skeleton wrapper for all of the other legacy public methods in this package.

func (DefaultProvider) ClearDeviceOnEnroll

func (provider DefaultProvider) ClearDeviceOnEnroll() bool

ClearDeviceOnEnroll returns whether to delete device profiles and install applications when a device enrolls

type IFlagProvider

type IFlagProvider interface {
	ClearDeviceOnEnroll() bool
}

IFlagProvider is the public interface for all flag.Lookup calls

var FlagProvider IFlagProvider = DefaultProvider{}

FlagProvider is the variable that should be used to access public methods in this file. It intentionally has an identical public interface to the legacy public methods in this class to make migration easier. During unit tests, simply swap out this public variable for a unit-test-specific implementation of IFlagProvider. Swap back the original FlagProvider by simply instantiating a new DefaultProvider.

type SaltedSHA512PBKDF2Dictionary

type SaltedSHA512PBKDF2Dictionary struct {
	Iterations int    `plist:"iterations"`
	Salt       []byte `plist:"salt"`
	Entropy    []byte `plist:"entropy"`
}

func SaltedSHA512PBKDF2

func SaltedSHA512PBKDF2(plaintext string) (SaltedSHA512PBKDF2Dictionary, error)

Jump to

Keyboard shortcuts

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