utils

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func APIKey

func APIKey() 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 added in v0.1.1

func DBMaxConnections() int

func DBMaxIdleConnections added in v0.6.0

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 added in v0.2.3

func InfoRequestInterval() int

func KeyPassword

func KeyPassword() string

func KeyPath

func KeyPath() string

func LogLevel

func LogLevel() string

func OnceIn added in v0.2.2

func OnceIn() int

func PrintStruct

func PrintStruct(input interface{})

func Prometheus added in v0.1.1

func Prometheus() bool

func PushOnNewBuild

func PushOnNewBuild() bool

func RedisHost added in v0.2.0

func RedisHost() string

func RedisPassword added in v0.2.0

func RedisPassword() string

func RedisPort added in v0.2.0

func RedisPort() string

func ScepCertIssuer

func ScepCertIssuer() string

func ScepCertMinValidity

func ScepCertMinValidity() int

func ServerURL

func ServerURL() string

func Sign

func Sign() bool

func SignedEnrollmentProfile

func SignedEnrollmentProfile() bool

Types

type DefaultProvider added in v0.1.1

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 added in v0.1.1

func (provider DefaultProvider) ClearDeviceOnEnroll() bool

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

type IFlagProvider added in v0.1.1

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.

Jump to

Keyboard shortcuts

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